/* AHMAD NGO - PROFESSIONAL MODERN DESIGN */
/* Inspired by high-quality web design standards */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional Color Palette */
    --primary: #1a365d;
    --primary-light: #2d4a68;
    --accent: #3182ce;
    --accent-light: #63b3ed;
    --success: #38a169;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-gray: #edf2f7;
    --border: #e2e8f0;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    font-size: 16px;
    font-weight: 400;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    width: 25px;
    height: 18px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    position: absolute;
    left: 0;
    transition: 0.3s;
}

.nav-toggle span:nth-child(1) {
    top: 0px;
}

.nav-toggle span:nth-child(2) {
    top: 8px;
}

.nav-toggle span:nth-child(3) {
    top: 16px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: pulseBadge 2.8s ease-in-out infinite;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-accent {
    background: linear-gradient(45deg, #63b3ed, #90cdf4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    height: 400px;
}

.hero-circles {
    position: relative;
    width: 100%;
    height: 100%;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 20%;
    animation-delay: 2s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 40%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Subtle pulse for single-emoji badge */
@keyframes pulseBadge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.35); }
    50% { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(255,255,255,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section:nth-child(even) {
    background: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about-content h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-content h3:first-child {
    margin-top: 0;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.values {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.value-item:hover {
    transform: translateY(-5px);
}

.value-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.value-text h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.value-text p {
    color: var(--text-secondary);
    margin: 0;
}

/* Programs Section */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.program-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.program-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.program-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.program-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.program-card ul {
    list-style: none;
    padding: 0;
}

.program-card li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.program-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Program Schedule */
.program-schedule {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 20px;
    margin-top: 3rem;
    text-align: center;
}

.program-schedule h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.schedule-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.schedule-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.schedule-item strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Impact Section */
/* Curriculum Section */
.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grade-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.grade-title {
    color: var(--primary);
    margin-bottom: 1rem;
}

.course-list {
    display: grid;
    gap: 1rem;
}

.course-item h4 {
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.course-item p {
    color: var(--text-secondary);
    margin: 0;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.impact-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.impact-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.impact-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.testimonial {
    background: var(--gradient);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
}

.testimonial blockquote {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial cite {
    font-weight: 600;
    opacity: 0.9;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.contact-info h3:first-child {
    margin-top: 0;
}

.contact-item {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.contact-item strong {
    color: var(--primary);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

/* Footer */
.footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    margin-bottom: 0.5rem;
}

.footer-brand p {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 45px;
}

.lang-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-toggle {
    margin-right: 1rem;
    margin-left: 0;
}

[dir="rtl"] .hero-content {
    text-align: right;
}

[dir="rtl"] .section-header {
    text-align: right;
}

/* Mobile Menu Active States - Perfect Symmetrical X */
.nav-toggle.active span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

.nav-menu.active {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    z-index: 1000;
}

.nav-menu.active .nav-link {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    text-align: center;
}

.nav-menu.active .nav-link:last-child {
    border-bottom: none;
}

.hamburger-content {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.nav-menu.active .hamburger-content {
    display: flex;
}

.hamburger-content h4 {
    color: var(--primary);
    margin-top: 0.5rem;
}

.hamburger-content ul {
    padding-left: 1.25rem;
}

.hamburger-content li {
    list-style: disc;
}

/* Mobile Navigation */
.nav-menu.active {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    z-index: 1000;
}

.nav-menu.active .nav-link {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.nav-menu.active .nav-link:last-child {
    border-bottom: none;
}

.nav-menu.active .language-toggle {
    display: flex !important;
    margin: 1rem 0 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    justify-content: center;
    gap: 0.5rem;
}

.nav-menu.active .lang-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 45px;
}

/* Mobile Language Button (visible next to hamburger) */
.mobile-language-button {
    display: none;
    margin-right: 1rem;
}

.mobile-lang-toggle {
    background: linear-gradient(135deg, var(--primary), #4CAF50);
    border: none;
    border-radius: 25px;
    padding: 0.6rem 1rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    min-width: 70px;
    justify-content: center;
}

.mobile-lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.mobile-lang-toggle:active {
    transform: translateY(0);
}

.lang-icon {
    font-size: 1.1rem;
    animation: globe-spin 3s linear infinite;
}

.lang-text {
    font-weight: 700;
    letter-spacing: 0.5px;
}

@keyframes globe-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .language-toggle {
        display: none;
    }
    
    .mobile-language-button {
        display: block;
    }
    
    /* Override for mobile menu */
    .nav-menu.active .language-toggle {
        display: flex !important;
    }
    
    .nav-menu.active .lang-btn {
        display: inline-block !important;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
    }
    
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 1rem;
    }
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

.section {
    animation: fadeInUp 0.6s ease-out;
}