@font-face {
    font-family: 'FREITAG TRIAL HEAVY';
    src: url('../assets/fonts/Freitag-Heavy-trial.ttf') format('truetype');
}

@font-face {
    font-family: 'Quicksand Book';
    src: url('../assets/fonts/Quicksand_Book.otf') format('opentype');
}

:root {
    --color-red: #EE4A31;
    --color-orange: #F37423;
    --color-yellow: #FDDB33;
    --color-pink: #F387AB;
    --color-blue: #2AABE2;
    --primary-color: #2AABE2;
    --secondary-color: #F37423;
    --accent-color: #EE4A31;
    --info-color: #6366f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand Book', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    font-weight: 400;
    position: relative;
}

/* Background dynamic container */
.background-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.animated-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(42,171,226,0.15), rgba(243,116,35,0.12) 30%, rgba(253,219,51,0.10) 60%, rgba(243,135,171,0.08) 90%);
    filter: blur(40px) saturate(120%);
    transform: translate3d(var(--bg-x,0px), var(--bg-y,0px), 0) scale(1.05);
    transition: transform 0.12s linear;
    animation: gradientShift 12s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { transform: translate3d(0px,0px,0) scale(1.03) rotate(0deg); }
    25% { transform: translate3d(-20px,10px,0) scale(1.05) rotate(2deg); }
    50% { transform: translate3d(0px,20px,0) scale(1.06) rotate(0deg); }
    75% { transform: translate3d(20px,10px,0) scale(1.05) rotate(-2deg); }
    100% { transform: translate3d(0px,0px,0) scale(1.03) rotate(0deg); }
}

.blobs {
    position: absolute;
    inset: 0;
    mix-blend-mode: screen;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px) saturate(140%);
    opacity: 0.9;
    transform: translate3d(var(--tx,0px), var(--ty,0px), 0) scale(var(--s,1));
    transition: transform 0.12s linear;
}

.blob-1 {
    width: 420px;
    height: 420px;
    left: -8%;
    top: 8%;
    background: radial-gradient(circle at 30% 30%, rgba(42,171,226,0.85), rgba(42,171,226,0.35) 50%, transparent 70%);
    animation: floatBlob 10s ease-in-out infinite;
}

.blob-2 {
    width: 360px;
    height: 360px;
    right: -6%;
    top: 20%;
    background: radial-gradient(circle at 30% 30%, rgba(243,116,35,0.85), rgba(243,116,35,0.35) 50%, transparent 70%);
    animation: floatBlob 12s ease-in-out infinite alternate;
}

.blob-3 {
    width: 500px;
    height: 500px;
    left: 20%;
    bottom: -10%;
    background: radial-gradient(circle at 40% 40%, rgba(253,219,51,0.85), rgba(253,219,51,0.35) 45%, transparent 70%);
    animation: floatBlob 14s ease-in-out infinite;
}

@keyframes floatBlob {
    0% { transform: translate3d(0,0,0) scale(1); }
    50% { transform: translate3d(12px,-18px,0) scale(1.05); }
    100% { transform: translate3d(0,0,0) scale(1); }
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animated-gradient,
    .blob {
        animation: none !important;
        transition: none !important;
    }
}

/* ===============================================
   TARJETAS DE NAVEGACIÓN - SECCIONES PRINCIPALES
   =============================================== */

.navigation-cards {
    padding: 80px 0;
    background: transparent;
    position: relative;
    z-index: 10;
}

.navigation-cards .section-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.navigation-cards .section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #F37423 !important;
    margin-bottom: 60px;
    font-weight: 300;
    font-family: 'FREITAG TRIAL HEAVY', sans-serif;
}

.nav-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Carrusel móvil de tarjetas (solo se activa en <=768px) */
.nav-cards-carousel { position: relative; width: 100%; }
.nav-cards-nav { display: none; }


.nav-card {
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    text-decoration: none;
    display: block;
}

.nav-card-technical {
    background: linear-gradient(135deg, rgba(238, 74, 49, 0.95), rgba(243, 116, 35, 0.90));
    color: white;
}

.nav-card-artistic {
    background: linear-gradient(135deg, rgba(243, 135, 171, 0.95), rgba(238, 74, 49, 0.90));
    color: white;
}

.nav-card-theory {
    background: linear-gradient(135deg, rgba(42, 171, 226, 0.95), rgba(243, 135, 171, 0.90));
    color: white;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: height 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.nav-card:hover::before {
    height: 8px;
}

.nav-card-content {
    margin-bottom: 30px;
}

.nav-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-card-icon {
    transform: scale(1.1);
}

.nav-card-technical .nav-card-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.nav-card-artistic .nav-card-icon {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.nav-card-theory .nav-card-icon {
    background: linear-gradient(135deg, var(--info-color), var(--accent-color));
}

.nav-card-icon i {
    font-size: 2rem;
    color: white;
}

.nav-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
}

.nav-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 25px;
}

.nav-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-card-artistic .feature-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-card-theory .feature-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-card-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    pointer-events: none;
}

.nav-card-technical .nav-card-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-card-artistic .nav-card-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-card-theory .nav-card-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.nav-card-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-card-button:hover::before {
    left: 100%;
}

.nav-card-button i {
    transition: transform 0.3s ease;
}

.nav-card-button:hover i {
    transform: translateX(5px);
}

/* Animaciones de entrada */
.nav-card {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(50px);
}

.nav-card:nth-child(1) { animation-delay: 0.1s; }
.nav-card:nth-child(2) { animation-delay: 0.2s; }
.nav-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Elementos decorativos de fondo para cada nav-card */
.nav-card-technical::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 80px;
    height: 80px;
    opacity: 0.15;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='25' r='4' fill='white'/%3E%3Cline x1='50' y1='29' x2='50' y2='75' stroke='white' stroke-width='2'/%3E%3Cline x1='50' y1='29' x2='30' y2='65' stroke='white' stroke-width='2'/%3E%3Ccircle cx='30' cy='65' r='3' fill='white'/%3E%3Cline x1='15' y1='85' x2='85' y2='85' stroke='white' stroke-width='1' opacity='0.5'/%3E%3Cline x1='20' y1='75' x2='80' y2='75' stroke='white' stroke-width='1' opacity='0.3'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    animation: rotate360 25s linear infinite;
}

.nav-card-artistic::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 80px;
    height: 80px;
    opacity: 0.15;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20,80 Q30,20 50,40 Q70,60 80,20' stroke='white' stroke-width='3' fill='none'/%3E%3Ccircle cx='15' cy='85' r='6' fill='white' opacity='0.7'/%3E%3Ccircle cx='85' cy='25' r='4' fill='white' opacity='0.5'/%3E%3Cpath d='M10,75 L25,85 L15,90 Z' fill='white' opacity='0.6'/%3E%3Cline x1='75' y1='15' x2='85' y2='25' stroke='white' stroke-width='2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    animation: float 6s ease-in-out infinite;
}

.nav-card-theory::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 80px;
    height: 80px;
    opacity: 0.15;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='25' y='20' width='50' height='60' rx='3' stroke='white' stroke-width='2' fill='none'/%3E%3Cline x1='35' y1='30' x2='65' y2='30' stroke='white' stroke-width='1.5'/%3E%3Cline x1='35' y1='40' x2='65' y2='40' stroke='white' stroke-width='1.5'/%3E%3Cline x1='35' y1='50' x2='60' y2='50' stroke='white' stroke-width='1.5'/%3E%3Cline x1='35' y1='60' x2='55' y2='60' stroke='white' stroke-width='1.5'/%3E%3Cline x1='35' y1='70' x2='50' y2='70' stroke='white' stroke-width='1.5'/%3E%3Ccircle cx='20' cy='15' r='2' fill='white' opacity='0.7'/%3E%3Ccircle cx='80' cy='25' r='1.5' fill='white' opacity='0.5'/%3E%3Ccircle cx='15' cy='75' r='1.5' fill='white' opacity='0.6'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.05); opacity: 0.25; }
}

/* Responsive principal (limpio) */
@media (max-width: 1024px) {
    .nav-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 32px;
    }
    .hero-title { font-size: clamp(2.8rem, 5vw, 3.5rem); }
}

@media (max-width: 768px) {
    body { padding-top: env(safe-area-inset-top); }
    .nav-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 28px;
        padding: 0 18px;
    }
    .nav-card { padding: 32px 26px; }
    .nav-card h3 { font-size: clamp(1.2rem, 2.8vw, 1.4rem); }
    .nav-card p { font-size: clamp(0.9rem, 2.2vw, 1.05rem); }
    .feature-tag { font-size: 0.7rem; }
    .hero-logo { width: clamp(180px, 55vw, 260px); }
    .hero-title { font-size: clamp(2.2rem, 6vw, 2.8rem); }
    .hero-text { font-size: clamp(1.2rem, 4.2vw, 1.6rem); }
    .hero-description { font-size: clamp(1rem, 2.8vw, 1.15rem); padding: 0 4px; }
    .hero-buttons { flex-direction: column; gap: 0.8rem; }

    /* Activar carrusel horizontal para móviles */
    .nav-cards-grid[data-slider] {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 18px;
        padding: 0 16px 10px;
        scroll-padding-left: 16px;
        scrollbar-width: none; /* Firefox */
    }
    .nav-cards-grid[data-slider]::-webkit-scrollbar { display: none; }
    .nav-cards-grid[data-slider] .nav-card {
        flex: 0 0 85%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        min-height: 100%;
    }
    .nav-cards-carousel .nav-cards-nav {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0,0,0,0.35);
        backdrop-filter: blur(4px);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        color: #fff;
        font-size: 1.4rem;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background .3s ease, opacity .3s ease;
        z-index: 5;
    }
    .nav-cards-carousel .nav-cards-nav:hover { background: rgba(0,0,0,0.55); }
    .nav-cards-carousel .nav-cards-nav.prev { left: 6px; }
    .nav-cards-carousel .nav-cards-nav.next { right: 6px; }
    .nav-cards-carousel .nav-cards-nav[disabled],
    .nav-cards-carousel .nav-cards-nav[aria-disabled="true"] { opacity: 0.35; cursor: default; }
}

@media (max-width: 520px) {
    .nav-cards-grid { grid-template-columns: 1fr; gap: 22px; }
    .nav-card { padding: 28px 22px; }
    .nav-card h3 { font-size: 1.25rem; }
    .hero-title { font-size: clamp(1.9rem, 8vw, 2.3rem); }
    .hero-text { font-size: clamp(1.05rem, 5.2vw, 1.3rem); }
    .hero-description { font-size: 0.95rem; }
}

@media (max-width: 380px) {
    .nav-card { padding: 24px 18px; }
    .nav-card h3 { font-size: 1.1rem; }
    .nav-card p { font-size: 0.85rem; }
    .hero-title { font-size: clamp(1.6rem, 9vw, 2rem); }
    .hero-text { font-size: 1rem; }
}

@media (max-width: 480px) {
    .navigation-cards {
        padding: 60px 0;
    }
    
    .nav-card {
        padding: 25px 20px;
    }
    
    /* Asegurar que mantenga estilos en móviles pequeños */
    .nav-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
    
    .nav-card h3 {
        font-size: 1.2rem;
    }
    
    .nav-card p {
        font-size: 0.9rem;
    }
}

/* ===============================================
   JUEGOS DE VISTAS TÉCNICAS
   =============================================== */

.gallery-section .game-description {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 300;
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.view-game {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.view-game:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.game-header h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin: 0;
}

.game-status .score {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.question-view h5 {
    font-size: 1.2rem;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.main-view {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

.axonometric-view, .dihedral-view {
    background: #f8f9fa;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    transition: all 0.3s ease;
}

.axonometric-view {
    min-width: 200px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.placeholder-3d, .placeholder-2d {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.placeholder-3d i, .placeholder-2d i {
    font-size: 3rem;
}

.placeholder-3d span, .placeholder-2d span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Estilos para las imágenes de las vistas */
.view-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    max-height: 150px;
}

.axonometric-view .view-image {
    max-height: 180px;
}

.dihedral-view .view-image {
    max-height: 80px;
}

.instruction {
    text-align: center;
    color: #666;
    font-weight: 500;
    margin: 20px 0 15px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.option-view {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.option-view:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.view-label {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.dihedral-view {
    min-height: 100px;
    background: #f1f3f4;
    border: 2px solid #dee2e6;
    border-top: none;
}

.option-view.selected {
    border: 3px solid var(--primary-color);
    transform: translateY(-5px);
}

.option-view.correct {
    border: 3px solid #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.option-view.correct .view-label {
    background: #28a745;
}

.option-view.incorrect {
    border: 3px solid #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.option-view.incorrect .view-label {
    background: #dc3545;
}

.game-result {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.game-result.correct {
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid #28a745;
}

.game-result.incorrect {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid #dc3545;
}

.result-message {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.game-result.correct .result-message {
    color: #28a745;
}

.game-result.incorrect .result-message {
    color: #dc3545;
}

.retry-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Resumen de puntuación */
.overall-score {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.overall-score h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.5s ease;
}

.score-summary {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.score-summary span {
    font-size: 1.1rem;
    color: #333;
}

.restart-test-container {
    margin-top: 25px;
    text-align: center;
}

.restart-test-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.restart-test-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.restart-test-button i {
    margin-right: 8px;
}

/* Responsive para juegos */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .view-game {
        padding: 25px 20px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .axonometric-view {
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        padding: 0 10px;
    }
    
    .view-game {
        padding: 20px 15px;
    }
    
    .placeholder-3d i, .placeholder-2d i {
        font-size: 2rem;
    }
    
    .score-summary {
        flex-direction: column;
        gap: 10px;
    }
}







/* Prisma Rectangular */
.prism {
    width: 80px;
    height: 120px;
    left: 15%;
    top: 200px;
    transform-style: preserve-3d;
    animation: rotatePrism 25s infinite linear;
}

.prism .face {
    position: absolute;
    background: rgba(238, 74, 49, 0.15);
    border: 2px solid rgba(238, 74, 49, 0.8);
    box-shadow: 0 0 15px rgba(238, 74, 49, 0.3);
    backface-visibility: visible;
}

.prism .front,
.prism .back {
    width: 80px;
    height: 120px;
}

.prism .right,
.prism .left {
    width: 60px;
    height: 120px;
}

.prism .front { transform: translateZ(30px); }
.prism .back { transform: translateZ(-30px) rotateY(180deg); }
.prism .right { transform: rotateY(90deg) translateZ(40px); }
.prism .left { transform: rotateY(-90deg) translateZ(40px); }
.prism .top { transform: rotateX(90deg) translateZ(60px); width: 80px; height: 60px; }
.prism .bottom { transform: rotateX(-90deg) translateZ(60px); width: 80px; height: 60px; }

/* Cilindro */
.cylinder {
    width: 80px;
    height: 160px;
    right: 15%;
    top: 400px;
    animation: rotateCylinder 22s infinite linear;
}

.cylinder-body {
    position: relative;
    height: 100%;
    background: rgba(243, 116, 35, 0.2);
    border: 2px solid rgba(243, 116, 35, 0.8);
    border-radius: 40px;
    box-shadow: 0 0 15px rgba(243, 116, 35, 0.3);
}

.cylinder-top,
.cylinder-bottom {
    position: absolute;
    width: 80px;
    height: 40px;
    background: rgba(243, 116, 35, 0.3);
    border: 2px solid rgba(243, 116, 35, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(243, 116, 35, 0.3);
}

.cylinder-top { top: 0; transform: rotateX(45deg); }
.cylinder-bottom { bottom: 0; transform: rotateX(-45deg); }

/* Pirámide */
.pyramid {
    width: 120px;
    height: 120px;
    left: 12%;
    top: 450px;
    animation: rotatePyramid 18s infinite linear;
}

.pyramid-face {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(253, 219, 51, 0.2);
    border: 2px solid rgba(253, 219, 51, 0.8);
    box-shadow: 0 0 15px rgba(253, 219, 51, 0.3);
}

.pyramid-base {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(253, 219, 51, 0.3);
    border: 2px solid rgba(253, 219, 51, 0.8);
    transform: rotateX(90deg) translateZ(60px);
    box-shadow: 0 0 15px rgba(253, 219, 51, 0.3);
}



/* Animaciones para las figuras */
.shape {
    animation: float 10s infinite ease-in-out;
}

.cube1 { animation-delay: 0s; }
.prism1 { animation-delay: -2s; }
.cylinder1 { animation-delay: -4s; }
.cone1 { animation-delay: -6s; }

@keyframes float {
    0%, 100% { transform: translate(var(--tx, 0), var(--ty, 0)) rotate(0deg); }
    50% { transform: translate(var(--tx, 0), calc(var(--ty, 0) - 20px)) rotate(5deg); }
}

/* Ajuste para que el contenido principal tenga un fondo semitransparente */
.section-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

/* Aplicar FREITAG TRIAL HEAVY solo a títulos y subtítulos */
h1, h2, h3, h4, h5, h6,
.section-title,
.hero-title,
.feature-card h3,
.gallery-section h3, 
.video-section h3, 
.word-search-section h3 {
    font-family: 'FREITAG TRIAL HEAVY', sans-serif;
    color: var(--color-blue);
    margin-bottom: 2rem;
}

/* Asegurar Quicksand Book en textos regulares */
p, span, a, li, input, button, textarea {
    font-family: 'Quicksand Book', sans-serif;
}

/* Animaciones para figuras geométricas */
@keyframes float-rotate {
    0% {
        transform: perspective(500px) rotateX(45deg) rotateZ(45deg) translateY(0);
    }
    50% {
        transform: perspective(500px) rotateX(45deg) rotateZ(45deg) translateY(-20px);
    }
    100% {
        transform: perspective(500px) rotateX(45deg) rotateZ(45deg) translateY(0);
    }
}

@keyframes float-pyramid {
    0% {
        transform: perspective(500px) rotateX(15deg) translateY(0);
    }
    50% {
        transform: perspective(500px) rotateX(15deg) translateY(-15px);
    }
    100% {
        transform: perspective(500px) rotateX(15deg) translateY(0);
    }
}

@keyframes float-cylinder {
    0% {
        transform: perspective(500px) rotateX(45deg) translateY(0);
    }
    50% {
        transform: perspective(500px) rotateX(45deg) translateY(-25px);
    }
    100% {
        transform: perspective(500px) rotateX(45deg) translateY(0);
    }
}

/* Figuras geométricas 3D */
.geometric-shape {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    animation-duration: 6s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

/* Cubo 3D */
.shape-cube {
    width: 100px;
    height: 100px;
    position: fixed;
    top: 20%;
    right: 10%;
    transform-style: preserve-3d;
    transform: rotateX(-30deg) rotateY(-45deg);
    animation: rotate-cube 20s linear infinite;
}

.shape-cube .face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(42, 171, 226, 0.1);
    border: 2px solid rgba(42, 171, 226, 0.3);
}

.shape-cube .front {
    transform: translateZ(50px);
}

.shape-cube .back {
    transform: translateZ(-50px);
}

.shape-cube .right {
    transform: rotateY(90deg) translateZ(50px);
}

.shape-cube .left {
    transform: rotateY(-90deg) translateZ(50px);
}

.shape-cube .top {
    transform: rotateX(90deg) translateZ(50px);
}

.shape-cube .bottom {
    transform: rotateX(-90deg) translateZ(50px);
}

/* Prisma hexagonal 3D */
.shape-prism {
    width: 100px;
    height: 120px;
    position: fixed;
    bottom: 15%;
    left: 5%;
    transform-style: preserve-3d;
    transform: rotateX(-30deg) rotateY(30deg);
    animation: rotate-prism 25s linear infinite;
}

.shape-prism .face {
    position: absolute;
    width: 60px;
    height: 120px;
    background: rgba(238, 74, 49, 0.1);
    border: 2px solid rgba(238, 74, 49, 0.3);
}

.shape-prism .face:nth-child(1) { transform: rotateY(0deg) translateZ(52px); }
.shape-prism .face:nth-child(2) { transform: rotateY(60deg) translateZ(52px); }
.shape-prism .face:nth-child(3) { transform: rotateY(120deg) translateZ(52px); }
.shape-prism .face:nth-child(4) { transform: rotateY(180deg) translateZ(52px); }
.shape-prism .face:nth-child(5) { transform: rotateY(240deg) translateZ(52px); }
.shape-prism .face:nth-child(6) { transform: rotateY(300deg) translateZ(52px); }

/* Cilindro 3D mejorado */
.shape-cylinder {
    position: fixed;
    top: 40%;
    left: 15%;
    transform-style: preserve-3d;
    transform: rotateX(-20deg);
    animation: float-3d 6s ease-in-out infinite;
}

.cylinder-body {
    width: 100px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
}

.cylinder-side {
    position: absolute;
    width: 31.4px; /* (2 * π * r) / 20 segmentos */
    height: 150px;
    background: rgba(243, 116, 35, 0.1);
    border: 1px solid rgba(243, 116, 35, 0.3);
    transform-origin: 50% 50%;
}

.cylinder-top,
.cylinder-bottom {
    width: 100px;
    height: 100px;
    position: absolute;
    left: 0;
    border-radius: 50%;
    background: rgba(243, 116, 35, 0.15);
    border: 2px solid rgba(243, 116, 35, 0.3);
}

.cylinder-top {
    transform: rotateX(90deg) translateZ(75px);
}

.cylinder-bottom {
    transform: rotateX(-90deg) translateZ(75px);
}

/* Generamos los lados del cilindro usando múltiples elementos */
.cylinder-body {
    transform: rotateY(0deg);
    animation: rotate-cylinder 20s linear infinite;
}

/* Contenedor de fondo para las figuras */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Figuras de fondo */
.background-shape {
    position: fixed;
    transform-style: preserve-3d;
    opacity: 0.1;
    pointer-events: none;
}

/* Esfera 3D */
.shape-sphere {
    width: 120px;
    height: 120px;
    right: 25%;
    transform-style: preserve-3d;
}

.sphere-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(42, 171, 226, 0.3);
    background: rgba(42, 171, 226, 0.1);
}

/* Octaedro */
.shape-octahedron {
    right: 8%;
    width: 100px;
    height: 100px;
    margin-top: 250px;
}

.octahedron-face {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 50px solid rgba(253, 219, 51, 0.1);
    border-top: 50px solid rgba(253, 219, 51, 0.1);
}

/* Dodecaedro */
.shape-dodecahedron {
    left: 15%;
    width: 120px;
    height: 120px;
    margin-top: 400px;
}

.dodecahedron-face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(243, 135, 171, 0.1);
    border: 2px solid rgba(243, 135, 171, 0.3);
    transform-origin: center center;
}

/* Cono */
.shape-cone {
    width: 100px;
    height: 150px;
    right: 30%;
    margin-top: 600px;
}

.cone-base {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(42, 171, 226, 0.1);
    border: 2px solid rgba(42, 171, 226, 0.3);
    transform: rotateX(90deg) translateZ(0);
}

.cone-side {
    position: absolute;
    width: 100px;
    height: 150px;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    background: rgba(42, 171, 226, 0.1);
    border: 2px solid rgba(42, 171, 226, 0.3);
}

/* Animaciones para la esfera */
@keyframes sphere-rotate-x {
    0% { transform: rotateX(0deg); }
    100% { transform: rotateX(360deg); }
}

@keyframes sphere-rotate-y {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

@keyframes sphere-rotate-z {
    0% { transform: rotateZ(0deg); }
    100% { transform: rotateZ(360deg); }
}

/* Animaciones 3D */
@keyframes rotate-cube {
    from { transform: rotateX(-30deg) rotateY(0deg); }
    to { transform: rotateX(-30deg) rotateY(360deg); }
}

@keyframes rotate-prism {
    from { transform: rotateX(-30deg) rotateY(0deg); }
    to { transform: rotateX(-30deg) rotateY(360deg); }
}

@keyframes rotate-cylinder {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

@keyframes float-3d {
    0%, 100% { transform: translateY(0) rotateX(-20deg); }
    50% { transform: translateY(-20px) rotateX(-20deg); }
}

/* Estilos de secciones */
.intro-section {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.intro-section::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, var(--color-blue) 50%, transparent 50%);
    opacity: 0.1;
    top: -100px;
    right: -100px;
    transform: rotate(45deg);
}

.intro-text {
    color: #333;
    font-size: 1.2rem;
    line-height: 1.8;
}

.gallery-section {
    background: linear-gradient(135deg, #fff, var(--color-orange) 300%);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(243, 116, 35, 0.1);
}

.video-section {
    background: linear-gradient(135deg, #fff, var(--color-pink) 300%);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(243, 135, 171, 0.1);
}

.word-search-section {
    background: linear-gradient(135deg, #fff, var(--color-yellow) 300%);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(253, 219, 51, 0.1);
}

.section-content {
    max-width: 1200px;
    margin: 80px auto 2rem;
    padding: 0 2rem;
}

/* Header and Navigation */
header {
    background-color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu a i {
    font-size: 1.1em;
}

.nav-inicio:hover {
    background-color: var(--color-blue);
    color: white;
    transform: translateY(-2px);
}

.nav-tecnico:hover {
    background-color: var(--color-red);
    color: white;
    transform: translateY(-2px);
}

.nav-artistica:hover {
    background-color: var(--color-orange);
    color: white;
    transform: translateY(-2px);
}

.nav-teorico:hover {
    background-color: var(--color-yellow);
    color: #333;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    width: 400px;
    height: auto;
    margin-bottom: 3rem;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

.hero-title {
    font-size: 4rem;
    color: var(--color-blue);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-text {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.text-highlight-red {
    color: var(--color-red);
    font-weight: 700;
}

.text-highlight-blue {
    color: var(--color-blue);
    font-weight: 700;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary {
    background-color: var(--color-red);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background-color: var(--color-orange);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-blue);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--color-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: var(--color-blue);
    color: white;
    transform: translateY(-3px);
}

/* Responsive adjustments for hero section */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-text {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-logo {
        width: 150px;
    }
}

/* Main Content */
main {
    margin-top: 80px;
    padding: 2rem;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.section-title {
    font-size: 4rem;
    margin: 2rem 0;
    text-align: center;
    color: var(--color-blue);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-family: 'FREITAG TRIAL HEAVY', sans-serif;
}

.topics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

/* Topic Cards */
.topic-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.topic-card h3 {
    color: var(--color-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.topic-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.steps {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.steps h4 {
    color: var(--color-orange);
    margin-bottom: 0.5rem;
}

.steps ol {
    padding-left: 1.5rem;
}

.steps li {
    margin-bottom: 0.5rem;
    color: #555;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mantener layout horizontal como escritorio en móvil */
    .main-nav { flex-direction: row; padding: 0 1rem; }
    .nav-menu { flex-direction: row; width: auto; text-align: left; gap: 1.2rem; margin-top: 0; }
    .nav-menu a { padding: 0.4rem 0.6rem; font-size: 0.95rem; }
    header { padding: 0.6rem 0; }
    .nav-logo { height: 42px; }
    main { margin-top: 90px; }
    .topic-card { margin-bottom: 1.2rem; }
}

/* Sección de Dibujo Técnico */
.gallery-section, .video-section, .word-search-section {
    margin: 3rem auto;
    max-width: 1000px;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gallery-section h3, .video-section h3, .word-search-section h3 {
    font-size: 2rem;
    color: var(--color-blue);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Carrusel de imágenes */
.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-blue);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.carousel-button:hover {
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--color-blue);
    transform: scale(1.2);
}

/* Sección de Video */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Aspect ratio 16:9 */
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sopa de Letras */
.word-search-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 1rem;
}

#word-search-game {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 10px;
    min-height: 400px;
}

.word-list {
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 10px;
}

.word-list h4 {
    color: var(--color-red);
    margin-bottom: 1rem;
}

.word-list ul {
    list-style: none;
    padding: 0;
}

.word-list li {
    padding: 0.5rem;
    margin: 0.5rem 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 4rem 2rem;
    background-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
}

.feature-card:nth-child(1) .feature-icon {
    background-color: var(--color-red);
    color: white;
}

.feature-card:nth-child(2) .feature-icon {
    background-color: var(--color-orange);
    color: white;
}

.feature-card:nth-child(3) .feature-icon {
    background-color: var(--color-yellow);
    color: white;
}

.feature-card:nth-child(4) .feature-icon {
    background-color: var(--color-pink);
    color: white;
}

/* Eliminado el estilo para la quinta tarjeta */

.feature-card h3 {
    color: #333;
    font-family: 'FREITAG TRIAL HEAVY', sans-serif;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .word-search-container {
        grid-template-columns: 1fr;
    }
    
    .gallery-img {
        height: 150px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ESTILOS ESPECÍFICOS PARA DIBUJO TÉCNICO ===== */

/* Elementos técnicos de fondo */
.technical-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.1;
}

/* Cuadrícula técnica */
.grid-lines {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, var(--color-blue) 1px, transparent 1px),
        linear-gradient(to bottom, var(--color-red) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridPulse 8s ease-in-out infinite alternate;
}

/* Líneas de construcción */
.construction-lines .line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--color-orange), transparent);
    height: 1px;
    width: 100%;
    animation: drawLine 6s ease-in-out infinite;
}

.construction-lines .line-1 {
    top: 20%;
    animation-delay: 0s;
}

.construction-lines .line-2 {
    top: 40%;
    animation-delay: 1.5s;
    transform: rotate(45deg);
}

.construction-lines .line-3 {
    top: 60%;
    animation-delay: 3s;
}

.construction-lines .line-4 {
    top: 80%;
    animation-delay: 4.5s;
    transform: rotate(-30deg);
}

/* Círculos técnicos */
.technical-circles .circle {
    position: absolute;
    border: 2px solid var(--color-pink);
    border-radius: 50%;
    animation: drawCircle 8s ease-in-out infinite;
}

.technical-circles .circle-1 {
    width: 150px;
    height: 150px;
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.technical-circles .circle-2 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
}

.technical-circles .circle-3 {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

/* Decoración de compás */
.compass-decoration {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 60px;
    height: 60px;
    opacity: 0.15;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='30' r='3' fill='%232c5aa0'/%3E%3Cline x1='50' y1='33' x2='50' y2='70' stroke='%232c5aa0' stroke-width='2'/%3E%3Cline x1='50' y1='33' x2='35' y2='60' stroke='%232c5aa0' stroke-width='2'/%3E%3Ccircle cx='35' cy='60' r='2' fill='%232c5aa0'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    animation: rotate360 20s linear infinite;
}

/* Sección de herramientas técnicas */
.technical-tools-section {
    background: linear-gradient(135deg, rgba(42, 171, 226, 0.05), rgba(255, 255, 255, 0.8));
    border: 1px solid rgba(42, 171, 226, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(42, 171, 226, 0.1);
}

.technical-tools-section h3 {
    color: var(--color-blue);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
    position: relative;
}

.technical-tools-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-blue), var(--color-orange));
    border-radius: 2px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(42, 171, 226, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(42, 171, 226, 0.1), transparent);
    transition: left 0.6s;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(42, 171, 226, 0.2);
    border-color: var(--color-blue);
}

.tool-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon svg {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.tool-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(42, 171, 226, 0.2));
}

.tool-card:hover .tool-icon svg,
.tool-card:hover .tool-image {
    transform: scale(1.1);
}

.tool-card h4 {
    color: var(--color-blue);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.tool-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Animaciones técnicas */
@keyframes gridPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

@keyframes drawLine {
    0%, 100% { 
        opacity: 0;
        transform: scaleX(0);
    }
    50% { 
        opacity: 0.3;
        transform: scaleX(1);
    }
}

@keyframes drawCircle {
    0%, 100% { 
        opacity: 0;
        stroke-dasharray: 0 1000;
    }
    50% { 
        opacity: 0.3;
        stroke-dasharray: 1000 0;
    }
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mejoras para el título de dibujo técnico */
.section-content h2.section-title {
    background: linear-gradient(135deg, var(--color-blue), var(--color-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    padding: 0.5rem 1rem;
    text-align: center;
    width: 100%;
}

.section-content h2.section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    min-width: calc(100% - 2rem);
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 171, 226, 0.05), rgba(243, 116, 35, 0.05));
    border-radius: 10px;
    z-index: -1;
}

/* Estilos para la sección del Test de Perspectiva */
.perspective-test-section {
    margin: 4rem auto;
    max-width: 800px;
    padding: 3rem 2rem;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.9), 
        rgba(255, 255, 255, 0.7)
    );
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.perspective-test-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--color-blue), var(--color-orange), var(--color-yellow), var(--color-pink)
    );
    border-radius: 22px;
    z-index: -1;
    background-size: 400% 400%;
    animation: gradientShift 6s ease infinite;
}

.test-intro h3 {
    font-family: 'FREITAG TRIAL HEAVY', Arial, sans-serif;
    color: var(--color-blue);
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.test-intro p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.test-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-orange);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(243, 116, 35, 0.1);
    border-radius: 25px;
}

.feature-item i {
    font-size: 1.2rem;
}

.perspective-test-btn {
    background: linear-gradient(135deg, var(--color-blue), var(--color-orange));
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(42, 171, 226, 0.3);
}

.perspective-test-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(42, 171, 226, 0.4);
    background: linear-gradient(135deg, var(--color-orange), var(--color-pink));
}

.perspective-test-btn:active {
    transform: translateY(-1px);
}

/* Estilos para el modal del juego */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.game-modal.active {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

/* Estado visible del modal - para debugging */
.game-modal[style*="display: block"],
.game-modal[style*="display: flex"] {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 95vw;
    max-height: 90vh;
    width: 1400px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(1);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.game-modal.active .modal-content,
.game-modal[style*="display: block"] .modal-content,
.game-modal[style*="display: flex"] .modal-content {
    transform: scale(1) !important;
}

.modal-header {
    background: linear-gradient(135deg, var(--color-blue), var(--color-orange));
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10002;
    position: relative;
}

.modal-header h2 {
    font-family: 'FREITAG TRIAL HEAVY', Arial, sans-serif;
    font-size: 1.8rem;
    margin: 0;
    color: white;
}

.modal-body {
    padding: 2rem;
    background: white;
    position: relative;
    z-index: 10002;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
}

.game-description {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Estilos para la página dedicada del test */
.test-page-container {
    min-height: 100vh;
    background: linear-gradient(135deg, 
        rgba(42, 171, 226, 0.1), 
        rgba(243, 116, 35, 0.05), 
        rgba(253, 219, 51, 0.08)
    );
}

.test-header {
    background: linear-gradient(135deg, var(--color-blue), var(--color-orange));
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content .logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
}

.header-content h1 {
    font-family: 'FREITAG TRIAL HEAVY', Arial, sans-serif;
    color: white;
    font-size: 2rem;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.close-test-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.close-test-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.close-test-btn.secondary {
    background: linear-gradient(135deg, var(--color-orange), var(--color-pink));
    color: white;
    border: none;
    margin: 2rem auto;
    display: flex;
}

.test-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.test-description {
    text-align: center;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.test-description p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.test-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
}

/* Estilos para la sección del test de perspectiva */
.test-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, 
        rgba(42, 171, 226, 0.1), 
        rgba(243, 116, 35, 0.05), 
        rgba(253, 219, 51, 0.08)
    );
    z-index: 1000;
    overflow-y: auto;
}

.test-header {
    background: linear-gradient(135deg, var(--color-orange), var(--color-pink));
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1001;
}

.test-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.test-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.test-title i {
    font-size: 2rem;
}

.test-title h1 {
    font-family: 'FREITAG TRIAL HEAVY', Arial, sans-serif;
    font-size: 2rem;
    margin: 0;
    color: var(--color-yellow);
}

.close-test-btn, .back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    text-decoration: none;
}

.close-test-btn:hover, .back-btn:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-color: #e67e22;
    transform: translateY(-2px);
}

.test-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.test-description {
    text-align: center;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.test-description p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.test-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
}

.back-btn {
    background: linear-gradient(135deg, var(--color-orange), var(--color-pink));
    border: none;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Media queries para responsive */
@media (max-width: 768px) {
    .perspective-test-section {
        margin: 2rem 1rem;
        padding: 2rem 1rem;
    }
    
    .test-intro h3 {
        font-size: 1.8rem;
    }
    
    .test-features {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .perspective-test-btn {
        font-size: 1rem;
        padding: 1rem 2rem;
    }
    
    .modal-content {
        width: 95vw;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .modal-body {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .test-main {
        padding: 1rem;
    }
    
    .test-description {
        padding: 1.5rem;
    }
    
    .test-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .test-title h1 {
        font-size: 1.5rem;
    }
    
    .test-content {
        padding: 1rem;
    }
}

/* Image Zoom Modal */
.image-zoom-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.image-zoom-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.zoom-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.zoom-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

.zoom-caption {
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 300;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    margin-top: 10px;
}

.zoom-close {
    position: absolute;
    top: -40px;
    right: -10px;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.zoom-close:hover {
    background: rgba(255, 0, 0, 0.7);
}

/* Image hover effect */
.view-image {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.view-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ===============================================
   MEJORAS RESPONSIVE PARA MÓVILES
   =============================================== */

/* Mejoras generales para tablets */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .nav-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* Mejoras para móviles medianos */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .view-image {
        max-width: 100%;
        height: auto;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .option-view {
        margin-bottom: 10px;
    }
    
    .view-label {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .dihedral-view {
        min-height: 80px;
        padding: 10px;
    }
    
    .game-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .score-indicator {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .main-view {
        margin: 15px 0;
    }
    
    .axonometric-view {
        min-width: 150px;
        padding: 15px;
    }
}

/* Mejoras para móviles pequeños */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .view-game {
        padding: 15px 10px;
        margin: 0 5px;
    }
    
    .question-view h5 {
        font-size: 1rem;
    }
    
    .axonometric-view {
        min-width: 120px;
        padding: 10px;
    }
    
    .view-image {
        max-height: 150px;
        object-fit: contain;
    }
    
    .option-view {
        border-radius: 8px;
    }
    
    .view-label {
        font-size: 0.8rem;
        padding: 8px;
    }
    
    .nav-card {
        padding: 20px 15px;
    }
    
    .nav-card h3 {
        font-size: 1.2rem;
    }
    
    .nav-card p {
        font-size: 0.9rem;
    }
    
    .feature-tag {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .restart-test-button {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
    
    .modal-content {
        width: 98vw;
        margin: 5px;
        border-radius: 8px;
    }
    
    .zoom-close {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* Mejoras para pantallas muy pequeñas */
@media (max-width: 360px) {
    .nav-cards-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .view-game {
        padding: 10px 8px;
    }
    
    .axonometric-view {
        min-width: 100px;
        padding: 8px;
    }
    
    .view-image {
        max-height: 120px;
    }
    
    .options-grid {
        gap: 10px;
    }
    
    .game-header h4 {
        font-size: 1.1rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
}
