/* Global Styles */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-color: #2d3436;
    --light-color: #f8f9fa;
    --text-color: #2d3436;
    --text-light: #636e72;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: auto;
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.cta-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background-color: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 1100;
    display: none; /* toggled with .visible */
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.floating-cta:hover {
    transform: translate(-50%, -3px);
}

.floating-cta.visible { display: inline-flex; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
    color: var(--text-color);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
}

/* Quiz Styles */
.quiz-container {
    margin: 2rem 0;
    min-height: 300px;
}

.question {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.question.active {
    display: block;
}

.question h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.option {
    display: block;
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.option.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.navigation-buttons button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#prev-btn {
    background-color: #e9ecef;
    color: var(--text-color);
}

#next-btn, #submit-btn {
    background-color: var(--primary-color);
    color: white;
}

#prev-btn:hover, #next-btn:hover, #submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-top: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Features Section */
.features {
    padding: 5rem 2rem;
    text-align: center;
    background-color: #f8f9fa;
}

.features h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

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

.feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-10px);
}

.feature img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.feature h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature p {
    color: var(--text-light);
}

/* Body copy under '¿Por qué entrenar con EMAVI?' */
.feature-copy {
    max-width: 900px;
    margin: 0.75rem auto;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
    line-height: 1.75;
}

/* Highlights (3 items title + subtitle) */
.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto 2rem auto;
}

.highlight h3 {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.highlight p {
    color: var(--text-light);
    margin: 0;
}

/* Highlight cards */
.highlight {
    background: white;
    padding: 1.5rem 1.75rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

/* Image under highlight cards */
.highlights-image {
    display: block;
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

/* Loading Message */
.loading-message {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.loading-message h3 {
    color: #2d3436;
    margin-bottom: 1rem;
}

.loading-message p {
    color: #636e72;
    margin-bottom: 1.5rem;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 2rem;
    background: #fff5f5;
    border-radius: 10px;
    margin: 1rem 0;
    border: 1px solid #ff6b6b;
}

.error-message h3 {
    color: #e53e3e;
    margin-bottom: 1rem;
}

.error-message p {
    color: #e53e3e;
    margin-bottom: 1.5rem;
}

.cta-button {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

.cta-button:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loading-message h3 {
    color: #2d3436;
    margin-bottom: 1rem;
}

.loading-message p {
    color: #636e72;
    margin-bottom: 1.5rem;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.success-message h3 {
    color: #2d3436;
    margin-bottom: 1rem;
}

.success-message p {
    color: #636e72;
    margin-bottom: 1rem;
}

.success-message p:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: #ff6b6b;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 90%;
        padding: 1.5rem;
    }
    
    .question h3 {
        font-size: 1.2rem;
    }
    
    .option {
        padding: 0.8rem;
    }
    
    .navigation-buttons button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0 1.5rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Block Intro */
.block-intro {
    margin: 0.5rem 0 1.25rem;
    color: var(--text-light);
}

/* Footer */
.site-footer {
    padding: 1.25rem 1rem;
    background: #fff;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
}

.footer-left { justify-self: start; }
.footer-center { justify-self: center; }
.footer-right { justify-self: end; }

.site-footer a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-light);
}

.social-icon:hover { color: var(--primary-color); }

.social-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Floating CTA override to ensure correct visibility against generic .cta-button styles */
.cta-button.floating-cta { display: none; }
.cta-button.floating-cta.visible { display: inline-flex; }

/* Do not move floating CTA on hover; keep centered */
.cta-button.floating-cta:hover {
    transform: translateX(-50%);
}
