/* ============================================= */
/* == CSS UNIFICADO PARA PÁGINAS DE ESPECIALIDAD == */
/* ============================================= */

/* --- Estilos Globales y de Header --- */
body { font-family: 'Lexend', sans-serif; margin: 0; background-color: #fff; color: #333; }
a { color: #c5a47e; text-decoration: none; }
a:hover { text-decoration: underline; }
.fixed-logo { position: fixed; top: 30px; left: 40px; z-index: 1001; }
.fixed-logo img { height: 40px; width: auto; }
.main-header {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    transition: top 0.4s ease-in-out;
}

.main-header.nav-hidden {
    top: -100px;
}

.nav-wrapper {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main-nav {
    display: flex; /* Para que en escritorio se vea en línea */
}

.main-nav a {
    color: #333;
    text-decoration: none;
    margin: 0 20px;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav a.active {
    font-weight: 700;
}

.main-nav a.active::after,
.main-nav a:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #c5a47e; /* Color dorado */
}

.cta-button {
    background-color: #1a2a4a;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    margin-left: 20px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #3c4a6b;
}

/* --- Estilos del Botón de Hamburguesa --- */
.mobile-nav-toggle {
    display: none;
}
.cta-button:hover { background-color: #3c4a6b; text-decoration: none; }

/* --- Hero Cinematográfico --- */
.page-hero {
    position: relative;
    height: 50vh;
    min-height: 350px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;

    /* === LA SOLUCIÓN: AÑADE ESTAS DOS LÍNEAS === */
    padding-top: 100px; /* Crea espacio para el menú flotante */
    box-sizing: border-box; /* Asegura que el padding no aumente la altura total */
}
.hero-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: cover; background-position: center; animation: kenburns 20s ease-out infinite; z-index: 1; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(0,0,0,0.5), rgba(26, 42, 74, 0.6)); z-index: 2; }
.hero-content { position: relative; z-index: 3; }
.hero-content h1 { font-size: 4rem; font-weight: 600; text-shadow: 2px 2px 8px rgba(0,0,0,0.5); transform: translateY(20px); opacity: 0; transition: transform 1s ease-out 0.5s, opacity 1s ease-out 0.5s; }
.hero-content h1:not(.hidden-hero-text) { transform: translateY(0); opacity: 1; }
@keyframes kenburns { 0% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* --- Layout Principal y Contenido --- */
.main-content-wrapper { display: flex; max-width: 1200px; margin: 0 auto; padding: 100px 40px; gap: 60px; }
.specialty-content { flex: 1; min-width: 0; }
.specialty-content h2 { font-size: 2.5rem; color: #1a2a4a; font-weight: 600; margin-top: 0; }
.specialty-content h3 { font-size: 1.8rem; color: #1a2a4a; font-weight: 500; margin-top: 40px; border-bottom: 2px solid #e0e0e0; padding-bottom: 15px; }
.specialty-content p { font-size: 1.1rem; line-height: 1.8; color: #555; font-weight: 300; }
.service-list { list-style: none; padding-left: 0; margin-top: 30px; }
.service-list li { padding-left: 35px; position: relative; margin-bottom: 20px; font-size: 1.1rem; line-height: 1.6; }
.service-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #fff; background-color: #c5a47e; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }

/* --- Imagen de Contenido --- */
.content-image-wrapper { margin: 40px 0; }
.content-image-wrapper img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* --- Pilar de Navegación (Sticky) --- */
.sidebar { flex: 0 0 300px; }
.sidebar-inner { position: -webkit-sticky; position: sticky; top: 120px; }
.sidebar h4 { font-size: 1.4rem; color: #1a2a4a; padding-bottom: 15px; border-bottom: 3px solid #c5a47e; margin-top: 0; }
.sidebar-nav a { display: flex; align-items: center; text-decoration: none; color: #555; padding: 15px; margin: 5px 0; border-radius: 8px; font-weight: 500; transition: all 0.3s ease; }
.sidebar-nav a:hover { background-color: #f0f0f0; color: #1a2a4a; text-decoration: none; }
.sidebar-nav a.active { background-color: #1a2a4a; color: #fff; font-weight: 600; box-shadow: 0 5px 15px rgba(26, 42, 74, 0.2); }
.sidebar-nav a.active:hover { color: #fff; }

/* --- Footer Consistente --- */
.main-footer-container { background-color: #1a2a4a; color: #e0e0e0; padding: 60px 40px 20px 40px; }
.footer-content { display: flex; flex-wrap: wrap; justify-content: space-between; max-width: 1200px; margin: 0 auto; gap: 40px; }
.footer-column { flex: 1; min-width: 220px; }
.footer-logo { max-width: 180px; margin-bottom: 15px; filter: brightness(0) invert(1); } /* Logo en blanco */
.footer-tagline { font-style: italic; color: #c5a47e; }
.footer-column h4 { font-size: 1.2rem; color: #fff; margin-bottom: 20px; font-weight: 600; position: relative; padding-bottom: 10px; }
.footer-column h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background-color: #c5a47e; }
.footer-column a, .footer-column p { color: #e0e0e0; text-decoration: none; display: block; margin-bottom: 10px; line-height: 1.7; }
.footer-column a:hover { color: #fff; text-decoration: underline; }
.footer-column p a { display: inline; }
.footer-bottom { text-align: center; border-top: 1px solid #3c4a6b; padding-top: 20px; margin-top: 40px; font-size: 0.9rem; color: #a0a0a0; }

/* --- Clases para Animaciones JS --- */
.hidden-hero-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out 0.5s, transform 1s ease-out 0.5s;
}
.hidden-hero-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hidden-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.hidden-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.footer-reveal {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

/*
  2. ESTADO FINAL (Visible y en su sitio)
  Cuando le añadamos la clase "is-visible", se animará a esta posición.
*/
.footer-reveal.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.pre-footer {
    background-color: #f4f4f4;
    padding: 80px 40px;
    text-align: center;
}

.pre-footer-content h2 {
    font-size: 2.5rem;
    color: #1a2a4a;
    margin-bottom: 15px;
}

.pre-footer-content p {
    font-size: 1.125rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
}

.cta-button-footer {
    background-color: #c5a47e;
    color: #fff;
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.cta-button-footer:hover {
    background-color: #b39169;
    transform: translateY(-3px);
    text-decoration: none;
    color: #fff;
}

.main-nav {
    display: flex;
    flex-direction: column; /* <-- LA CLAVE: Apila los enlaces verticalmente */
    align-items: stretch;   /* Hace que los enlaces ocupen el ancho disponible */
}

.footer-logo img {
    max-width: 180px; /* Ajusta el tamaño */
    height: auto;
    display: block;
    margin: 0 auto 0 500px;
    
}

.main-footer-container {
  background-color: #1a2a4a;
  color: #e0e0e0;
  padding: 60px 40px 20px 40px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.footer-column { flex: 1; min-width: 220px; }

.footer-column h4 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 20px;
  font-weight: 600;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 2px;
  background-color: #c5a47e;
}

.footer-column a,
.footer-column p {
  color: #e0e0e0;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  line-height: 1.7;
}

.footer-column a:hover { color: #fff; text-decoration: underline; }
.footer-tagline { font-style: italic; color: #c5a47e; }

/* Logo de la firma (columna 1) */
.footer-brand {
  max-width: 180px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1); /* blanco sobre fondo oscuro */
}

/* Franja inferior y badge centrado */
.footer-bottom {
  text-align: center;
  border-top: 1px solid #3c4a6b;
  padding-top: 20px;
  margin-top: 40px;
  font-size: 0.9rem;
  color: #a0a0a0;
}

.footer-bottom .made-by {
  width: 100%;
  display: flex;
  justify-content: center;   /* centra el badge */
  align-items: center;
  margin-top: 12px;
}

.footer-bottom .made-by img {
  max-width: 180px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

/* Pequeño ajuste responsive */
@media (max-width: 600px) {
  .footer-brand,
  .footer-bottom .made-by img { max-width: 150px; }
}

@media (max-width: 992px) {
    /* --- Layout Principal (Apilado Vertical) --- */
    .main-content-wrapper {
        flex-direction: column; /* La clave: apila el contenido y la sidebar */
        padding: 80px 30px;
        gap: 40px;
    }
    .sidebar {
        flex-basis: auto; /* Resetea el ancho fijo */
    }
    .sidebar-inner {
        position: static; /* Desactiva el 'sticky' en tablets y móviles */
    }
    
    /* --- Hero y Títulos --- */
    .hero-content h1 {
        font-size: 3.2rem;
    }
    .specialty-content h2 {
        font-size: 2.2rem;
    }
    .specialty-content h3 {
        font-size: 1.6rem;
    }
}


/* ----- Móviles Grandes (hasta 768px) ----- */
@media (max-width: 768px) {
    /* --- Header y Logo --- */
    .fixed-logo { top: 20px; left: 20px; }
    .fixed-logo img { height: 35px; }
    .main-header {
        /* Hacemos el menú flotante más pequeño y compacto */
        top: 80px; /* Lo bajamos para que no choque con el logo */
        right: 15px;
    }
    .nav-wrapper {
        padding: 10px;
        border-radius: 8px;
    }
    .main-nav a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .cta-button {
        padding: 10px 15px;
        font-size: 0.9rem;
        margin-top: 10px;
    }
    .main-header.nav-hidden {
        right: -250px; /* Ajusta la distancia de ocultación */
    }

    /* --- Hero --- */
    .page-hero {
        height: 40vh;
        min-height: 280px;
        padding-top: 0; /* Reseteamos el padding, el menú ya no está encima */
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }

    /* --- Contenido --- */
    .main-content-wrapper {
        padding: 60px 20px;
    }
    .specialty-content h2 { font-size: 2rem; }
    .specialty-content h3 { font-size: 1.5rem; }
    .specialty-content p, .service-list li { font-size: 1rem; }
    
    /* --- Pre-footer --- */
    .pre-footer-content h2 { font-size: 1.8rem; }

    /* --- Footer --- */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-brand {
        margin: 0 auto 15px;
    }
}


/* ----- Móviles Pequeños (hasta 480px) ----- */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    .main-content-wrapper {
        padding: 50px 15px;
    }
    .specialty-content h2 {
        font-size: 1.8rem;
    }
    .service-list li {
        padding-left: 30px; /* Reduce el espacio del ícono */
    }
    .service-list li::before {
        width: 22px;
        height: 22px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    /* --- Hacemos visible el botón y le damos estilo --- */
    .mobile-nav-toggle {
        display: block;
        position: relative;
        z-index: 1001;
        width: 28px;
        height: 20px;
        background: transparent;
        border: 0;
        padding: 0;
        cursor: pointer;
    }
    
    .mobile-nav-toggle::before,
    .mobile-nav-toggle::after {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        background: #fff; /* Color blanco para que se vea sobre el hero */
        border-radius: 2px;
        transition: transform 0.3s ease-out, top 0.3s ease-out, bottom 0.3s ease-out;
    }
    .mobile-nav-toggle::before { top: 0; }
    .mobile-nav-toggle::after { bottom: 0; }

    /* --- Animación a 'X' --- */
    .nav-open .mobile-nav-toggle::before { top: 8.5px; transform: rotate(45deg); }
    .nav-open .mobile-nav-toggle::after { bottom: 8.5px; transform: rotate(-45deg); }
    body.nav-open { overflow: hidden; }

    /* --- Adaptamos el header y su contenedor --- */
    .main-header { padding: 15px 20px; }
    .nav-wrapper { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border: none; padding: 0; }

    /* --- Ocultamos el menú de escritorio y mostramos el panel --- */
    .main-nav {
        display: none; /* Ocultamos los links de escritorio */
        position: fixed;
        z-index: 1000;
        inset: 0 0 0 30%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        padding: min(20vh, 10rem) 2em;
        background: rgba(26, 42, 74, 0.95);
        backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        transform: translateX(100%);
        transition: transform 0.4s ease-out;
    }

    /* Mostramos el panel cuando está abierto */
    .nav-open .main-nav {
        display: flex; /* Lo hacemos visible como flexbox */
        transform: translateX(0%);
    }

    /* --- Estilos para los links dentro del panel --- */
    .main-nav a { color: white; margin: 0; font-size: 1.1rem; }
    .main-nav a.active::after, .main-nav a:hover::after { display: none; }
    .main-nav .cta-button { border: 2px solid #c5a47e; background-color: transparent; padding: 12px 30px; border-radius: 50px; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}