/**
 * Estilos para Nuevas Funcionalidades
 * ===================================
 * - Calculadora IMC
 * - Checador de Síntomas
 * - Comparador de Planes
 * - Galería de Instalaciones
 * - Gamificación
 */

/* ===== CALCULADORA IMC ===== */

.imc-calculator {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 2.5rem;
}

.icon-box-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.imc-result-card {
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 1.5rem;
    border-left: 5px solid;
}

.imc-result-card.success {
    background: #d1fae5;
    border-color: #10b981;
}

.imc-result-card.warning {
    background: #fef3c7;
    border-color: #f59e0b;
}

.imc-result-card.danger {
    background: #fee2e2;
    border-color: #ef4444;
}

.imc-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.imc-gauge {
    height: 30px;
    background: linear-gradient(to right, #3b82f6, #10b981, #fbbf24, #f59e0b, #ef4444);
    border-radius: 15px;
    position: relative;
    margin: 1.5rem 0;
}

.imc-indicator {
    position: absolute;
    top: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #1f2937;
    transition: left 0.5s ease;
}

/* ===== CHECADOR DE SÍNTOMAS ===== */

.symptom-checker {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 3rem;
}

.symptom-option {
    padding: 1.5rem;
    border: 2px solid var(--gray-200);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.symptom-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-lighter);
    transform: translateX(5px);
}

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

.symptom-option i {
    font-size: 2rem;
    margin-right: 1rem;
}

.severity-scale {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
}

.severity-level {
    flex: 1;
    padding: 1rem;
    text-align: center;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.3s ease;
}

.severity-level:first-child {
    border-radius: 0.5rem 0 0 0.5rem;
}

.severity-level:last-child {
    border-radius: 0 0.5rem 0.5rem 0;
}

.severity-level:hover {
    background: var(--primary-lighter);
}

.severity-level.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.recommendation-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 2rem;
}

/* ===== COMPARADOR DE PLANES ===== */

.pricing-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.pricing-card.featured {
    border: 3px solid var(--primary-color);
}

.pricing-card.featured::before {
    content: 'Más Popular';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--primary-color);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: 700;
}

.pricing-price {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.pricing-period {
    font-size: 1rem;
    color: var(--gray-500);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features .included {
    color: var(--primary-color);
}

.pricing-features .not-included {
    color: var(--gray-300);
    text-decoration: line-through;
}

/* ===== GALERÍA DE INSTALACIONES ===== */

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    height: 300px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h5 {
    color: white;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    color: rgba(255,255,255,0.8);
    margin: 0;
    font-size: 0.9rem;
}

/* Modal de galería */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 0.5rem;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
}

/* ===== GAMIFICACIÓN ===== */

.badge-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.health-badge {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.health-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.health-badge.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.badge-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.badge-icon.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.badge-icon.silver {
    background: linear-gradient(135deg, #e5e7eb, #9ca3af);
}

.badge-icon.bronze {
    background: linear-gradient(135deg, #d97706, #92400e);
}

.badge-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    color: var(--gray-400);
}

.points-counter {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.points-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.points-label {
    font-size: 1.2rem;
    opacity: 0.9;
}

.progress-bar-custom {
    height: 30px;
    background: var(--gray-200);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 1s ease;
}

.level-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-radius: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ===== FAQ ACCORDION ===== */

.faq-accordion .accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-accordion .accordion-button {
    background: white;
    color: var(--gray-800);
    font-weight: 600;
    padding: 1.5rem;
    font-size: 1.1rem;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
}

.faq-accordion .accordion-button::after {
    filter: brightness(0) invert(1);
}

.faq-accordion .accordion-body {
    padding: 1.5rem;
    background: white;
}

/* ===== FOOTER MEJORADO ===== */

.footer-improved {
    background: #1f2937;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.footer-logo-text h5 {
    margin: 0;
    font-weight: 700;
    color: white;
}

.footer-logo-text .text-primary {
    color: var(--primary-color) !important;
}

.footer-description {
    color: #9ca3af;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-section-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff !important;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 3rem;
    padding-top: 2rem;
}

.footer-bottom-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--primary-color);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 991.98px) {
    .imc-calculator,
    .symptom-checker {
        padding: 2rem;
    }
    
    .pricing-card {
        margin-bottom: 2rem;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .points-number {
        font-size: 3rem;
    }
}

@media (max-width: 767.98px) {
    .imc-value {
        font-size: 2rem;
    }
    
    .pricing-price {
        font-size: 2.5rem;
    }
    
    .severity-scale {
        flex-direction: column;
    }
    
    .severity-level {
        border-radius: 0.5rem !important;
        margin-bottom: 0.5rem;
    }
    
    .footer-improved {
        padding: 3rem 0 1.5rem;
    }
}
/* ===== INSTAGRAM SECTION ===== */

.instagram-section {
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.instagram-post {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.instagram-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.instagram-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.instagram-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.instagram-post:hover .instagram-image img {
    transform: scale(1.05);
}

.instagram-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instagram-post:hover .instagram-overlay {
    opacity: 1;
}

.instagram-stats {
    display: flex;
    gap: 2rem;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.instagram-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instagram-caption {
    padding: 1rem;
}

.instagram-caption p {
    font-size: 0.95rem;
    color: var(--gray-800);
}

.instagram-caption small {
    font-size: 0.85rem;
}

/* Botón gradiente Instagram */
.btn-gradient-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border: none;
    color: white;
    box-shadow: 0 8px 20px rgba(193, 53, 132, 0.3);
    transition: all 0.3s ease;
}

.btn-gradient-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(193, 53, 132, 0.4);
    color: white;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 991.98px) {
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 767.98px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .instagram-caption {
        padding: 0.75rem;
    }
    
    .instagram-stats {
        font-size: 0.9rem;
        gap: 1rem;
    }
}

@media (max-width: 575.98px) {
    .instagram-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}