/*
 * Estilos para el sitio web de la Contraloría Municipal de San Francisco.
 * Diseño moderno y ligero con paleta en tonos azul y dorado inspirada en
 * la bandera de Venezuela. La estructura es flexible y responsiva para
 * adaptarse a distintas resoluciones de pantalla.
 */

:root {
  --primary-color: #012e5a; /* azul oscuro institucional */
  --secondary-color: #075aa2; /* azul medio para acentos */
  --accent-color: #f8b400; /* dorado */
  --light-bg: #f7f9fc; /* fondo claro */
  --text-color: #333;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  background-color: #fff;
}

/* Navegación */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

.navbar .logo {
  display: flex;
  align-items: center;
}

.navbar .logo img {
  height: 50px;
  margin-right: 0.75rem;
}

.navbar .site-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  /* Permitir adaptabilidad y utilizar flexbox para separar líneas en distintas resoluciones */
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  white-space: normal;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-left: auto; /* desplaza las opciones de navegación a la derecha */
}

.nav-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Burger menu */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  gap: 4px;
}

.burger span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* === Estilos adicionales para mejoras de diseño === */

/* Ajustes de líneas del título en la cabecera */
.navbar .site-title .title-line-1,
.navbar .site-title .title-line-2 {
  display: inline-block;
  margin-right: 0.25rem;
}

/* Iconos (Bootstrap) genéricos: color secundario y alineación */
.icon {
  color: var(--secondary-color);
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* H2 de tarjetas Misión y Visión en fila con icono */
.about-grid .card h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Contenedor y tabla de departamentos */
.departments-table-container {
  overflow-x: auto;
  margin-top: 1.5rem;
}
.departments-table {
  width: 100%;
  border-collapse: collapse;
  max-width: 1000px;
  margin: 0 auto;
  font-size: 0.9rem;
}
.departments-table th {
  background-color: var(--secondary-color);
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
}
.departments-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e6ef;
}
.departments-table tbody tr:nth-child(even) {
  background-color: #f0f4fa;
}

/* Cuadrícula de Plan Operativo */
.plan-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: 1000px;
  margin: 2rem auto 0;
}
.plan-item {
  background-color: var(--light-bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  text-align: left;
}
.plan-item h3 {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-size: 1.2rem;
}
.plan-item p {
  margin: 0;
  line-height: 1.5;
}
.plan-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--secondary-color);
}
.plan-icon .icon {
  color: #fff;
  margin: 0;
}

/* Logo de la Oficina de Atención Ciudadana */
.oac-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.oac-logo img {
  max-width: 160px;
  height: auto;
}

/* Ajuste general de la sección de héroe para reducir el espacio vertical */
.hero {
  padding: 6rem 1.5rem 4rem;
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, #eaf3fc, #ffffff);
  padding: 8rem 1.5rem 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--primary-color);
  margin-top: 80px; /* offset for fixed header */
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

/* About section (Misión & Visión) */
.about-section {
  background-color: var(--light-bg);
  padding: 4rem 1.5rem;
}

.about-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.about-grid .card {
  flex: 1 1 45%;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  border-top: 4px solid var(--secondary-color);
}

.about-grid .card h2 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1rem;
}

.about-grid .card p {
  margin: 0;
  line-height: 1.6;
}

/* Valores */
.values-section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.values-section h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.section-intro {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-weight: 300;
}

.values-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.value-item {
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

.objective {
  margin-top: 2rem;
}

.objective h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.objective p {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Estructura */
.structure-section {
  background-color: var(--light-bg);
  padding: 4rem 1.5rem;
}

.structure-section h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.structure-section .org-chart {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.structure-section .org-chart img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.structure-section .departments ul {
  list-style: none;
  padding-left: 0;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.structure-section .departments li {
  margin-bottom: 0.75rem;
}

/* Plan Operativo */
.plan-section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.plan-section h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.plan-section .plan-content ul {
  max-width: 800px;
  margin: 0 auto;
  padding-left: 1rem;
}

.plan-section .plan-content li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1rem;
}

.plan-section .plan-content li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

/* Manuales */
.manuales-section {
  background-color: var(--light-bg);
  padding: 4rem 1.5rem;
}

.manuales-section h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.manuales-table-container {
  overflow-x: auto;
}

.manuales-table {
  width: 100%;
  border-collapse: collapse;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.9rem;
}

.manuales-table thead {
  background-color: var(--secondary-color);
  color: #fff;
}

.manuales-table th,
.manuales-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e0e6ef;
}

.manuales-table tbody tr:nth-child(even) {
  background-color: #f0f4fa;
}

.manuales-table tbody tr:hover {
  background-color: #e8f0fa;
}

/* Contacto */
.contact-section {
  padding: 4rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-section h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--primary-color);
}

.form-group input,
.form-group textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccd5e0;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(7, 90, 162, 0.2);
}

.contact-form button {
  align-self: flex-start;
  padding: 0.8rem 1.5rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: var(--secondary-color);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

footer .footer-content p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

/* WhatsApp Floating Button */
#whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 5000;
}

#whatsapp svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background-color: #fff;
    flex-direction: column;
    align-items: flex-start;
    width: 200px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-links.show {
    transform: translateX(0);
  }
  .burger {
    display: flex;
  }

  /* Reducir tamaño del logotipo y del título en pantallas pequeñas */
  .navbar .logo img {
    height: 40px;
  }
  .navbar .site-title {
    font-size: 0.95rem;
    line-height: 1.2;
  }
  /* Mostrar la segunda línea debajo de la primera en pantallas angostas */
  .navbar .site-title .title-line-2 {
    display: block;
    margin-right: 0;
  }
  /* Ajustes de hero para móviles */
  .hero {
    padding: 5rem 1rem 3rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
}
