:root {
    --bg-color: #f7f5f0;
    --text-primary: #2d2a26;
    --text-secondary: #5c5750;
    --card-bg: rgba(255, 255, 255, 0.7);
    --accent: #b36b39;
    --accent-hover: #8f542b;
    --font-heading: 'Outfit', sans-serif;
    --font-text: 'Lora', serif;
}

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

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

/* Fondo de partículas / museo */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at center, #ffffff 0%, #ebe7de 100%);
    overflow: hidden;
}

.particle {
    position: absolute;
    background-color: rgba(179, 107, 57, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) scale(0.5); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1.5); opacity: 0; }
}

/* Header */
header {
    text-align: center;
    padding: 4rem 2rem 2rem;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 300;
}

/* Main Menu */
#main-menu {
    transition: opacity 0.5s ease, transform 0.5s ease;
    padding-bottom: 4rem;
}

#main-menu.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1); /* Zoom in al ocultar */
    position: absolute;
    width: 100%;
}

.cultures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.culture-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    height: 350px;
}

.culture-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(179, 107, 57, 0.15);
}

.culture-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.culture-card:hover img {
    transform: scale(1.1);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.card-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Transición cinematográfica */
#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

#transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Culture Detail Section */
#culture-detail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(20px);
}

#culture-detail.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

#back-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    z-index: 100;
}

#back-btn:hover {
    background: var(--text-primary);
    color: white;
    transform: translateX(-5px);
}

.detail-container {
    max-width: 1000px;
    margin: 6rem auto 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 30px;
    padding: 4rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

#detail-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 2rem;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: -1px;
}

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

.text-section h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    padding-bottom: 0.3rem;
}

.text-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.text-section ul {
    list-style-type: none;
}

.text-section ul li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.text-section ul li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.image-gallery img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    object-fit: cover;
    height: 100%;
    max-height: 500px;
    transition: transform 0.5s ease;
}

.image-gallery img:hover {
    transform: scale(1.02);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 { font-size: 2.5rem; }
    .detail-content { grid-template-columns: 1fr; gap: 2rem; }
    .detail-container { padding: 2rem; margin-top: 5rem; }
    #detail-title { font-size: 2.5rem; }
    #back-btn { top: 1rem; left: 1rem; font-size: 0.9rem; padding: 0.6rem 1rem; }
}
