/* Variables de Color Hiperrealistas y de Naturaleza */
:root {
    --color-bg: #F4F7F2; /* Tono lino natural suave */
    --color-leaf-dark: #2B4E38; /* Verde bosque profundo */
    --color-leaf-light: #5A7F61; /* Verde salvia */
    --color-earth: #8C6A50; /* Marrón tierra arcilla */
    --color-sand: #D9CBB8; /* Arena clara */
    --color-water: #8EB7B8; /* Azul agua cristalina */
    --color-text-main: #333333;
    --color-text-light: #666666;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
}

/* HERO SECTION (Realismo y Calma) */
.hero {
    height: 70vh;
    background-image: url('../img/aloe_hero_bg.png'); /* Imagen hiperrealista generada por IA */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(43,78,56,0.6), rgba(244,247,242,0.9));
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 20px;
    animation: fadeIn 2s ease-in-out;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.3);
}

.hero-content .subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 30px;
    color: #E8F0E5;
}

.btn-primary {
    background-color: var(--color-leaf-light);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(90, 127, 97, 0.4);
}

.btn-primary:hover {
    background-color: var(--color-leaf-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 78, 56, 0.5);
}

/* NAVIGATION */
.main-nav {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.main-nav li {
    margin: 0 20px;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 600;
    font-size: 1.1rem;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--color-leaf-dark);
    border-bottom: 2px solid var(--color-leaf-light);
}

/* CONTAINER & SECTIONS */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 50vh;
}

.content-section {
    display: none;
    animation: fadeIn 0.8s ease;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    font-family: var(--font-heading);
    color: var(--color-leaf-dark);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.section-desc {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* GRID & CARDS */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border-top: 4px solid var(--color-leaf-light);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(43, 78, 56, 0.15);
}

.card-img {
    height: 200px;
    background-color: var(--color-sand);
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 25px;
}

.card h3 {
    font-family: var(--font-heading);
    color: var(--color-earth);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(43,78,56,0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--color-bg);
    padding: 40px;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease;
}

.close-btn {
    position: absolute;
    top: 20px; right: 25px;
    font-size: 2rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--color-leaf-dark);
}

.modal-body h2 {
    font-family: var(--font-heading);
    color: var(--color-leaf-dark);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-sand);
    padding-bottom: 10px;
}

.pedagogic-note {
    background-color: rgba(142, 183, 184, 0.15);
    border-left: 4px solid var(--color-water);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    font-style: italic;
    color: var(--color-leaf-dark);
}

/* FOOTER */
footer {
    background-color: var(--color-leaf-dark);
    color: var(--color-sand);
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 3rem; }
    .main-nav ul { flex-direction: column; align-items: center; }
    .main-nav li { margin: 10px 0; }
    .content-section h2 { font-size: 2rem; }
}

/* ANIMACIONES */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FLIP CARDS (Módulo Interactivo) */
.flip-card {
    background-color: transparent;
    height: 280px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-radius: 16px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.flip-card-front {
    background-color: var(--color-bg);
    color: var(--color-leaf-dark);
    border: 2px solid var(--color-sand);
}

.flip-card-front h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-top: 15px;
}

.flip-card-back {
    background-color: var(--color-leaf-dark);
    color: var(--color-sand);
    transform: rotateY(180deg);
}

.flip-card-back h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #fff;
}

.flip-card-back p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.module-header {
    text-align: center;
    margin: 60px 0 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(43,78,56,0.05), rgba(142,183,184,0.1));
    border-radius: 20px;
}

.module-header h2 {
    font-family: var(--font-heading);
    color: var(--color-leaf-dark);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.module-header p {
    color: var(--color-text-light);
    font-size: 1.2rem;
}

/* CARRUSEL ORÁCULO ANCESTRAL */
.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.carousel-container::-webkit-scrollbar {
    height: 8px;
}
.carousel-container::-webkit-scrollbar-thumb {
    background-color: var(--color-sand);
    border-radius: 4px;
}

.carousel-item {
    flex: 0 0 300px;
    scroll-snap-align: start;
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 4px solid var(--color-earth);
    transition: transform 0.3s;
}

.carousel-item:hover {
    transform: translateY(-5px);
}

.carousel-item h4 {
    color: var(--color-leaf-dark);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.carousel-item .cultura {
    font-size: 0.85rem;
    color: var(--color-earth);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

/* BOTONES SELECTORES DE ALQUIMIA */
.filter-btn {
    background-color: white;
    border: 2px solid var(--color-sand);
    color: var(--color-text);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--color-leaf);
    background-color: rgba(142, 183, 184, 0.1);
}

.filter-btn.active {
    background-color: var(--color-leaf-dark);
    color: white;
    border-color: var(--color-leaf-dark);
    box-shadow: 0 4px 10px rgba(43,78,56,0.3);
}
