:root {
    --primary: #c5a059;
    --primary-dark: #a68549;
    --dark: #0a1118;
    --secondary: #1e293b;
    --light: #f4f7f6;
    --white: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 4px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--white);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.container.narrow {
    max-width: 650px;
}

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--light);
}

.bg-dark {
    background-color: var(--dark);
}

.text-white {
    color: var(--white);
}

.text-center {
    text-align: center;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.hidden {
    display: none;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 25px 0;
    transition: 0.3s;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 17, 24, 0.95);
    /* Dark background when scrolled */
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: var(--shadow);
}

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

.logo {
    text-decoration: none;
    color: var(--white);
    /* White logo for contrast on dark bg */
    font-size: 1.2rem;
    letter-spacing: 2px;
}

/* Mobile Menu & Updated Links */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

.mobile-menu-btn .bar {
    width: 25px;
    height: 2px;
    background-color: var(--white);
    /* White bars */
    transition: 0.3s;
}

/* Mobile Nav Styles */
.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--dark);
    /* Changed to dark for white text visibility */
    flex-direction: column;
    padding: 100px 40px;
    transition: 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 30px;
}

.nav-links.active {
    right: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    /* White links */
    font-weight: 500;
    font-size: 1.1rem;
    text-transform: uppercase;
}

/* Desktop Only / Mobile Only utilities */
.desktop-only {
    display: none;
}

.mobile-only {
    display: inline-block;
    text-align: center;
}

/* HERO */
.hero {
    padding-top: 150px;
    position: relative;
    background-image: url('assets/images/meditation-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 17, 24, 0.7);
    /* Overlay para contraste */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.eyebrow {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 15px;
}

.headline {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    color: var(--white);
    /* Changed to white */
    margin-bottom: 25px;
}

.subheadline {
    font-size: 1.1rem;
    color: #cbd5e1;
    /* Lighter grey */
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-grid {
    display: grid;
    gap: 40px;
    align-items: center;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.profile-placeholder {
    display: none;
}

.hero-image {
    width: 100%;
    max-width: 450px;
    border-radius: var(--radius);
    box-shadow: 20px 20px 0px var(--primary);
    aspect-ratio: 4/5;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* CARDS */
.grid-3 {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
    /* Mobile first */
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.book-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    transition: 0.3s;
    border: 1px solid var(--light);
    /* Border for better definition */
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.book-cover {
    background: #000000;
    /* Black background to blend with images */
    height: 300px;
    border-radius: var(--radius);
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-design {
    padding: 20px;
    color: var(--white);
    font-weight: bold;
    font-size: 1.3rem;
    text-align: center;
}

.book-image-cover {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.book-card:hover .book-image-cover {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

.book-design.secondary {
    background: var(--secondary);
}

.book-design.dark {
    background: var(--dark);
}

/* BOOK CARD CONTENT */
.book-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 15px 0 25px 0;
    text-align: left;
}

/* Fix for consistent height in collapsed state */
.book-desc-content {
    height: 120px;
    /* Fixed height for all */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    transition: all 0.5s ease;
}

.book-desc-content.expanded {
    height: auto;
    /* Allow full height */
    mask-image: none;
    -webkit-mask-image: none;
}

/* Remove old extra-content styles */
.book-desc p {
    margin-bottom: 15px;
}

.book-features {
    list-style: none;
    margin: 20px 0;
}

.book-features li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.extra-content {
    transition: all 0.3s ease;
}

.extra-content.hidden {
    display: none;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-decoration: underline;
}

.read-more-btn:hover {
    color: var(--primary-dark);
}

.price {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 15px 0;
    color: var(--dark);
}

/* BUTTONS */
.btn {
    padding: 14px 28px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    display: inline-block;
}

/* Contrast Improvement: White text on Gold is risky. 
   Option A: Darken gold. Option B: Dark text. 
   Using Option B for High Contrast Premium look */
.btn-primary {
    background: var(--primary);
    color: var(--dark);
    /* Better contrast */
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--dark);
    color: var(--white);
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--dark);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Focus States for A11y */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* STEPS */
.steps-grid {
    display: grid;
    gap: 40px;
    margin-top: 50px;
}

.step {
    border-left: 3px solid var(--primary);
    padding-left: 20px;
}

.step-number {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

/* CONTACTO CON IMAGEN DE FONDO */
#contacto {
    position: relative;
    /* Background removed, back to dark default or none */
    background: var(--dark);
}

#contacto .container {
    position: relative;
    z-index: 2;
}

/* FORM */
.form-capture {
    background: var(--secondary);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


input,
.select-field {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-radius: var(--radius);
    font-family: inherit;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* ACCORDION */
.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-header {
    width: 100%;
    padding: 20px 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark);
}

.accordion-header .icon {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--primary);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: 0.3s ease-out;
    color: var(--text-muted);
}

.accordion-item.active .accordion-body {
    max-height: 300px;
    padding-bottom: 20px;
}

/* FOOTER */
.footer {
    padding: 50px 0;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    background: var(--light);
}

.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* DESKTOP MEDIA QUERY */
@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }

    .nav-links {
        position: static;
        height: auto;
        width: auto;
        background: transparent;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        transform: none;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .desktop-only {
        display: inline-block;
    }

    .mobile-only {
        display: none;
    }

    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}