/* Variables de color y fuentes */
:root {
    --primary: #c68e68; /* Tono terracota/canela suave */
    --secondary: #fdf6e3; /* Crema muy claro */
    --dark: #4a403a; /* Marrón oscuro para texto */
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --font-handwriting: 'Dancing Script', cursive; /* Nueva fuente artesanal */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    background-color: var(--secondary);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary);
}

.btn-secondary {
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-top: 15px;
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 5px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo h1 {
    font-size: 2.5rem;
    color: var(--primary);
    letter-spacing: 4px;
    line-height: 1.1; /* Ajuste para que el subtítulo quede cerca */
    transition: font-size 0.3s ease;
    display: flex;
    flex-direction: column;
}

.logo-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--dark);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 5px;
    font-weight: 400;
}

.logo-img {
    height: 150px; /* Tamaño equilibrado y elegante */
    width: auto;
    transition: height 0.3s ease;
}

/* Estilos Sticky Header (al hacer scroll) */
.header.scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.header.scrolled .logo-img {
    height: 90px;
}
.header.scrolled .logo h1 {
    font-size: 1.8rem;
}
.header.scrolled .logo-subtitle {
    font-size: 0.7rem; /* Se achica proporcionalmente */
}

.nav-list {
    display: flex;
    gap: 0; /* Quitamos el gap fijo para usar padding y los separadores */
    align-items: center;
}

.nav-list li {
    position: relative;
    padding: 0 25px; /* Espacio generoso alrededor de cada ítem */
}

/* Separador delicado vertical (Efecto degradado y brillo) */
.nav-list li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 18px; /* Altura sutil, no ocupa todo el alto */
    background: linear-gradient(to bottom, transparent, var(--primary), transparent); /* Se desvanece en las puntas */
    box-shadow: 0 0 3px var(--primary); /* Un brillo muy suave (sombreado) */
    opacity: 0.8;
}

.nav-list a:hover {
    color: var(--primary);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden; /* Importante: evita que la imagen se salga al hacer zoom */
    background: #2c2c2c url('img/CroissantFamilia.jpeg') no-repeat center center/cover; /* Fallback de seguridad */
}

/* Video de fondo para el Hero */
.hero-video {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    object-fit: cover; /* Asegura que el video cubra todo el espacio sin deformarse */
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1; /* Asegura que la sombra esté sobre la foto */
}

.hero-content {
    position: relative;
    z-index: 2; /* Asegura que el texto esté sobre todo */
    animation: fadeInUp 2s ease-out; /* Efecto de aparición suave */
}

.hero h2 {
    font-family: var(--font-handwriting); /* Aplicamos la fuente manuscrita */
    font-size: 4.5rem; /* Un poco más grande para que luzca */
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3); /* Sombra suave para legibilidad */
}

/* Animación de aparición para el texto */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sobre Mí */
.section { padding: 80px 0; }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 15px 15px 0 var(--primary);
}

.about-text h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Carousel */
.gallery { background-color: #fff; text-align: center; }
.section-title { font-size: 2.5rem; margin-bottom: 40px; color: var(--primary); text-align: center; }

.carousel-container {
    max-width: 800px;
    position: relative;
    margin: auto;
    border-radius: 10px;
    overflow: hidden;
}

.carousel-slide { display: none; }

.carousel-slide img { 
    width: 100%; 
    height: 450px; 
    object-fit: cover; /* Ajuste para cubrir todo el espacio sin bordes */
    transition: transform 0.5s ease; /* Transición suave para el efecto */
}

/* Efectito: Zoom suave al pasar el mouse */
.carousel-slide img:hover {
    transform: scale(1.05);
}

.caption {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    font-family: var(--font-heading);
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    background-color: rgba(0,0,0,0.3);
    user-select: none;
}
.next { right: 0; border-radius: 3px 0 0 3px; }
.prev { left: 0; border-radius: 0 3px 3px 0; }
.prev:hover, .next:hover { background-color: rgba(0,0,0,0.8); }

.fade { animation-name: fade; animation-duration: 3s; }
@keyframes fade { from {opacity: .4} to {opacity: 1} }

/* Cursos */
.courses { text-align: center; }
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Ajustado para celulares pequeños */
    gap: 30px;
    margin-top: 40px;
}

.course-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s;
}
.course-card:hover { transform: translateY(-10px); }

.card-header { background: var(--primary); color: var(--white); padding: 20px; }
.card-body { padding: 30px; }
.card-body ul { text-align: left; margin: 20px 0; }
.card-body ul li i { color: var(--primary); margin-right: 10px; }

/* Formulario de Contacto */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-body);
}

/* Footer */
.footer {
    background: var(--white); /* Fondo claro para que resalte el logo */
    color: var(--dark);
    border-top: 1px solid rgba(0,0,0,0.1); /* Línea suave y delicada */
    text-align: center;
    padding: 50px 0;
}
.footer-logo-link {
    display: inline-block;
    margin-bottom: 30px; /* Más espacio para separar de los links sociales */
    transition: transform 0.3s ease;
}

.footer-logo-link:hover {
    transform: scale(1.05);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo-img {
    height: 100px;
    width: auto;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.footer-logo-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary);
    letter-spacing: 3px;
    line-height: 1.1;
    font-weight: 600;
}

.footer-logo-subtitle {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 5px;
    font-weight: 400;
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}
.social-btn {
    padding: 12px 30px;
    border-radius: 50px; /* Diseño redondeado y elegante */
    border: 1px solid var(--primary);
    background: transparent; /* Fondo transparente */
    color: var(--primary);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}
.social-btn:hover {
    transform: translateY(-3px);
    background: var(--primary);
    color: var(--white);
}

/* Responsive */

/* Página Sobre Mí Detallada */
.about-detailed-container {
    max-width: 900px;
    text-align: center;
}

.about-detailed-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
    text-align: left;
    margin-top: 40px;
}

.about-detailed-text p {
    margin-bottom: 15px;
}

.btn-container {
    margin-top: 30px;
}

/* Página Galería (Grid Moderno) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /* Ajustado para que entre bien en celulares pequeños */
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: 300px; /* Altura fija para uniformidad */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* Asegura que la imagen esté centrada */
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1); /* Efecto Zoom al pasar el mouse */
}

/* Overlay de descripción en Galería */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 64, 58, 0.85); /* Color dark con transparencia */
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    text-align: center;
    pointer-events: none; /* Permite que el click atraviese el overlay y llegue a la imagen */
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay p {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.4;
}

/* Sección Testimonios */
.testimonials {
    background-color: #f9f3ee; /* Un tono ligeramente diferente para separar secciones */
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.testimonial-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
}

.quote-icon {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-card .author {
    font-weight: bold;
    color: var(--dark);
}

.testimonial-card .stars {
    color: #FFD700; /* Color dorado */
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Formulario de Reseñas */
.review-form-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.review-form input, .review-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-body);
}

/* Estrellas Interactivas (CSS Only) */
.rating-css {
    display: flex;
    flex-direction: row-reverse; /* Para que al pasar el mouse se iluminen las anteriores */
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}
.rating-css input { display: none; }
.rating-css label {
    font-size: 30px;
    color: #ccc;
    cursor: pointer;
    transition: 0.2s;
}
.rating-css label:before { content: '\2605'; } /* Símbolo de estrella */
.rating-css input:checked ~ label,
.rating-css label:hover,
.rating-css label:hover ~ label {
    color: #FFD700;
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px; left: 0; width: 100%;
        background: var(--white);
        text-align: center;
        padding: 20px 0;
    }

    .nav-list li {
        padding: 15px 0; /* Más espacio vertical en celular */
    }

    /* Transformación: El separador se vuelve horizontal en móviles */
    .nav-list li:not(:last-child)::after {
        width: 50px; /* Una línea corta y elegante en el centro */
        height: 1px;
        top: auto; bottom: 0;
        left: 50%; right: auto;
        transform: translateX(-50%);
        background: linear-gradient(to right, transparent, var(--primary), transparent);
    }

    .nav-list.active { display: flex; }
    .hamburger { display: block; }
    .about-grid { grid-template-columns: 1fr; }
    .hero { height: 60vh; } /* Ajuste para que la imagen se vea mejor en móviles */
    
    /* Ajustes móviles adicionales */
    .hero h2 { font-size: 2.5rem; }
    .logo-img, .header.scrolled .logo-img { height: 60px; } /* Logo más chico en celular para que entre bien */
    .logo h1, .header.scrolled .logo h1 { font-size: 1.4rem; }
    .logo-subtitle, .header.scrolled .logo-subtitle { font-size: 0.6rem; letter-spacing: 1px; } /* Ajuste fino para móvil */
    .carousel-slide img { height: 300px; } /* Altura de fotos ajustada para móvil */
    .section { padding: 50px 0; }
    .contact-form { padding: 0 10px; }

    /* Ajustes para página sobre mi detallada */
    .about-detailed-content {
        grid-template-columns: 1fr;
    }
}

/* Ajuste específico para el carrusel en la página Sobre Mí */
.about-img .carousel-slide img {
    width: 100%;
    height: 500px; /* Altura fija para evitar que el texto salte */
    object-fit: cover; /* Ajuste perfecto sin deformar la imagen */
    box-shadow: 15px 15px 0 var(--primary);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .about-img .carousel-slide img {
        height: 400px; /* Altura ajustada para celulares */
    }
}

/* Animaciones al hacer Scroll (Reveal) */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox (Visor de imágenes en pantalla completa) */
.lightbox {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 2000; /* Por encima de todo */
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9); /* Fondo oscuro */
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto; /* Importante: deja que la imagen defina su ancho real */
    max-width: 95%; /* Responsivo: ocupa casi todo el ancho en celular */
    max-height: 75vh; /* Un poquito más de altura permitida */
    object-fit: contain;
    border-radius: 12px; /* El toque delicado: bordes suaves */
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); /* Sombra difusa para darle profundidad */
    animation: zoomIn 0.3s;
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Texto del Lightbox */
.lightbox-caption {
    margin: 15px auto 0;
    width: 80%;
    text-align: center;
    color: #f1f1f1;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.4;
}

@keyframes zoomIn {
    from {transform:scale(0)}
    to {transform:scale(1)}
}
