/* Estrada Boa CSS */
:root {
    --primary-color: #006633;
    --secondary-color: #ffffff;
    --accent-color: #ffcc00;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f5f5f5;
    --bg-dark: #1e3c2f;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --gray-light: #e0e0e0;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
  }
  
  body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
  }
  
  .bg-header {
      background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 8%, var(--bg-dark) 100%), url(./../imgs/capa.jpg) no-repeat center / cover;
      height: 451px;
      width: 100%;
      background-position-y: center;
  }

  .container {
    width: auto;
    margin-left: 25%;
    margin-right: 25%;
    padding: 0 20px;
    margin-bottom: 50px;
  }

  /* Header */
  header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 20px 0;
    text-align: center;
  }

  .container-header {
    display: flex;
    width: -webkit-fill-available;
    align-items: center;
    position: relative;
    flex-direction: column;
    justify-content: center;
  }
  
  .logo {
    height: 230px;
    width: 260px;
    background-image: url('./../imgs/logo.png');
    background-size: 260px auto;
    display: flex;
    align-items: center;
    margin-top: 65px;
  }
  
  .tagline {
    color: var(--text-light);
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.5rem;
  }
  
  .subtagline {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 20px;
  }
  
  /* Map Container */
  .map-container {
    position: relative;
    margin: 20px 0;
  }
  
  .map-image {
    width: 100%;
    position: relative;
  }
  
  .map-image img {
    width: 100%;
    display: block;
  }
  
  .marker {
    position: absolute;
    width: 25px;
    height: 30px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
  }
  
  .marker:hover {
    transform: translate(-50%, -50%) scale(2) !important;
  }
  
  .marker.in-progress {
    background-image: url('./../imgs/marker-in-progress.png');
    background-size: cover;
    transform: scale(1.3);
  }
  
  .marker.completed {
    background-image: url('./../imgs/marker-completed.png');
    background-size: cover;
    transform: scale(1.3);
  }
  
  .marker.planned {
    background-image: url('./../imgs/marker-planned.png');
    background-size: cover;
    transform: scale(1.3);
  }
  
  /* Info Card */
  .info-card {
    position: absolute;
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 15px;
    width: 300px;
    box-shadow: var(--shadow);
    z-index: 20;
    display: none;
  }
  
  .info-card.active {
    display: block;
  }
  
  .info-card-header {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
  }
  
  .info-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
  }
  
  .progress-bar {
    height: 10px;
    background-color: var(--gray-light);
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
  }
  
  .progress-fill {
    height: 100%;
    background-color: var(--primary-color);
  }
  
  .info-card-details {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
  }
  
  .info-card-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-dark);
  }
  
  /* Legend */
  .map-legend {
    display: flex;
    justify-content: center;
    gap: 52px;
    color: white;
    padding: 15px;
    background-color: #ffffff42;
    border-radius: 10px;
  }
  
  .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
  }
  
  .legend-color.in-progress {
    background-color: #FFA500;
  }
  
  .legend-color.completed {
    background-color: var(--success-color);
  }
  
  .legend-color.planned {
    background-color: var(--danger-color);
  }
  
  /* Dashboard */
  .dashboard-header {
    color: var(--text-light);
    text-align: center;
    margin: 30px 0 20px;
    font-size: 1.8rem;
    font-weight: 400;
  }
  
  .dashboard-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
  }
  
  .stat-card {
    flex: 1;
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
  }
  
  .stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
  }
  
  .stat-card p {
    color: var(--text-dark);
    font-size: 1.2rem;
  }
  
  .dashboard-details {
    display: flex;
    justify-content: space-between;
    gap: 20px;
  }
  
  .region-breakdown, .segments-breakdown {
    flex: 1;
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
  }
  
  .region-breakdown h3, .segments-breakdown h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
  }
  
  .region-item {
    margin-bottom: 15px;
  }
  
  .region-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
  }
  
  .region-progress {
    height: 10px;
    background-color: var(--gray-light);
    border-radius: 5px;
    overflow: hidden;
  }
  
  .region-progress-fill {
    height: 100%;
    background-color: var(--accent-color);
  }
  
  /* Chat Widget */
  .chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
  }
  
  .chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-size: 1.5rem;
  }
  
  .chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    height: 400px;
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
  }
  
  .chat-window.active {
    display: flex;
  }
  
  .chat-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .chat-close {
    cursor: pointer;
    font-size: 1.2rem;
  }
  
  .chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
  }
  
  .message {
    margin-bottom: 10px;
    max-width: 80%;
  }
  
  .message.bot {
    background-color: var(--gray-light);
    border-radius: 10px 10px 10px 0;
    padding: 10px;
    align-self: flex-start;
  }
  
  .message.user {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 10px 10px 0 10px;
    padding: 10px;
    align-self: flex-end;
    margin-left: auto;
  }
  
  .chat-input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid var(--gray-light);
  }
  
  .chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--gray-light);
    border-radius: 20px;
    outline: none;
  }
  
  .chat-send {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    margin-left: 5px;
    cursor: pointer;
  }

  .info-card-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-dark);
  }
  
  /* Responsive Styles */  
  @media (max-width: 480px) {
    .map-legend {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }
    
    .chat-window {
      width: 280px;
    }
  }

  @media (max-width: 992px) {
  .container {
    margin: 0 5%;
  }
}

@media (max-width: 768px) {
  .bg-header {
    height: 454px;
  }

  .dashboard-stats, .dashboard-details {
    flex-direction: column;
  }

  .stat-card, .region-breakdown, .segments-breakdown {
    width: 100%;
    margin-bottom: 20px;
  }

  .info-card {
    position: static !important;
    width: 100% !important;
    margin-top: 20px;
    z-index: 1;
  }

  #mobile-info-card-container {
    padding: 0 0 10px 0;
    position: relative;
  }

  .map-image img {
    width: 102%;
    display: block;
  }
}

@media (max-width: 480px) {
  .bg-header {
    height: 454px;
  }
  
  .dashboard-header {
    font-size: 1.2rem;
    padding: 0 10px;
  }

  .map-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .chat-window {
    width: 100%;
    right: 0;
    border-radius: 0;
  }

  .map-image img {
    width: 102%;
    display: block;
  }
}
