:root {
    --bg-color: #fdfcf8;
    --section-alt: #f4f1ea;
    --text-primary: #2c2c2c;
    --text-secondary: #555555;
    --gold: #d4af37;
    --gold-dark: #b8860b;
    --white: #ffffff;
    --accent-color: #e5e0d3;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --container-width: 1200px;
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Layout --- */

section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    z-index: 2;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--gold);
}

/* --- Components --- */

.btn {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--gold);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
    background-color: var(--gold-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(253, 252, 248, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a:hover {
    color: var(--gold);
}

/* --- Hero --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: 8px;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    width: auto;
    margin-left: auto;
    object-fit: contain;
}

/* --- Features / Qué aprenderás --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 3.5rem 2.5rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.9);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* --- Timeline / Contenido --- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--accent-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white);
    border: 4px solid var(--gold);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--white);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* --- Audience / Formato --- */
.info-section {
    background-color: var(--section-alt);
    padding: 80px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.info-grid.single-column {
    grid-template-columns: 1fr;
}

/* --- Author --- */
.author-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.author-image img {
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
}

.author-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.author-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.author-content .highlight-text {
    color: var(--gold-dark);
    font-size: 1.2rem;
    border-left: 3px solid var(--gold);
    padding-left: 1.5rem;
    margin: 2.5rem 0;
}

.signature {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-primary);
    margin-top: 2rem;
}

/* --- CTA --- */
.cta-section {
    background-color: var(--text-primary);
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 2rem;
}

.cta-section p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: var(--accent-color);
}

/* --- Footer --- */
footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

.small-text {
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 400;
}

/* --- Contact --- */
.contact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.contact-item {
    flex: 1;
    min-width: 280px;
    padding: 0 1rem;
}

.contact-item p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.contact-link {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gold-dark);
    display: inline-block;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.contact-link:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* --- Mobile --- */
@media (max-width: 768px) {

    .hero-grid,
    .info-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin: 0 auto 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 21px;
    }

    .right {
        left: 0%;
    }
}

/* Obra Detail Page */
.back-link {
    color: var(--gold-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: inline-block;
    margin-bottom: 2rem;
}
.back-link:hover {
    color: var(--gold);
    transform: translateX(-5px);
}
.gallery-display {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.main-image-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    background: #fdfdfd;
}
.main-image-container img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.thumbs-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.thumbs-gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 3px solid transparent;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.thumbs-gallery img:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .thumbs-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
    .main-image-container img {
        max-height: 60vh;
    }
}
