:root {
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #0f172a;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.7);
    --text-main: #1e293b;
    --text-muted: #64748b;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.company-logo {
    position: fixed;
    top: 20px;
    right: 30px;
    height: 50px;
    z-index: 1000;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Background animated blobs for a premium look */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--blob-1-bg, #bfdbfe);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--blob-2-bg, #ddd6fe);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Header */
.header {
    text-align: center;
    padding: 60px 20px 40px;
}

.logo {
    max-height: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Container & Grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Cards using Glassmorphism */
.detail-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 90%;
    margin-top: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
    animation: slideUp 0.8s ease-out forwards;
    transition: max-width 0.4s ease;
}

.detail-container.wide-container {
    max-width: 1400px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 40px 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-light), var(--primary));
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.9);
}

.card:hover::before {
    transform: scaleY(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Detalle Page Styles */
.detail-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 30px;
    padding: 10px 20px;
    border-radius: 30px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

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

.detail-content {
    background: transparent;
    backdrop-filter: none;
    border-radius: 24px;
    padding: 50px;
    box-shadow: none;
    border: none;
}

.detail-content h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 25px;
}

.detail-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.feature-list {
    list-style: none;
    margin-top: 30px;
}

.feature-list li {
    margin-bottom: 10px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 1.1rem;
    color: var(--text-main);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.capacities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.capacities-grid li {
    font-size: 0.95rem; /* Slightly smaller to fit 4 columns better */
    padding: 10px;      /* Less padding to save space */
    margin-bottom: 0;
}

.feature-list li:hover {
    transform: scale(1.04) translateX(5px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    border-color: rgba(255, 255, 255, 1);
    color: #0f172a;
    z-index: 10;
    position: relative;
}

.feature-list li i {
    color: var(--primary);
    margin-top: 5px;
    width: 30px;
    text-align: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-list li:hover i {
    transform: scale(1.3) rotate(5deg);
}

/* Elementos Interactivos */
.interactive-rocket {
    position: fixed;
    bottom: 50px;
    left: -150px; /* Start outside the left edge */
    width: 120px;
    z-index: 100;
    pointer-events: none; /* So it doesn't interfere with clicks */
    transform: rotate(45deg); /* Pointing towards top right */
    animation: flyAcross 4s ease-out forwards;
}

@keyframes flyAcross {
    0% { 
        left: -150px; 
        bottom: 50px; 
        transform: rotate(45deg) scale(0.5); 
    }
    100% { 
        left: 120vw; /* End outside the right edge */
        bottom: 80vh; 
        transform: rotate(45deg) scale(1.5); 
    }
}

/* 🚀 CRAZY LAUNCH OVERLAY FOR DIFERENCIADORES 🚀 */
.crazy-launch-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, #1e293b, #020617);
    z-index: 9999;
    display: none; /* Controlled by JS */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.rocket-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: shake 0.15s infinite, liftOff 1s 0.8s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}

.big-rocket {
    width: 250px;
    transform: rotate(-40deg); /* Make it point straight up */
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

.exhaust-flame {
    position: absolute;
    bottom: 15px; /* Tweak this so it sits right under the engine nozzle */
    width: 50px;
    height: 120px;
    background: linear-gradient(to bottom, #ffea00, #ff5e00, transparent);
    border-radius: 50% 50% 20% 20%;
    z-index: 5;
    animation: flicker 0.05s infinite alternate;
    box-shadow: 0 0 40px #ff5e00, 0 0 80px #ffea00;
}

@keyframes flicker {
    0% { transform: scaleY(1) scaleX(1); opacity: 1; }
    100% { transform: scaleY(1.3) scaleX(0.9); opacity: 0.8; }
}

@keyframes shake {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-3px, 3px); }
    50% { transform: translate(3px, -3px); }
    75% { transform: translate(-3px, -3px); }
    100% { transform: translate(3px, 3px); }
}

@keyframes liftOff {
    0% { transform: translateY(0); }
    100% { transform: translateY(-150vh); }
}

.exhaust-fumes {
    position: absolute;
    bottom: -50px;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    z-index: 1;
    margin: 0; padding: 0;
}

.exhaust-fumes li {
    width: 60px;
    height: 60px;
    background: #cbd5e1;
    border-radius: 50%;
    margin: 0 -15px;
    opacity: 0.9;
    box-shadow: inset -5px -5px 15px rgba(0,0,0,0.2);
    animation: fumeExpand 0.5s infinite alternate;
}
.exhaust-fumes li:nth-child(even) {
    width: 80px; height: 80px;
    background: #e2e8f0;
    animation-duration: 0.4s;
    animation-delay: 0.1s;
}

@keyframes fumeExpand {
    0% { transform: scale(1) translateY(0); opacity: 0.9; }
    100% { transform: scale(2) translateY(50px); opacity: 0; }
}

.launch-text {
    position: absolute;
    top: 20%;
    color: white;
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
    opacity: 0;
    animation: fadeInOut 1.5s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px) scale(0.9); }
    20% { opacity: 1; transform: translateY(0) scale(1); }
    80% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-20px) scale(1.1); }
}

/* --- Personalización Styles --- */
.colorful-intro {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: center;
}

.colorful-list li {
    border-left: 5px solid var(--accent);
    background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.4));
    margin-bottom: 15px;
}

.colorful-list li i {
    color: var(--accent);
}

.world-orbit-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.world-logo {
    width: 140px;
    z-index: 2;
    animation: pulseLogo 3s infinite alternate;
}

.orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed rgba(37, 99, 235, 0.3);
    animation: spinOrbit 6s linear infinite;
}

.orbiting-rocket {
    position: absolute;
    top: -25px;
    left: 50%;
    margin-left: -25px;
    width: 50px;
    transform: rotate(45deg);
}

@keyframes spinOrbit {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseLogo {
    0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(37,99,235,0.2)); }
    100% { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(37,99,235,0.6)); }
}

/* --- Timeline Styles for Forma de Trabajo --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px; /* Aligns line to center of icon */
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6, #f59e0b, #10b981);
    border-radius: 2px;
}

.timeline-step {
    position: relative;
    display: flex;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInRight 0.5s forwards ease-out;
}

.timeline-step:nth-child(1) { animation-delay: 0.1s; }
.timeline-step:nth-child(2) { animation-delay: 0.3s; }
.timeline-step:nth-child(3) { animation-delay: 0.5s; }
.timeline-step:nth-child(4) { animation-delay: 0.7s; }
.timeline-step:nth-child(5) { animation-delay: 0.9s; }

.timeline-step:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: relative;
    z-index: 2;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7), 0 5px 15px rgba(0,0,0,0.1);
    margin-left: 10px;
    flex-shrink: 0;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 20px 25px;
    margin-left: 30px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.8);
    transition: transform 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.timeline-content:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.timeline-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 1.25rem;
}

.timeline-content p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Accessibility Controls & Dark Mode --- */
:root {
    --bg-dark: #0f172a;
    --card-dark: rgba(30, 41, 59, 0.85);
    --text-dark: #94a3b8; /* Gris claro en lugar de blanco */
    --text-muted-dark: #64748b; /* Gris más oscuro */
}

body {
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.dark-mode {
    --bg-color: var(--bg-dark);
    --card-bg: var(--card-dark);
    --text-main: var(--text-dark);
    --text-muted: var(--text-muted-dark);
    --blob-1-bg: #1e3a8a;
    --blob-2-bg: #4c1d95;
}

body.dark-mode .detail-content,
body.dark-mode .detail-container,
body.dark-mode .card {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .feature-list li {
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
body.dark-mode .feature-list li:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}
body.dark-mode .timeline-content {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255,255,255,0.1);
}
body.dark-mode .timeline-content h3 { color: var(--text-main); }
body.dark-mode .timeline-content p { color: var(--text-muted); }

body.dark-mode .colorful-list li {
    background: linear-gradient(90deg, rgba(30,41,59,0.9), rgba(30,41,59,0.4));
    color: var(--text-main);
}

body.dark-mode .back-btn {
    background: var(--card-bg);
    color: var(--primary-light);
}

body.dark-mode .back-btn:hover {
    background: var(--primary);
    color: var(--text-main);
}

body.dark-mode .character-message {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .character-message::after {
    border-color: var(--card-bg) transparent transparent transparent;
}

.accessibility-panel {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    gap: 12px;
    z-index: 9999;
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
body.dark-mode .accessibility-panel {
    background: rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.1);
}

.access-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
body.dark-mode .access-btn {
    background: #1e293b;
    color: #60a5fa;
}

.access-btn:hover {
    transform: scale(1.15) translateY(-5px);
    background: var(--primary);
    color: white;
}
body.dark-mode .access-btn:hover {
    background: #3b82f6;
    color: var(--text-main);
}

/* --- FAQ Accordion --- */
.faq-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 20px;
}

.faq-title {
    text-align: center;
    color: var(--text-main);
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: 800;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question::after {
    content: '\f078';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(180deg);
}

.faq-item.active .faq-question {
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
    background: rgba(255, 255, 255, 0.3);
}

body.dark-mode .faq-answer {
    background: rgba(0, 0, 0, 0.2);
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 20px 20px 20px;
}

.faq-answer p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.character-container {
    position: fixed;
    bottom: -150px; /* Hidden initially */
    left: 20px;
    z-index: 100;
    cursor: pointer;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.interactive-character {
    width: 120px;
    transition: transform 0.3s ease;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
}

.character-container:hover .interactive-character {
    transform: scale(1.05);
}

.character-message {
    position: absolute;
    bottom: 120px;
    left: 80px;
    background: white;
    color: var(--text-main);
    padding: 12px 18px;
    border-radius: 20px;
    border-bottom-left-radius: 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-size: 1rem;
    font-weight: 600;
    width: max-content;
    max-width: 250px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.character-message::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    border-width: 10px 10px 0 0;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.character-message.show {
    opacity: 1;
    transform: translateY(0);
}
