/* Home Page Enhancements */

/* ============================================
   0. STATS CARDS - Bicolor Design
   ============================================ */

/* Bicolor Stats Cards - All Same Style */
.stat-item {
    padding: 0 !important;
    overflow: hidden;
    border: none !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

.stat-number {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: white !important;  /* White background for top */
    color: #003b5a !important;      /* Dark blue text */
    padding: 24px 20px !important;
    margin: 0 !important;
    font-size: 36px !important;
    font-weight: 800 !important;
    min-height: 100px;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.stat-number::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f7be16, transparent);
}

.stat-label {
    display: block !important;
    background: #003b5a !important;  /* Dark blue background */
    color: white !important;          /* White text */
    padding: 14px 16px !important;
    font-size: 12px !important;       /* Smaller font size */
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 50px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Mobile Responsive Stats */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    
    .stat-number {
        font-size: 28px !important;
        padding: 20px 16px !important;
        min-height: 80px;
    }
    
    .stat-label {
        font-size: 12px !important;
        padding: 14px 16px !important;
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 24px !important;
    }
    
    .stat-label {
        font-size: 11px !important;
    }
}

/* ============================================
   1. FEATURE CARDS - Better Contrast
   ============================================ */

/* Fix contrast for all feature cards */
.feature-card-accent {
    background: #2d3748 !important; /* Dark gray instead of original accent */
    color: white !important;
}

.feature-card-accent .feature-title,
.feature-card-accent .feature-description {
    color: white !important;
}

.feature-card-accent .feature-icon {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #f7be16 !important;
}

.feature-card-secondary {
    background: #f7be16 !important;
    color: #1a202c !important; /* Very dark text for yellow background */
}

.feature-card-secondary .feature-title,
.feature-card-secondary .feature-description {
    color: #1a202c !important;
    font-weight: 500;
}

.feature-card-gradient {
    background: linear-gradient(135deg, #003b5a 0%, #0076c7 100%) !important;
    color: white !important;
}

.feature-card-gradient .feature-title,
.feature-card-gradient .feature-description {
    color: white !important;
}

/* ============================================
   2. HOW IT WORKS - Professional Redesign
   ============================================ */

.how-it-works-section {
    padding: 100px 0 80px 0;  /* Added more top padding for margin */
    margin-top: 60px;  /* Extra margin from previous section */
    background: linear-gradient(180deg, #f8f9fa 0%, white 100%);
    position: relative;
    overflow: hidden;
}

.how-it-works-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
    z-index: 0;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 1;
    margin-top: 60px;
}

.how-step {
    text-align: center;
    position: relative;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.how-step:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.step-number {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #003b5a, #0076c7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 59, 90, 0.3);
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 20px auto;
    background: linear-gradient(135deg, #f0f7ff, #e0edff);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #003b5a;
    transition: all 0.3s ease;
}

.how-step:hover .step-icon {
    transform: rotate(5deg) scale(1.1);
    background: linear-gradient(135deg, #003b5a, #0076c7);
    color: white;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    margin: 20px 0 10px;
}

.step-description {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
}

.step-arrow {
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    font-size: 24px;
    color: #cbd5e0;
    display: none;
}

@media (min-width: 768px) {
    .how-step:not(:last-child) .step-arrow {
        display: block;
    }
}

/* Dual Rotating Sections */
.how-dual-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.how-section-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    min-height: 500px;
}

.how-section-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.how-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.how-section-title i {
    font-size: 28px;
}

.section-teachers .how-section-title {
    color: #003b5a;
}

.section-teachers .how-section-title i {
    color: #0076c7;
}

.section-institutions .how-section-title {
    color: #f7be16;
}

.section-institutions .how-section-title i {
    color: #e5a500;
}

.how-section-subtitle {
    font-size: 14px;
    color: #718096;
}

/* Rotating Steps Container */
.how-rotating-steps {
    position: relative;
    height: 350px;
}

.how-step-slide {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.how-step-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.how-step-number-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    margin: 0 auto 30px;
    color: white;
}

.section-teachers .how-step-number-large {
    background: linear-gradient(135deg, #003b5a, #0076c7);
    box-shadow: 0 8px 20px rgba(0, 59, 90, 0.3);
}

.section-institutions .how-step-number-large {
    background: linear-gradient(135deg, #f7be16, #e5a500);
    box-shadow: 0 8px 20px rgba(247, 190, 22, 0.3);
}

.how-step-content-large {
    text-align: center;
}

.how-step-title-large {
    font-size: 22px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 15px;
}

.how-step-description-large {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 25px;
}

.how-step-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.step-feature-tag {
    padding: 6px 14px;
    background: #f0f7ff;
    border-radius: 20px;
    font-size: 13px;
    color: #003b5a;
    border: 1px solid #e0edff;
}

/* Step Indicators */
.how-step-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
}

.step-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-indicator-dot.active {
    width: 30px;
    border-radius: 15px;
}

.section-teachers .step-indicator-dot.active {
    background: #003b5a;
}

.section-institutions .step-indicator-dot.active {
    background: #f7be16;
}

/* Progress Bar */
.how-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #e2e8f0;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.how-progress-fill {
    height: 100%;
    width: 0;
    transition: width 5s linear;
    border-radius: 0 0 20px 20px;
}

.section-teachers .how-progress-fill {
    background: linear-gradient(90deg, #003b5a, #0076c7);
}

.section-institutions .how-progress-fill {
    background: linear-gradient(90deg, #f7be16, #e5a500);
}

.how-progress-fill.active {
    width: 100%;
}

/* Mobile Responsive for Dual Sections */
@media (max-width: 968px) {
    .how-dual-sections {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .how-section-card {
        min-height: 450px;
    }
}

/* ============================================
   3. TESTIMONIALS CAROUSEL
   ============================================ */

.testimonials-section {
    padding: 80px 0;
    background: white;
    position: relative;
}

.testimonials-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 60px;
}

.testimonial-slide {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.testimonial-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.testimonial-content {
    background: linear-gradient(135deg, #f8f9fa, white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
}

.testimonial-quote {
    font-size: 20px;
    line-height: 1.8;
    color: #2d3748;
    font-style: italic;
    margin-bottom: 30px;
    position: relative;
}

.testimonial-quote::before,
.testimonial-quote::after {
    content: '"';
    font-size: 60px;
    color: #003b5a;
    opacity: 0.2;
    position: absolute;
}

.testimonial-quote::before {
    top: -20px;
    left: -20px;
}

.testimonial-quote::after {
    bottom: -40px;
    right: -20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.author-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #003b5a;
}

.author-info {
    text-align: left;
}

.author-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.author-role {
    font-size: 14px;
    color: #718096;
}

.author-location {
    font-size: 13px;
    color: #a0aec0;
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.carousel-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    color: #003b5a;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.carousel-btn:hover {
    background: #003b5a;
    color: white;
    border-color: #003b5a;
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    width: 30px;
    border-radius: 15px;
    background: #003b5a;
}

/* ============================================
   4. CHAT BUBBLE
   ============================================ */

.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chat-bubble-button {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #003b5a, #0076c7);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 59, 90, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
    position: relative;
}

.chat-bubble-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 59, 90, 0.5);
}

.chat-bubble-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(0, 59, 90, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.chat-bubble-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: white;
    animation: shake 2s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.chat-bubble-tooltip {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: #1a202c;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chat-bubble:hover .chat-bubble-tooltip {
    opacity: 1;
}

.chat-bubble-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 25px;
    width: 12px;
    height: 12px;
    background: #1a202c;
    transform: rotate(45deg);
}

/* ============================================
   5. CHAT MODAL
   ============================================ */

.chat-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.chat-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-modal {
    width: 90%;
    max-width: 500px;
    max-height: 600px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.chat-modal-header {
    background: linear-gradient(135deg, #003b5a, #0076c7);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-modal-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: blink 2s infinite;
}

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

.chat-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chat-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-modal-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-options {
    display: grid;
    gap: 15px;
}

.chat-option {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-option:hover {
    border-color: #003b5a;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chat-option-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f0f7ff, #e0edff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #003b5a;
    flex-shrink: 0;
}

.chat-option-content {
    flex: 1;
}

.chat-option-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.chat-option-desc {
    font-size: 13px;
    color: #718096;
}

.chat-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.form-input,
.form-textarea {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #003b5a;
    box-shadow: 0 0 0 3px rgba(0, 59, 90, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.chat-modal-footer {
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.btn-chat {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-chat-primary {
    background: linear-gradient(135deg, #003b5a, #0076c7);
    color: white;
    flex: 1;
}

.btn-chat-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 59, 90, 0.3);
}

.btn-chat-secondary {
    background: #f8f9fa;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-chat-secondary:hover {
    background: #e2e8f0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .how-steps {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .step-arrow {
        display: none !important;
    }
    
    .testimonials-carousel {
        padding: 20px;
    }
    
    .testimonial-content {
        padding: 20px;
    }
    
    .testimonial-quote {
        font-size: 16px;
    }
    
    .chat-bubble {
        bottom: 20px;
        right: 20px;
    }
    
    .chat-bubble-button {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
    
    .chat-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
}