:root {
    --primary-color: #1a1a1a;
    --secondary-color: #ffffff;
    --accent-color: #c4a66b;
    --text-color: #2c2c2c;
    --background-color: #f9f7f4;
    --spacing-xl: 120px;
    --spacing-lg: 80px;
    --spacing-md: 40px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Header y navegación */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: rgba(249, 247, 244, 0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 5%;
    position: relative;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    letter-spacing: 3px;
}

.menu-toggle {
    position: absolute;
    right: 2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

.menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--primary-color);
    padding: 2rem;
    transition: var(--transition);
    z-index: 1001;
}

.menu-overlay.active {
    right: 0;
}

.nav-links {
    list-style: none;
    margin-top: 4rem;
}

.nav-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.2rem;
    display: block;
    padding: 1rem 0;
    transition: var(--transition);
}

/* Sección hero */
.stories-hero {
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
    padding: 0 var(--spacing-md);
    background-color: var(--background-color);
    text-align: center;
    padding: 40px 0;  /* Reducido de lo que probablemente era 60px o más */
    margin: 20px 0;   /* Reducido de lo que probablemente era 40px o más */
}

.stories-hero h1 {
    font-size: 5rem;
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 10px;  /* Reducido el espacio entre el título y el subtítulo */
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.7;
    font-weight: 300;
    letter-spacing: 1px;
    margin-top: 0;
}

/* Grid de stories */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.story-card {
    position: relative;
    width: 100%;
    height: 600px; /* Altura fija para todas las cards */
    overflow: hidden;
}

.story-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto hace que la imagen cubra todo el espacio manteniendo proporciones */
    transition: transform 0.3s ease;
}

.story-card:hover img {
    transform: scale(1.05);
}

.story-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

/* Estilos de la galería */
.gallery-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--background-color);
    z-index: 2000;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.gallery-container.active {
    display: block;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-width: 1800px;
    margin: 60px auto 0;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gallery-grid img:hover {
    opacity: 0.9;
}

.close-gallery {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 50px;
    height: 50px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-gallery:hover {
    background: var(--accent-color);
}

/* Media queries */
@media (max-width: 1024px) {
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stories-hero h1 {
        font-size: 3rem;
    }
    
    .story-card {
        padding: 2rem;
    }

    .story-card img {
        height: 400px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .story-card {
        margin: 0 -2rem;
    }
    
    .stories-hero h1 {
        font-size: 2.5rem;
    }
}
