/* ========================================
   ISE LANDING PAGE - ADVANCED FEATURES CSS
   ========================================
   1. Calendario Integrado
   2. Oferta/Descuento Emergente
   3. Mensajes Contextuales
   4. FAQ Interactivo
   ======================================== */

/* ============================================
   1. CALENDARIO INTEGRADO
   ============================================ */
.calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.calendar-modal.active {
    opacity: 1;
    visibility: visible;
}

.calendar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.calendar-container {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUpFadeIn 0.4s ease;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.calendar-header {
    background: linear-gradient(135deg, #e64c25 0%, #c43e1f 100%);
    color: white;
    padding: 32px 24px;
    border-radius: 24px 24px 0 0;
    text-align: center;
    position: relative;
}

.calendar-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.calendar-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% { animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
    0% { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); }
    20% { transform: scale3d(1.1, 1.1, 1.1); }
    40% { transform: scale3d(0.9, 0.9, 0.9); }
    60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); }
    80% { transform: scale3d(0.97, 0.97, 0.97); }
    100% { opacity: 1; transform: scale3d(1, 1, 1); }
}

.calendar-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.calendar-header p {
    font-size: 15px;
    opacity: 0.95;
}

.calendar-body {
    padding: 24px;
}

.calendar-section {
    margin-bottom: 28px;
}

.calendar-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #003d5c;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-section h3 i {
    color: #e64c25;
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.calendar-date-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 14px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.calendar-date-btn:hover {
    background: #fff5f2;
    border-color: #e64c25;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 76, 37, 0.2);
}

.calendar-date-btn.selected {
    background: linear-gradient(135deg, #e64c25, #c43e1f);
    border-color: #e64c25;
    color: white;
    transform: scale(1.05);
}

.calendar-date-btn .date-day {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 4px;
}

.calendar-date-btn .date-number {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 2px;
}

.calendar-date-btn .date-month {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.7;
}

.calendar-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.calendar-time-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.calendar-time-btn:hover {
    background: #fff5f2;
    border-color: #e64c25;
    color: #e64c25;
    transform: translateY(-2px);
}

.calendar-time-btn.selected {
    background: linear-gradient(135deg, #e64c25, #c43e1f);
    border-color: #e64c25;
    color: white;
    box-shadow: 0 4px 12px rgba(230, 76, 37, 0.3);
}

.calendar-summary {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.calendar-summary i {
    font-size: 48px;
    color: #4caf50;
    margin-bottom: 12px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.calendar-summary h3 {
    font-size: 22px;
    color: #2e7d32;
    margin-bottom: 16px;
}

.summary-details {
    text-align: left;
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

.summary-details p {
    margin-bottom: 12px;
    font-size: 15px;
    color: #333;
}

.summary-details p:last-child {
    margin-bottom: 0;
}

.summary-details strong {
    color: #e64c25;
    font-weight: 700;
}

.calendar-confirm-btn {
    width: 100%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 18px 24px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.calendar-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

.calendar-confirm-btn i {
    font-size: 22px;
}

/* ============================================
   2. OFERTA/DESCUENTO EMERGENTE
   ============================================ */
.promo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.promo-modal.active {
    opacity: 1;
    visibility: visible;
}

.promo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.promo-container {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    animation: zoomInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes zoomInBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.promo-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.promo-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.promo-content {
    padding: 32px 28px;
    text-align: center;
}

.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6); }
}

.promo-title {
    font-size: 40px;
    font-weight: 900;
    background: linear-gradient(135deg, #e64c25, #c43e1f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1.2;
}

.promo-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 24px;
    font-weight: 600;
}

.promo-benefits {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 28px;
    text-align: left;
}

.promo-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 15px;
    color: #333;
}

.promo-benefit:last-child {
    margin-bottom: 0;
}

.promo-benefit i {
    color: #4caf50;
    font-size: 20px;
    flex-shrink: 0;
}

.promo-countdown {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.promo-countdown p {
    font-size: 14px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 70px;
}

.countdown-item span {
    display: block;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
    color: #FFD700;
}

.countdown-item label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.8;
}

.countdown-divider {
    font-size: 28px;
    font-weight: 700;
    color: #FFD700;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.3; }
}

.promo-cta-btn {
    width: 100%;
    background: linear-gradient(135deg, #e64c25 0%, #c43e1f 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 20px 24px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(230, 76, 37, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(230, 76, 37, 0.5);
}

.promo-cta-btn i {
    font-size: 22px;
}

.promo-disclaimer {
    font-size: 12px;
    color: #999;
    margin-top: 16px;
}

/* ============================================
   3. MENSAJES CONTEXTUALES
   ============================================ */
.contextual-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 16px;
    background: white;
    color: #333;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    max-width: 280px;
    white-space: normal;
}

.contextual-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.contextual-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: wiggle 0.5s ease 0.5s;
}

@keyframes wiggle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================
   4. FAQ INTERACTIVO
   ============================================ */
.faq-floating-btn {
    position: fixed;
    bottom: 120px;
    right: 32px;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
    border: 2px solid rgba(230, 76, 37, 0.3);
    border-radius: 50px;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    animation: slideInRight 0.6s ease;
}

.faq-floating-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(230, 76, 37, 0.4);
    border-color: rgba(230, 76, 37, 0.6);
    background: linear-gradient(135deg, #111827, #000000);
}

.faq-floating-btn i {
    font-size: 22px;
    color: #e64c25;
}

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

.faq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.faq-modal.active {
    opacity: 1;
    visibility: visible;
}

.faq-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.faq-container {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUpFadeIn 0.4s ease;
}

.faq-header {
    background: linear-gradient(135deg, #003d5c 0%, #002a40 100%);
    color: white;
    padding: 32px 24px;
    border-radius: 24px 24px 0 0;
    text-align: center;
    position: relative;
}

.faq-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.faq-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: bounceIn 0.6s ease;
}

.faq-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.faq-header p {
    font-size: 15px;
    opacity: 0.95;
}

.faq-search {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
}

.faq-search i {
    color: #6c757d;
    font-size: 18px;
}

.faq-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    color: #333;
}

.faq-search input::placeholder {
    color: #adb5bd;
}

.faq-body {
    padding: 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.faq-item {
    border: 2px solid #e9ecef;
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #e64c25;
    box-shadow: 0 4px 12px rgba(230, 76, 37, 0.1);
}

.faq-item.active {
    border-color: #e64c25;
}

.faq-question {
    width: 100%;
    background: white;
    border: none;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.faq-item.active .faq-question {
    background: #fff5f2;
    color: #e64c25;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: #6c757d;
    flex-shrink: 0;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: #e64c25;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #f8f9fa;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 18px 20px;
}

.faq-answer p {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

.faq-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 15px;
}

.faq-footer {
    padding: 24px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    background: #f8f9fa;
}

.faq-footer p {
    font-size: 15px;
    color: #666;
    margin-bottom: 14px;
    font-weight: 600;
}

.faq-contact-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.faq-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.faq-contact-btn i {
    font-size: 20px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .calendar-container,
    .promo-container,
    .faq-container {
        max-width: 95%;
        border-radius: 20px;
    }

    .calendar-header,
    .promo-content,
    .faq-header {
        padding: 24px 20px;
    }

    .calendar-header h2,
    .promo-title,
    .faq-header h2 {
        font-size: 24px;
    }

    .promo-title {
        font-size: 32px;
    }

    .calendar-dates {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }

    .calendar-times {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .countdown-timer {
        gap: 6px;
    }

    .countdown-item {
        padding: 10px 12px;
        min-width: 60px;
    }

    .countdown-item span {
        font-size: 26px;
    }

    .faq-floating-btn {
        bottom: 100px;
        right: 20px;
        padding: 14px 24px;
        font-size: 15px;
    }

    .contextual-tooltip {
        max-width: 220px;
        font-size: 13px;
        padding: 12px 16px;
    }
}

/* ============================================
   SMOOTH SCROLLING FOR MODALS
   ============================================ */
.calendar-container::-webkit-scrollbar,
.promo-container::-webkit-scrollbar,
.faq-container::-webkit-scrollbar,
.faq-body::-webkit-scrollbar {
    width: 8px;
}

.calendar-container::-webkit-scrollbar-track,
.promo-container::-webkit-scrollbar-track,
.faq-container::-webkit-scrollbar-track,
.faq-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.calendar-container::-webkit-scrollbar-thumb,
.promo-container::-webkit-scrollbar-thumb,
.faq-container::-webkit-scrollbar-thumb,
.faq-body::-webkit-scrollbar-thumb {
    background: #e64c25;
    border-radius: 10px;
}

.calendar-container::-webkit-scrollbar-thumb:hover,
.promo-container::-webkit-scrollbar-thumb:hover,
.faq-container::-webkit-scrollbar-thumb:hover,
.faq-body::-webkit-scrollbar-thumb:hover {
    background: #c43e1f;
}
