/* HEADER: голубое небо */
.header {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 40%, #1e88e5 70%, #42a5f5 100%) !important;
    border-bottom: none !important;
}

/* Contacts: белый текст */
.contact-item { color: rgba(255,255,255,0.9) !important; }
.contact-item a { color: #fff !important; }
.contact-item a:hover { color: #fbbf24 !important; }
.contact-item svg { stroke: rgba(255,255,255,0.9) !important; }

/* Burger menu */
.mobile-menu-toggle:hover { background: rgba(255,255,255,0.1) !important; }

/* Card hover effect */
.course-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0); transition: transform 0.4s ease; transform-origin: left;
}
.course-card:hover::before { transform: scaleX(1); }

/* Footer shimmer border */
.footer::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #42a5f5, #4db6ac, #fbbf24, #42a5f5);
    background-size: 300% 100%; animation: shimmer 4s linear infinite;
}

/* Green circular floating button - expands on hover to show text */
.floating-form-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #209781;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(32, 151, 129, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: none;
}

.floating-form-btn:hover {
    width: 210px;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(32, 151, 129, 0.5);
}

.floating-form-btn svg {
    color: #fff;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.floating-btn-text {
    display: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.floating-form-btn:hover .floating-btn-text {
    display: inline;
    opacity: 1;
}

@media (max-width: 768px) {
    .floating-form-btn {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
    }
    .floating-form-btn:hover {
        width: 180px;
    }
    .floating-btn-text {
        font-size: 0.8rem;
    }
}

/* Logo height — restore to 90px */
.header-logo img {
    height: 90px !important;
}

/* Bigger phone numbers on mobile */
@media (max-width: 768px) {
    .contact-item {
        font-size: 16px !important;
    }
    .contact-item svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ==================== FLOATING MODAL FORM ==================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Modal */
.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: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 1;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close:hover {
    background: var(--bg-warm-gray);
}

.close svg {
    color: var(--text-secondary);
}

/* Modal Body */
.modal-body {
    padding: 24px;
}

/* Body scroll lock when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
}

/* ==================== FIX: White text on white background in dropdown ==================== */
@media (max-width: 768px) {
    .dropdown-menu a {
        color: #000 !important;
        padding-left: 36px;
    }
    
    .dropdown-menu a:hover {
        color: var(--primary-color) !important;
    }
}

/* ==================== FIX: Mobile menu toggle button ==================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        margin-left: auto;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 2.5px;
        background-color: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
        transform-origin: center;
    }
    
    /* Active state - transform to X */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(7.5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-7.5px);
    }
}