/* ============================================================
   PALM BAY COMMISSARY — Global Styles
   Palette: Deep Blue #1B5EA8 | Gold #F5A722 | Sky #7DC8E8
   ============================================================ */

:root {
  --primary:              #1B5EA8;
  --primary-dark:         #144680;
  --primary-light:        #D6E8F7;
  --accent:               #F5A722;
  --accent-dark:          #D98A10;
  --sky:                  #7DC8E8;
  --sky-light:            #EBF6FC;
  --text-dark:            #0F2744;
  --text-mid:             #3D5166;
  --text-light:           #6B849A;
  --bg-white:             #FFFFFF;
  --bg-light:             #F4F9FD;
  --bg-section:           #EBF6FC;
  --border:               #C8DFF0;
  --shadow-sm:            rgba(27, 94, 168, 0.08);
  --shadow-md:            rgba(27, 94, 168, 0.15);
  --shadow-lg:            rgba(27, 94, 168, 0.22);

  /* Legacy aliases for template compatibility */
  --color-primary:        var(--primary);
  --color-primary-darken: var(--primary-dark);
  --color-primary-light:  var(--primary-light);
  --color-secondary:      var(--accent);
  --color-white:          #fff;
  --secondary:            var(--accent);
  --shadow:               var(--shadow-sm);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Global heading color = Primary Blue ────────────────── */
h1, h2, h3 { color: var(--primary) !important; }

/* Exceptions: headings on dark/colored backgrounds stay white */
.hero-title,
.section-title-white,
[class*="-hero-bg"] h1,
[class*="-hero-bg"] h2,
[class*="-hero-bg"] h3,
.svc-hero h1,
.svc-hero h2,
.svc-hero h3,
.licensing-cta h2,
.services-cta h2 { color: white !important; }

/* Footer headings keep their gold accent color */
footer h4 { color: var(--accent) !important; }

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

header img, footer img { max-width: 100%; height: auto; display: block; }

/* ── Progress Bar ───────────────────────────────────────── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  transition: width 0.25s ease-out;
  box-shadow: 0 1px 6px var(--shadow-md);
}

/* ── Header ─────────────────────────────────────────────── */
header {
  background-color: var(--bg-white);
  border-bottom: 2px solid var(--primary-light);
  box-shadow: 0 2px 16px var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

header nav { padding: 0.75rem 1.5rem; }

header .flex > div:first-child {
  font-size: 1.5rem;
  color: var(--primary);
  transition: color 0.25s ease;
}
header .flex > div:first-child:hover { color: var(--accent); }

header a {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
}
header a:not(:has(img)):hover,
header a:focus {
  color: var(--primary);
  background-color: var(--primary-light);
}

/* CTA button */
header .bg-primary {
  background-color: var(--accent) !important;
  color: var(--text-dark) !important;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  box-shadow: 0 3px 10px rgba(245, 167, 34, 0.35);
}
header .bg-primary:hover {
  background-color: var(--accent-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 167, 34, 0.45);
}

/* Active nav link */
.nav-link-active:not(:has(img)) {
  color: var(--primary) !important;
  font-weight: 700;
  position: relative;
}
.nav-link-active:not(:has(img))::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0.85rem; right: 0.85rem;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--sky));
}

/* Mobile menu */
.mobile-menu-hidden { display: none !important; }
#mobile-menu {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  border-top: 2px solid var(--primary-light);
}
#mobile-menu:not(.mobile-menu-hidden) {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
}
#mobile-menu a {
  font-size: 1rem !important;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid var(--primary-light);
  border-radius: 0 !important;
  display: block;
}
#mobile-menu a:last-child { border-bottom: none; }
#mobile-menu .bg-primary {
  margin: 0.75rem 1rem 0.5rem;
  border-radius: 0.75rem !important;
  text-align: center;
  border-bottom: none !important;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 2.5rem 1.5rem 1.5rem;   /* Reducido: antes era 4rem 1.5rem 2rem */
  color: white;
  overflow-x: hidden;               /* Evita scroll horizontal */
  width: 100%;
}

/* Evita que textos largos (email, enlaces) se salgan */
footer p, footer span, footer a, footer .text-gray-300 {
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  display: inline-block;
}

footer .font-\[\'Pacifico\'\] {
  font-size: 1.25rem;
  color: white;
  margin-bottom: 1rem;
}

footer p { 
  color: rgba(255,255,255,0.65); 
  margin-bottom: 1rem; 
  font-size: 0.9rem;   /* Un poco más pequeño */
}

footer h4 {
  font-size: 0.75rem;   /* Reducido de 0.78rem */
  font-weight: 700;
  margin-bottom: 1rem;  /* Reducido de 1.25rem */
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

footer ul li a {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;   /* Reducido de 0.9rem */
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: block;
  padding: 0.15rem 0;   /* Reducido de 0.2rem */
}
footer ul li a:hover { color: var(--accent); padding-left: 0.3rem; }

footer .flex.space-x-4 > a {
  width: 2.2rem; height: 2.2rem;   /* Ligeramente más pequeño */
  background-color: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}
footer .flex.space-x-4 > a:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(245, 167, 34, 0.4);
}

footer .border-t {
  border-color: rgba(255,255,255,0.15) !important;
  padding-top: 1rem;
  margin-top: 1.5rem;
  text-align: center;
}
footer .border-t p { 
  color: rgba(255,255,255,0.45); 
  font-size: 0.75rem;   /* Reducido de 0.82rem */
}
footer .border-t a { color: var(--accent); }
footer .border-t a:hover { color: white; text-decoration: underline; }

/* Ajuste específico para el contenedor de las columnas (gap más pequeño) */
footer .grid {
  gap: 1.5rem !important;   /* Si usas gap-8, lo reduce a gap-6 aprox */
}


/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  header nav { padding: 0.6rem 1rem; }
  footer { 
    padding: 1.8rem 1rem 1rem;   /* Aún más compacto en móvil */
  }
  footer .grid {
    gap: 1.25rem !important;
  }
  footer h4 {
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
  }
  footer ul li a {
    font-size: 0.8rem;
  }
  footer p {
    font-size: 0.85rem;
  }
  footer .border-t p {
    font-size: 0.7rem;
  }
}
@media (max-width: 480px) {
  body { font-size: 0.92rem; }
  header .bg-primary { padding: 0.45rem 1rem; font-size: 0.82rem; }
  .fixed.bottom-6.right-6 { width: 46px; height: 46px; bottom: 14px; right: 14px; }
  .fixed.bottom-6.right-6 i { font-size: 1.15rem; }
  footer .grid {
    gap: 1rem !important;
  }
}

.nav-options a { color: var(--primary); }

/* ── Tailwind CDN compatibility — custom color utilities ────── */
/* Tailwind CDN doesn't recognise bg-primary / text-primary etc.
   These rules make those classes work across all pages.           */
.bg-primary                        { background-color: var(--primary) !important; }
.bg-primary.bg-opacity-10,
.bg-primary.bg-opacity-5          { background-color: var(--primary-light) !important; }
.hover\:bg-primary:hover           { background-color: var(--primary) !important; }

.text-primary                      { color: var(--primary) !important; }
.hover\:text-primary:hover         { color: var(--primary) !important; }

.border-primary                    { border-color: var(--primary) !important; }
.border-primary.border-opacity-20  { border-color: rgba(27, 94, 168, 0.2) !important; }
.focus\:ring-primary:focus         { --tw-ring-color: var(--primary); }
.focus\:border-primary:focus       { border-color: var(--primary) !important; }

.text-secondary,
.text-accent                       { color: var(--accent) !important; }
.bg-secondary                      { background-color: var(--accent) !important; }
