/* --- VARIABLES DE MARCA --- */
:root {
    --verde-bosque: #1b3022;
    --crema-fondo: #fdfbf7;
    --terracota: #b56952;
    --texto-oscuro: #2c2c2c;
}

/* --- RESET Y GENERALES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--crema-fondo);
    color: var(--texto-oscuro);
    line-height: 1.6;
}

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
}

/* --- HEADER Y NAVEGACIÓN --- */
.main-header {
    background-color: var(--verde-bosque);
    color: white;
    padding: 0.8rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    gap: 15px;
    flex: 1; /* Permite que el logo ocupe el espacio central */
    justify-content: center;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-text {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

.menu-icon {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 40px; /* Espacio mínimo para el icono de galería */
}

/* Espaciador para equilibrar el logo en el centro */
.header-spacer { 
    min-width: 40px; 
}

/* --- SECCIÓN HERO --- */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('imagenes/bannerhero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: var(--terracota);
    color: white;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    display: inline-block;
}

/* --- GRIDS --- */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.services-grid, .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.service-card { height: 350px; position: relative; overflow: hidden; border-radius: 8px; }
.card-img { width: 100%; height: 100%; background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.card-overlay { background: rgba(27, 48, 34, 0.9); width: 100%; padding: 20px; color: white; text-align: center; }

.gallery-grid img { width: 100%; height: 280px; object-fit: cover; border-radius: 8px; }

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1001;
}

/* --- MEDIA QUERIES (CORRECCIÓN DE ENCIAMIENTO) --- */
@media (max-width: 768px) {
    .navbar {
        padding: 0 5px;
    }

    .hero {
        background-attachment: scroll !important;
        height: 60vh;
    }

    .hero-content h1 { font-size: 2.2rem; }

    /* Ajuste crítico para el logo en móvil */
    .logo-link {
        gap: 8px;
        justify-content: flex-start; /* Alinea a la izquierda para dejar espacio */
        margin-left: 10px;
    }

    .logo-img {
        height: 40px; /* Más pequeño para que quepa todo */
    }

    .logo-text {
        font-size: 0.85rem; /* Letra más pequeña */
        letter-spacing: 0;
    }

    /* Ocultamos emojis en móvil para ganar espacio */
    .logo-text::before, .logo-text::after {
        content: none !important;
    }

    .menu-text { display: none; }
    
    .whatsapp-float span { display: none; }
    .whatsapp-float { width: 55px; height: 55px; justify-content: center; border-radius: 50%; }

    .header-spacer { display: none; } /* Quitamos el equilibrador en móvil */
}
/* --- DISEÑO DE GALERÍA PREMIUM --- */
.gallery-subtitle {
    text-align: center;
    margin-bottom: 50px;
    color: #666;
    font-style: italic;
}

.gallery-masonry {
    column-count: 3; /* Divide en 3 columnas estilo Pinterest */
    column-gap: 20px;
}

.gallery-item {
    break-inside: avoid; /* Evita que la card se corte entre columnas */
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 1px solid #eee;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: 0.5s ease;
}

.item-info {
    padding: 15px;
}

.item-info span {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--terracota);
    font-weight: 700;
    letter-spacing: 1px;
}

.item-info h3 {
    font-size: 1.1rem;
    margin-top: 5px;
    color: var(--verde-bosque);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.gallery-item:hover img {
    filter: saturate(1.2);
}

/* --- ESTILOS DEL LIGHTBOX --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 48, 34, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* Ajuste móvil para Masonry */
@media (max-width: 768px) {
    .gallery-masonry {
        column-count: 1; /* En cel una sola columna */
    }
}