/* ==========================================================================
   Estilos Oficiales - Portal Web y Landing Page "Alerta Magdalena"
   Seguridad Ciudadana, Atención de Emergencias y Denuncias Vecinales
   Distrito de Magdalena del Mar (Lima, Perú)
   ========================================================================== */

:root {
  --primary-blue: #003057;
  --primary-blue-dark: #001D38;
  --accent-cyan: #00B4D8;
  --accent-teal: #0E8BA5;
  --primary-red: #E55353;
  --primary-orange: #FF6D00;
  --primary-green: #00A86B;
  --primary-yellow: #F4B400;

  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --text-dark: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  --border-color: #E2E8F0;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Kanit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-cyan);
}

/* Header & Navegación */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--primary-blue);
  box-shadow: var(--shadow-md);
  width: 100%;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.brand-badge {
  background-color: var(--accent-cyan);
  color: var(--primary-blue-dark);
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.70rem;
  letter-spacing: 0.8px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 4px 8px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.86rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.2;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.14);
}

.nav-link-highlight {
  background: rgba(229, 83, 83, 0.18);
  border: 1px solid rgba(229, 83, 83, 0.45);
  color: #FFB4B4 !important;
  border-radius: 20px;
  padding: 5px 12px;
}

.nav-link-highlight:hover {
  background: rgba(229, 83, 83, 0.35) !important;
  color: #fff !important;
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 48, 87, 0.92), rgba(0, 29, 56, 0.96)), url('../img/fondo-alerta-magdalena.jpg') center/cover no-repeat;
  color: #fff;
  padding: 5rem 1.5rem 4.5rem;
  text-align: center;
}

.hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.slogan-box {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 8px 20px;
  border-radius: 30px;
  margin-bottom: 1.5rem;
}

.slogan-line1 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
  color: #fff;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.35);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 180, 216, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 30px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Sections */
.section {
  padding: 4.5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  color: var(--accent-teal);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--primary-blue);
  font-weight: 800;
  margin-top: 0.4rem;
}

/* Grid de Alertas */
.alertas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.alerta-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.8rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.25s ease;
}

.alerta-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.alerta-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.2rem;
}

.alerta-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alerta-card h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.alerta-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Legal Container (Privacidad y Términos) */
.legal-container {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.legal-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.legal-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.legal-content h3 {
  font-family: var(--font-heading);
  color: var(--primary-blue);
  font-size: 1.35rem;
  margin: 2rem 0 0.8rem;
}

.legal-content p, .legal-content li {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.legal-content ul, .legal-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.alert-box {
  background-color: #EEF7FA;
  border-left: 4px solid var(--accent-cyan);
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
}

.alert-box-danger {
  background-color: #FDF2F2;
  border-left: 4px solid var(--primary-red);
}

/* Footer */
.footer {
  background-color: var(--primary-blue-dark);
  color: #fff;
  padding: 3.5rem 1.5rem 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand h4 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h5 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1040px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-blue);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
  }

  .nav-menu.active {
    display: flex;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .legal-container {
    padding: 2rem 1.2rem;
  }
}
