/* ============================================
   BRED Colima I.A.P. - Layout Components
   ============================================ */

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary-600), var(--color-accent-400));
  z-index: 9999;
  transition: none;
  pointer-events: none;
}

/* ===== HEADER / NAVBAR ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  padding: var(--space-4) 0;
  transition: all var(--transition-base);
}

.header--transparent {
  background: transparent;
}

.header--scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgb(0 0 0 / 0.08);
  padding: var(--space-3) 0;
}

.header--scrolled .nav__link {
  color: var(--color-neutral-700);
}

.header--scrolled .nav__link:hover,
.header--scrolled .nav__link--active {
  color: var(--color-primary-600);
}

.header--scrolled .header__logo-text {
  color: var(--color-neutral-900);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: var(--z-fixed);
}

.header__logo-img {
  height: 52px;
  width: 52px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgb(37 150 190 / 0.4);
  border: 2.5px solid rgba(255,255,255,0.5);
  transition: all var(--transition-base);
}

.header--scrolled .header__logo-img {
  height: 42px;
  width: 42px;
  border-color: var(--color-primary-200);
  box-shadow: 0 2px 10px rgb(37 150 190 / 0.25);
}

.header__logo-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: var(--fw-extrabold);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgb(37 150 190 / 0.3);
}

.header__logo-text {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--text-lg);
  color: var(--color-white);
  transition: color var(--transition-base);
  line-height: var(--lh-tight);
}

.header__logo-subtitle {
  font-size: 0.65rem;
  font-weight: var(--fw-medium);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
}

/* --- Navigation --- */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav__link {
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  position: relative;
}

.nav__link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

.nav__link--active {
  color: var(--color-white);
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1.25rem;
  height: 2px;
  background: var(--color-primary-400);
  border-radius: var(--radius-full);
}

.header--scrolled .nav__link--active::after {
  background: var(--color-primary-600);
}

.nav__cta {
  margin-left: var(--space-4);
}

/* --- Mobile Menu Toggle --- */
.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: var(--z-modal);
  cursor: pointer;
  background: none;
  border: none;
  position: relative;
}

.menu-toggle__bar {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-white);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.header--scrolled .menu-toggle__bar {
  background: var(--color-neutral-800);
}

.menu-toggle--active .menu-toggle__bar {
  background: var(--color-white);
}

.menu-toggle--active .menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle--active .menu-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.menu-toggle--active .menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .header { padding: var(--space-3) 0; }
  .header--scrolled { padding: var(--space-2) 0; }

  .header__logo-img { height: 42px; width: 42px; }
  .header--scrolled .header__logo-img { height: 36px; width: 36px; }
  .header__logo-text { font-size: var(--text-base); }

  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--color-neutral-900) 0%, #0c2d4a 100%);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-overlay);
    padding: var(--space-20) var(--space-6);
  }

  .nav--open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.85);
    padding: var(--space-3) var(--space-8);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    text-align: center;
    width: 100%;
    max-width: 280px;
  }

  .nav__link:hover,
  .nav__link--active {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.08);
  }

  .nav__link--active::after { display: none; }

  .nav__cta {
    margin-left: 0;
    margin-top: var(--space-6);
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-neutral-900);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(12, 74, 110, 0.92) 0%,
    rgba(14, 95, 138, 0.85) 30%,
    rgba(37, 150, 190, 0.78) 60%,
    rgba(26, 26, 46, 0.9) 100%
  );
}

.hero__bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(37, 150, 190, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(91, 184, 214, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 40%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 750px;
  padding-top: var(--space-20);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-primary-300);
  margin-bottom: var(--space-6);
}

.hero__badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-primary-400);
  border-radius: var(--radius-full);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: var(--fw-extrabold);
  color: var(--color-white);
  margin-bottom: var(--space-5);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero__title-accent {
  background: linear-gradient(135deg, #7ecce3, #5bb8d6, #fbbf24);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero__description {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-8);
  max-width: 520px;
}

.hero__description strong {
  color: var(--color-white);
  font-weight: var(--fw-semibold);
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 3s ease-in-out infinite;
}

.hero__scroll-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* Floating decorative elements */
.hero__float {
  position: absolute;
  border-radius: var(--radius-full);
  opacity: 0.1;
  pointer-events: none;
}

.hero__float--1 {
  width: 300px;
  height: 300px;
  background: var(--color-primary-400);
  top: 10%;
  right: -5%;
  animation: float-slow 8s ease-in-out infinite;
}

.hero__float--2 {
  width: 200px;
  height: 200px;
  background: var(--color-accent-400);
  bottom: 20%;
  right: 15%;
  animation: float-slow 6s ease-in-out infinite reverse;
}

.hero__float--3 {
  width: 150px;
  height: 150px;
  background: var(--color-secondary-400);
  top: 30%;
  right: 25%;
  animation: float-slow 10s ease-in-out infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(15px, -20px); }
  66% { transform: translate(-10px, 15px); }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-neutral-900);
  color: var(--color-neutral-300);
  padding-top: var(--space-20);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__brand {
  max-width: 340px;
}

.footer__brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  text-decoration: none;
}

.footer__brand-text {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--text-base);
  color: var(--color-white);
  line-height: var(--lh-tight);
}

.footer__brand-sub {
  font-weight: var(--fw-medium);
  font-size: var(--text-xs);
  opacity: 0.6;
  display: block;
}

.footer__brand-desc {
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--color-neutral-400);
  margin-bottom: var(--space-5);
}

.footer__social {
  display: flex;
  gap: var(--space-2);
}

.footer__social-link {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: var(--color-neutral-400);
  transition: all var(--transition-fast);
}

.footer__social-link:hover {
  background: var(--color-primary-600);
  border-color: var(--color-primary-600);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer__column-title {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-5);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-neutral-400);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.footer__link:hover {
  color: var(--color-primary-400);
  transform: translateX(4px);
}

/* Footer contact items with icons */
.footer__contact-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-neutral-400);
  line-height: var(--lh-normal);
}

.footer__contact-item svg {
  color: var(--color-primary-400);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer__contact-item a {
  color: var(--color-neutral-400);
  transition: color var(--transition-fast);
}

.footer__contact-item a:hover {
  color: var(--color-primary-400);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) 0;
  font-size: var(--text-xs);
  color: var(--color-neutral-500);
}

.footer__legal-links {
  display: flex;
  gap: var(--space-6);
}

.footer__legal-links a {
  color: var(--color-neutral-500);
  transition: color var(--transition-fast);
}

.footer__legal-links a:hover {
  color: var(--color-primary-400);
}

.footer__credit {
  text-align: center;
  padding: var(--space-4) 0 var(--space-6);
  font-size: 0.65rem;
  color: var(--color-neutral-500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__credit-link {
  color: var(--color-primary-400);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.03em;
  transition: all var(--transition-fast);
}

.footer__credit-link:hover {
  color: var(--color-primary-300);
}

@media (max-width: 1024px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer { padding-top: var(--space-10); }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: var(--space-5);
  }

  /* Each column becomes a section with separator */
  .footer__top > * {
    padding-block: var(--space-5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  .footer__top > *:last-child {
    border-bottom: none;
  }

  /* Brand - centered hero layout */
  .footer__brand {
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0;
  }
  .footer__brand-logo { justify-content: center; }
  .footer__brand-logo-img { height: 44px; width: 44px; }
  .footer__brand-desc {
    margin-inline: auto;
    max-width: 280px;
    font-size: var(--text-xs);
    margin-bottom: var(--space-4);
  }
  .footer__social {
    justify-content: center;
    gap: var(--space-3);
  }
  .footer__social-link {
    width: 2.75rem;
    height: 2.75rem;
  }

  /* Navigation - horizontal chip layout */
  .footer__column-title {
    margin-bottom: var(--space-3);
    text-align: center;
  }
  .footer__links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
  }
  .footer__link {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
  }
  .footer__link:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
  }

  /* Contact - centered items */
  .footer__contact-items { gap: var(--space-3); align-items: center; }
  .footer__contact-item {
    font-size: var(--text-xs);
    justify-content: center;
    text-align: center;
    gap: var(--space-2);
  }
  .footer__contact-item svg { flex-shrink: 0; }

  /* Bottom bar */
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
    padding: var(--space-5) 0;
    font-size: 0.65rem;
  }
  .footer__legal-links { gap: var(--space-4); font-size: 0.65rem; }
}
