/* 
Theme Name: English Level Test Theme
Theme URI: https://msrttest.com/
Author: MSRT Test Center
Author URI: https://msrttest.com/
Description: A custom theme for English level testing website with optimized English typography
Version: 3.0.0
License: GPL v2 or later
Text Domain: english-level-test
Tags: rtl-language-support, custom-menu, featured-images
*/

/* ===== NON-CRITICAL STYLES - LOADED ASYNC ===== */

/* Font family after loading */
.fonts-loaded body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== TYPOGRAPHY SCALE ===== */
:root {
    /* Typography scale */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
}

/* ===== COMPONENT STYLES ===== */
/* Contact Bar */
.contact-right {
    display: flex;
    gap: 20px;
}

.phone {
    font-size: 14px;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: white;
    font-size: 24px;
    line-height: 1;
    z-index: 1002;
    position: relative;
    order: 1;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 4px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* Desktop Navigation */
.desktop-nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    order: 2;
    width: auto;
    justify-content: center;
}

.desktop-nav > li {
    position: relative;
}

.desktop-nav a {
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 20px 0;
    display: block;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.desktop-nav a:hover {
    color: #ffcc00;
}

/* Dropdown Styles */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    z-index: 1000;
    padding: 8px 0;
    border: 1px solid #e0e0e0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333;
    font-size: 14px;
    padding: 10px 16px;
    display: block;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: #f5f9ff;
    color: #003366;
    padding-right: 20px;
}

/* Mobile Menu Dropdown */
.mobile-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 10px 10px;
    z-index: 999;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-dropdown.active {
    display: block;
    max-height: 500px;
    opacity: 1;
    visibility: visible;
}

/* Mobile menu styles */
.mobile-menu {
    list-style-type: none;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Main Content */
.main-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}

/* ===== LAYOUT CONTAINERS ===== */
.main-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    margin: 30px auto;
    min-height: 500px;
}

.elt-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: #fafcff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* ===== ENGLISH CONTENT TYPOGRAPHY ===== */
.english-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.8;
    color: #2d3748;
}

.english-content p {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    margin-bottom: 1.75rem;
    text-align: justify;
    hyphens: auto;
    color: #2d3748;
}

.english-content p:first-of-type {
    font-size: var(--font-size-xl);
    line-height: 1.8;
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 2rem;
}

.english-content h1 {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    border-bottom: 3px solid #4299e1;
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}

/* ===== CARDS GRID ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card h4 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #003366;
}

.card p {
    color: #4a5568;
    margin-bottom: 15px;
    flex-grow: 1;
}

.card a {
    display: inline-block;
    background: #0056b3;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.card a:hover {
    background: #003366;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #0056b3;
    color: white;
}

.btn-primary:hover {
    background: #003366;
}

/* ===== FOOTER ===== */
.elt-footer {
    background: #002244;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1024px) {
    .desktop-nav ul {
        gap: 20px;
    }
    
    .main-layout {
        grid-template-columns: 180px 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 20px;
    }
    
    .elt-content {
        padding: 25px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .main-content-wrapper {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }
    
    .elt-content {
        padding: 20px;
    }
    
    .mobile-menu-link {
        padding: 14px 18px;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .top-contact-bar,
    .main-header,
    .sidebar,
    .elt-footer {
        display: none;
    }
    
    .main-content-wrapper {
        margin: 0;
        padding: 0;
    }
    
    .elt-content {
        box-shadow: none;
        padding: 0;
    }
}


