/* Custom Styles for Reading Brain English Academy */

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Link Hover Effects */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1E3A8A, #0EA5E9);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 0;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease-out;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #64748b;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #334155;
    transform: scale(1.1);
}

/* Modal Content Padding */
.modal-content > div {
    padding: 60px 40px 40px;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
        padding-top: 40px;
    }
    
    .modal-content > div {
        padding: 60px 20px 20px;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }
}

/* Scrollbar Styling for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Header Scroll Effect */
#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.1);
}

/* Program Cards Hover Effects */
.program-card {
    transition: all 0.3s ease;
}

.program-card:hover {
    transform: translateY(-5px);
}

/* Button Hover Effects */
.btn-primary {
    background: linear-gradient(135deg, #1E3A8A, #0EA5E9);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1E40AF, #0284C7);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1E3A8A, #0EA5E9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Achievement Stats Animation */
.stat-number {
    font-family: 'Pretendard', system-ui, sans-serif;
    font-weight: 700;
}

/* Contact Cards */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Custom Utilities */
.backdrop-blur-lg {
    backdrop-filter: blur(16px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(6px);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top-color: #1E3A8A;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Typography */
@media (max-width: 640px) {
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-3xl {
        font-size: 1.75rem;
    }
}

/* Custom Focus States */
button:focus,
a:focus {
    outline: 2px solid #0EA5E9;
    outline-offset: 2px;
}

/* Logo Styles */
.logo-container {
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: translateY(-2px);
}

.logo-container img {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.logo-container:hover img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* Print Styles */
@media print {
    .modal-overlay,
    header,
    footer {
        display: none !important;
    }
}