/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    background: linear-gradient(135deg, #1a0f0a 0%, #2d1810 25%, #b87333 40%, #d4af37 50%, #b87333 60%, #2d1810 75%, #1a0f0a 100%);
    color: #f1f1f1;
    min-height: 100vh;
    line-height: 1.7;
    position: relative;
    overflow-x: hidden;
}

/* ========== DECORACIÓN NAVIDEÑA DE FONDO ========== */
body::before {
    content: '⭐ 🌟 ✨ 💫';
    position: fixed;
    top: 10%;
    left: 5%;
    font-size: 2rem;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
    animation: floatStars 8s ease-in-out infinite;
    letter-spacing: 60px;
}

body::after {
    content: '🕊️';
    position: fixed;
    bottom: 8%;
    right: 5%;
    font-size: 3rem;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: twinkle 3s ease-in-out infinite 1s;
}

@keyframes floatStars {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.1; }
    25% { transform: translateY(-20px) translateX(15px); opacity: 0.15; }
    50% { transform: translateY(-40px) translateX(-10px); opacity: 0.2; }
    75% { transform: translateY(-20px) translateX(8px); opacity: 0.15; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.2); }
}

/* Header */
header {
    background: linear-gradient(135deg, rgba(184, 115, 51, 0.25), rgba(212, 175, 55, 0.2));
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 25px rgba(212, 175, 55, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid rgba(212, 175, 55, 0.5);
}

header::before {
    content: '🌙';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    animation: glow 4s ease-in-out infinite;
}

header::after {
    content: '🌙';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    animation: glow 4s ease-in-out infinite 2s;
}

@keyframes glow {
    0%, 100% { opacity: 0.5; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.5); }
}

.header-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.menu a {
    color: #f5e6d3;
    text-decoration: none;
    padding: 0.85rem 1.8rem;
    display: block;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid rgba(212, 175, 55, 0.4);
    background: rgba(184, 115, 51, 0.15);
    letter-spacing: 0.8px;
}

.menu a:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.4), rgba(184, 115, 51, 0.3));
    color: #ffd700;
    border-color: #d4af37;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.page-divider {
    height: 3px;
    background: linear-gradient(to right, transparent, #d4af37, #b87333, #d4af37, transparent);
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 10px;
}

/* Container principal */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 4rem 2.5rem;
}

/* Page header */
.page-header {
    text-align: center;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.2), rgba(184, 115, 51, 0.15));
    padding: 4rem 3rem;
    border-radius: 20px;
    margin-bottom: 5rem;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.4);
    border: 3px solid rgba(212, 175, 55, 0.5);
    position: relative;
    backdrop-filter: blur(10px);
}

.page-header::before {
    content: '✨';
    position: absolute;
    top: 25px;
    left: 35px;
    font-size: 2.5rem;
    animation: sparkleHeader 2s ease-in-out infinite;
}

.page-header::after {
    content: '✨';
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 2.5rem;
    animation: sparkleHeader 2s ease-in-out infinite 1s;
}

@keyframes sparkleHeader {
    0%, 100% { opacity: 0.4; transform: rotate(0deg) scale(1); }
    50% { opacity: 1; transform: rotate(15deg) scale(1.2); }
}

.header-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(3px 3px 8px rgba(212, 175, 55, 0.6));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.main-title {
    font-size: 3.2rem;
    color: #ffd700;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 3px 3px 10px rgba(212, 175, 55, 0.8);
}

.subtitle {
    font-size: 2rem;
    color: #f5e6d3;
    margin-bottom: 2rem;
    font-style: italic;
    font-weight: 400;
}

.intro-text {
    font-size: 1.2rem;
    color: #e6d5b8;
    max-width: 800px;
    margin: 0 auto;
    line-height: 2;
}

/* Section headings */
.section-heading {
    font-size: 2.5rem;
    color: #ffd700;
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(212, 175, 55, 0.6);
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 1rem;
}

.section-heading::before {
    content: '👗';
    position: absolute;
    left: 50%;
    top: -50px;
    transform: translateX(-50%);
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #d4af37, #b87333, #d4af37, transparent);
    border-radius: 10px;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-15px); }
}

/* ========== SECCIÓN: Diagrama del Hábito ========== */
.habit-diagram-section {
    margin-bottom: 5rem;
}

.diagram-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.18), rgba(184, 115, 51, 0.12));
    padding: 4rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.4);
    border: 3px solid rgba(212, 175, 55, 0.5);
    position: relative;
}

.diagram-container::before {
    content: '🕊️';
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 2rem;
    opacity: 0.3;
}

.diagram-image {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    text-align: center;
}

.diagram-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 15px;
    box-shadow: 0 10px 35px rgba(212, 175, 55, 0.5);
    border: 4px solid #d4af37;
    transition: transform 0.3s ease;
}

.diagram-image img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 15px 50px rgba(212, 175, 55, 0.7);
}

.diagram-legend {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.diagram-legend h3 {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 1rem;
    text-shadow: 1px 1px 5px rgba(212, 175, 55, 0.5);
}

.legend-list {
    list-style: none;
    padding: 0;
}

.legend-list li {
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.2), rgba(184, 115, 51, 0.15));
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.3s ease;
    border-left: 4px solid #d4af37;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.legend-list li:hover {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.3), rgba(184, 115, 51, 0.2));
    transform: translateX(10px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
}

.legend-number {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #d4af37, #b87333);
    color: #1a0f0a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.legend-list li strong {
    color: #ffd700;
}

/* Components section */
.components-section {
    margin-bottom: 5rem;
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.component-card {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.18), rgba(184, 115, 51, 0.12));
    border-radius: 18px;
    padding: 3rem 2.5rem;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(212, 175, 55, 0.5);
    position: relative;
    overflow: hidden;
}

.component-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    transition: left 0.6s ease;
}

.component-card:hover::before {
    left: 100%;
}

.component-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.6);
    border-color: #ffd700;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.25), rgba(184, 115, 51, 0.18));
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.component-number {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #d4af37, #b87333);
    color: #1a0f0a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
}

.component-icon {
    font-size: 2.8rem;
    filter: drop-shadow(2px 2px 6px rgba(212, 175, 55, 0.5));
    animation: iconFloat 3s ease-in-out infinite;
}

.component-title {
    font-size: 1.6rem;
    color: #ffd700;
    margin-bottom: 1.2rem;
    font-weight: 700;
    text-shadow: 1px 1px 4px rgba(212, 175, 55, 0.4);
}

.component-description {
    color: #f5e6d3;
    line-height: 2;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.color-indicator {
    height: 10px;
    border-radius: 6px;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.white-indicator {
    background: linear-gradient(to right, #ffffff, #f8f9fa, #e9ecef);
    border: 2px solid #d4af37;
}

.black-indicator {
    background: linear-gradient(to right, #1a0f0a, #2d1810, #1a0f0a);
    border: 2px solid #b87333;
}

.special-indicator {
    background: linear-gradient(to right, #b87333, #d4af37, #ffd700);
    border: 2px solid #f5e6d3;
}

/* Symbolism section */
.symbolism-section {
    margin-bottom: 4rem;
}

.symbolism-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.symbolism-card {
    padding: 3.5rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.4);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.symbolism-card::before {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.symbolism-card:hover::before {
    opacity: 0.4;
}

.white-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(248, 249, 250, 0.1));
    border: 3px solid rgba(212, 175, 55, 0.6);
}

.black-card {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.25), rgba(184, 115, 51, 0.2));
    border: 3px solid rgba(212, 175, 55, 0.7);
}

.symbolism-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 60px rgba(212, 175, 55, 0.6);
}

.symbol-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.symbol-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.white-circle {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 4px solid #d4af37;
}

.black-circle {
    background: linear-gradient(135deg, #1a0f0a, #0a0a0a);
    border: 4px solid #b87333;
}

.white-card h3 {
    color: #ffd700;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 1px 1px 5px rgba(212, 175, 55, 0.5);
}

.black-card h3 {
    color: #ffd700;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 1px 1px 5px rgba(212, 175, 55, 0.5);
}

.symbol-meanings {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.meaning-tag {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.2);
}

.white-card .meaning-tag {
    background: rgba(212, 175, 55, 0.3);
    color: #ffd700;
    border: 2px solid rgba(212, 175, 55, 0.5);
}

.white-card .meaning-tag:hover {
    background: rgba(212, 175, 55, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.5);
}

.black-card .meaning-tag {
    background: rgba(212, 175, 55, 0.4);
    color: #ffd700;
    border: 2px solid rgba(212, 175, 55, 0.6);
}

.black-card .meaning-tag:hover {
    background: rgba(212, 175, 55, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.7);
}

/* Union message */
.union-message {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.25), rgba(184, 115, 51, 0.2));
    padding: 4rem 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.5);
    border: 3px solid rgba(212, 175, 55, 0.6);
    position: relative;
}

.union-message::before {
    content: '☯️';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

.union-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(2px 2px 8px rgba(212, 175, 55, 0.6));
}

.union-message p {
    font-size: 1.4rem;
    color: #ffd700;
    line-height: 2.2;
    text-shadow: 1px 1px 4px rgba(212, 175, 55, 0.4);
}

.union-message strong {
    color: #f5e6d3;
    font-weight: 700;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(184, 115, 51, 0.2), rgba(212, 175, 55, 0.25));
    color: #d4af37;
    margin-top: 5rem;
    border-top: 3px solid rgba(212, 175, 55, 0.5);
    position: relative;
    box-shadow: 0 -10px 40px rgba(212, 175, 55, 0.3);
}

footer::before {
    content: '🌟';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    animation: footerStar 4s ease-in-out infinite;
}

footer::after {
    content: '⭐ ✨ 💫 ✨ ⭐';
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    opacity: 0.4;
    letter-spacing: 20px;
}

@keyframes footerStar {
    0%, 100% { transform: translateX(-50%) scale(1) rotate(0deg); opacity: 0.6; }
    50% { transform: translateX(-50%) scale(1.2) rotate(180deg); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    body::before {
        font-size: 1.5rem;
        letter-spacing: 40px;
    }

    header::before,
    header::after {
        font-size: 1.3rem;
    }

    .main-title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.5rem;
    }

    .section-heading {
        font-size: 2rem;
    }

    .section-heading::before {
        font-size: 2rem;
        top: -40px;
    }

    .components-grid,
    .symbolism-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .menu a {
        text-align: center;
        padding: 0.75rem 1.5rem;
    }

    .container {
        padding: 2.5rem 1.5rem;
    }

    .diagram-container {
        flex-direction: column;
        padding: 3rem 2rem;
        gap: 3rem;
    }

    .diagram-image img {
        max-width: 280px;
    }

    .diagram-legend h3 {
        font-size: 1.6rem;
    }

    .legend-list li {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .component-card {
        padding: 2.5rem 2rem;
    }

    .symbolism-card {
        padding: 2.5rem 2rem;
    }

    .union-message {
        padding: 3rem 2rem;
    }

    .union-message::before {
        font-size: 3rem;
        top: -30px;
    }

    footer::before {
        font-size: 2rem;
    }

    footer::after {
        font-size: 1rem;
        letter-spacing: 15px;
    }
}