/* ============================================
   MAG BAY FISHING FLEET — TEAM
   CSS autocontenido
   ============================================ */
:root {
    --navy: #0a2342;
    --navy-deep: #061527;
    --white: #ffffff;
    --brass: #c9a06c;
    --brass-strong: #a9793f;
    --navy-panel: rgba(255, 255, 255, 0.045);
    --navy-panel-border: rgba(255, 255, 255, 0.09);
    --muted: rgba(255, 255, 255, 0.68);
    --muted-soft: rgba(255, 255, 255, 0.5);
    --ink: #1c2a33;

    --font-display: "Fraunces", serif;
    --font-body: "Work Sans", sans-serif;

    --radius: 6px;
    --container: 1180px;
    --header-h: 84px;

    color-scheme: dark;
}

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

::-webkit-scrollbar {
    display: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: var(--font-body);
    color: var(--white);
    background: var(--navy-deep);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.32s ease;
}

body.page-in {
    opacity: 1;
}

body.page-out {
    opacity: 0;
}

.main-nav a.nav-active,
.mobile-nav a.nav-active {
    color: var(--brass);
}

.main-nav a.nav-active::after {
    width: 100%;
}

img {
    max-width: 100%;
    display: block;
}

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============ BOTONES ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.7rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
}

.btn-block {
    width: 100%;
}

.btn-gold {
    background: var(--brass);
    color: var(--navy-deep);
    padding-right: 11px;
    padding-left: 11px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.btn-gold:hover {
    background: var(--brass-strong);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1.5px solid var(--navy-panel-border);
    color: var(--white);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline:hover {
    background: rgba(201, 160, 108, 0.12);
    border-color: var(--brass);
    color: var(--brass);
}

/* ============ HELPERS ============ */
.section {
    padding: 6.5rem 1.5rem;
}

.section-inner {
    max-width: var(--container);
    margin: 0 auto;
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--brass);
    margin-bottom: 0.6rem;
}

.reveal {
    opacity: 0;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: transparent;
    transition: background 0.4s ease, height 0.35s ease, box-shadow 0.4s ease;
}

.site-header.scrolled {
    background: rgba(6, 21, 39, 0.96);
    backdrop-filter: blur(8px);
    height: 68px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.header-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--white);
    flex-shrink: 0;
}

.brand-mark {
    width: 34px;
    height: 34px;
    color: var(--brass);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--white);
}

.brand-text em {
    font-style: normal;
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    color: var(--brass);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.8rem, 1vw, 1.5rem);
  flex: 1;
  min-width: 0;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1.5px;
    background: var(--brass);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--white);
}

.main-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.3rem;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
}

.header-phone svg {
    width: 16px;
    height: 16px;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 24px;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 82vw);
    background: var(--navy-deep);
    z-index: 490;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    padding: 7rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.mobile-nav a {
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 500;
}

.mobile-phone {
    color: var(--brass) !important;
}

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: flex-end;
    padding: calc(var(--header-h) + 3rem) 1.5rem 3.5rem;
    overflow: hidden;
    background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-hero-bg img {
    width: 100%;
    height: 200%;
    object-fit: cover;
    opacity: 0.5;
}

.page-hero-bg video {
    width: 100%;
    height: 100%;      /* aquí 100%, no 200% */
    object-fit: cover;
    object-position: center 40%;
    opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
    .page-hero-bg video {
        display: none;
    }
}
.page-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(6, 21, 39, 0.78) 0%,
            rgba(6, 21, 39, 0.55) 55%,
            rgba(6, 21, 39, 0.95) 100%);
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
}

.page-hero .eyebrow {
    color: var(--brass);
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 4vw, 3rem);
    max-width: 640px;
}

.page-hero p.page-hero-lead {
    color: var(--muted);
    max-width: 560px;
    margin-top: 0.8rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--muted-soft);
    margin-bottom: 1.2rem;
}

.breadcrumb a {
    color: var(--muted);
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--brass);
}

.breadcrumb .sep {
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--brass);
    font-weight: 600;
}

/* ============================================
   TEAM GRID
   ============================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
    margin-top: 1.5rem;
}

.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--navy-panel);
    border: 1px solid var(--navy-panel-border);
    border-radius: var(--radius);
    padding: 2.2rem 1.6rem 1.8rem;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brass);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.team-card:hover {
    transform: translateY(-6px);
    border-color: rgba(201, 160, 108, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.team-card:hover::before {
    transform: scaleX(1);
}

.team-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-deep));
    border: 2px solid var(--brass);
    color: var(--brass);
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    flex-shrink: 0;

    /* AÑADE ESTO: Asegura que la imagen no se salga de los bordes redondeados */
    overflow: hidden;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Mantiene la proporción de la foto al llenar el círculo */
    display: block;
}

/* Estilos para el Modal */
.image-modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 21, 39, 0.95); /* Fondo navy oscuro */
    backdrop-filter: blur(5px);
    cursor: zoom-out;
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius);
    border: 2px solid var(--brass);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Cambiar el cursor en el avatar para indicar que es clicable */
.team-avatar img {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.team-avatar img:hover {
    transform: scale(1.1);
}

.team-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.team-role {
    color: var(--brass);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.team-card p.team-bio {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 1.4rem;
    min-height: 66px;
}

.team-card .btn {
    margin-top: auto;
    font-size: 0.85rem;
    padding: 0.7rem 1.3rem;
}

/* ============================================
   CTA FINAL
   ============================================ */
.team-cta-section {
    padding: 0 1.5rem 6rem;
}

.team-cta {
    text-align: center;
    background: var(--navy-panel);
    border: 1px solid var(--navy-panel-border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    max-width: 640px;
    margin: 0 auto;
}

.team-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 0.7rem;
    color: var(--white);
}

.team-cta p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.6rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, 0.75);
    padding-top: 4rem;
    border-top: 1px solid var(--navy-panel-border);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand p {
    margin: 1rem 0 1.3rem;
    font-size: 0.9rem;
    max-width: 340px;
}

.brand-text.light strong {
    color: var(--white);
}

.social-row {
    display: flex;
    gap: 0.9rem;
}

.social-row a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--navy-panel-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.social-row svg {
    width: 17px;
    height: 17px;
}

.social-row a:hover {
    background: var(--brass);
    border-color: var(--brass);
    color: var(--navy-deep);
}

.footer-col h5 {
    color: var(--white);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.1rem;
}

.footer-col a,
.footer-col p {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
}

.footer-col a:hover {
    color: var(--brass);
}

.footer-bottom {
    border-top: 1px solid var(--navy-panel-border);
    padding: 1.4rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted-soft);
}

/* ============================================
   WHATSAPP FLOTANTE + POPUP
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 1.6rem;
    right: 1.6rem;
    z-index: 600;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease;
}

.whatsapp-float:hover {
    transform: scale(1.08);
}

.whatsapp-float svg {
    width: 34px;
    height: 34px;
    position: relative;
    z-index: 2;
}

.wa-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

.wa-popup {
    position: fixed;
    bottom: 5.8rem;
    right: 1.6rem;
    z-index: 599;
    width: 280px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(6, 21, 39, 0.28);
    overflow: hidden;
    display: none;
    opacity: 0;
    color: var(--ink);
}

.wa-popup.show {
    display: block;
}

.wa-popup-close {
    position: absolute;
    top: 0.6rem;
    right: 0.7rem;
    z-index: 2;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-popup-header {
    background: var(--navy);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--white);
}

.wa-popup-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-popup-avatar svg {
    width: 18px;
    height: 18px;
}

.wa-popup-header strong {
    display: block;
    font-size: 0.88rem;
}

.wa-popup-status {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.wa-popup-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7cffb2;
    display: inline-block;
}

.wa-popup-body {
    background: #f7f5f0;
    padding: 1rem 1.1rem 0.6rem;
}

.wa-bubble {
    background: var(--white);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(10, 35, 66, 0.06);
}

.wa-bubble-time {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: #5b6b76;
    margin-bottom: 0.3rem;
}

.wa-popup-input {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.1rem;
    background: var(--white);
    border-top: 1px solid rgba(10, 35, 66, 0.08);
    font-size: 0.82rem;
    color: #5b6b76;
    font-weight: 500;
}

.wa-popup-input svg {
    color: var(--brass-strong);
    flex-shrink: 0;
}

.wa-popup-input:hover {
    background: #f7f5f0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .header-phone {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 4.5rem 1.2rem;
    }

    .team-cta-section {
        padding: 0 1.2rem 4rem;
    }

    .team-cta {
        padding: 2.2rem 1.4rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 1.1rem;
        right: 1.1rem;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    .wa-popup {
        width: calc(100vw - 2.4rem);
        right: 1.2rem;
        bottom: 5.2rem;
    }
}

.language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: rgba(13, 13, 13, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  /* min-width: 180px; */
  padding: 0.35rem;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.25);
  z-index: 50;
}

.language-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  color: #fff;
  text-decoration: none;
  border-radius: 0.65rem;
  transition: background 0.2s ease;
}

.language-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lang-flag {
  font-size: 1rem;
}

@media (max-width: 560px) {
    .btn_reservar {
        padding: 0.4rem 0.6rem;
        font-size: 0.64rem;
    }
}

@media (max-width: 991px) {
  /* 1. Ajuste del contenedor general para evitar que los botones se encimen */
  .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px; /* Espacio uniforme entre teléfono, reserva, menú e idioma */
  }

  /* 2. Asegurar que el selector de idioma sea visible y tenga buen tamaño táctil */
  .language-switcher {
    display: flex !important;
    width: auto !important;
  }

  .language-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 5px;
    width: auto !important;
    min-width: 44px; /* Tamaño mínimo recomendado para pantallas táctiles */
    padding: 5px 8px !important;
  }

  /* 3. Forzar que la bandera y el texto aparezcan (estaban ocultos en móvil) */
  .language-toggle .lang-flag,
  .language-toggle #current-lang-label {
    display: inline-block !important;
    visibility: visible !important;
  }
}
