/* Kurdistan Quality Auditing Academy - Enhanced Responsive Styles with RTL Support */

:root {
    /* Color Palette - Gold & Bronze from Logo */
    --primary: #B8964F;
    --primary-dark: #9A7A3D;
    --secondary: #1A1A1A;
    --accent: #D4AF6A;
    --text-primary: #2D2D2D;
    --text-secondary: #5A5A5A;
    --bg-light: #FAFAFA;
    --bg-white: #FFFFFF;
    --border-color: #E5E5E5;
    
    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Merriweather', Georgia, serif;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --section-padding: 6rem 0;
    --radius: 12px;
    --radius-sm: 8px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.7;
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* RTL Support for Kurdish */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    text-align: right;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--secondary);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(184, 150, 79, 0.1);
    border-radius: 50px;
    padding: 0.25rem;
}

.language-switcher a {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    color: var(--text-primary);
}

.language-switcher a.active {
    background: var(--primary);
    color: white;
}

.language-switcher a:hover:not(.active) {
    background: rgba(184, 150, 79, 0.2);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
}

.logo img {
    height: clamp(50px, 8vw, 60px);
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
    flex-wrap: wrap;
}

.nav-menu a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(0.875rem, 1.5vw, 0.95rem);
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

html[dir="rtl"] .nav-menu a::after {
    left: auto;
    right: 0;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.cta-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.cta-btn::after {
    display: none;
}

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

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
    transition: var(--transition);
}

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

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

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

/* Hero Section */
.hero {
    padding: clamp(8rem, 15vh, 10rem) 0 clamp(4rem, 8vh, 6rem);
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(184, 150, 79, 0.15);
    color: var(--accent);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(184, 150, 79, 0.3);
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero h1 .highlight {
    color: var(--accent);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: clamp(0.875rem, 1.5vw, 1rem) clamp(1.5rem, 3vw, 2rem);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

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

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline-white:hover {
    background: white;
    color: var(--secondary);
}

.btn-white {
    background: white;
    color: var(--secondary);
}

.btn-white:hover {
    background: var(--accent);
    color: white;
}

.btn-lg {
    padding: clamp(1rem, 2vw, 1.25rem) clamp(2rem, 4vw, 2.5rem);
    font-size: clamp(1rem, 1.75vw, 1.125rem);
}

/* Page Header */
.page-header {
    padding: clamp(8rem, 15vh, 10rem) 0 clamp(4rem, 8vh, 6rem);
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    position: relative;
}

.page-header-content {
    max-width: 800px;
    color: white;
}

.page-header h1 {
    color: white;
    margin-bottom: 1.5rem;
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
}

/* Sections */
.section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto clamp(2rem, 5vw, 4rem);
}

.section-badge {
    display: inline-block;
    background: rgba(184, 150, 79, 0.1);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(184, 150, 79, 0.3);
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: clamp(1rem, 1.75vw, 1.125rem);
    color: var(--text-secondary);
}

/* Cards */
.service-card,
.program-card,
.course-card,
.membership-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2rem);
    transition: var(--transition);
    height: 100%;
}

.service-card:hover,
.program-card:hover,
.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-icon {
    width: clamp(50px, 10vw, 60px);
    height: clamp(50px, 10vw, 60px);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    color: white;
    margin-bottom: 1.5rem;
}

.service-title,
.program-title,
.course-title {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: clamp(1.125rem, 2vw, 1.25rem);
}

.service-description,
.program-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

.service-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-list li {
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-secondary);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

html[dir="rtl"] .service-list li {
    padding-left: 0;
    padding-right: 1.75rem;
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

html[dir="rtl"] .service-list li::before {
    left: auto;
    right: 0;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: clamp(3rem, 6vw, 5rem) 0;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 20vw, 200px), 1fr));
    gap: clamp(2rem, 4vw, 3rem);
}

.stat-box {
    text-align: center;
}

.stat-number {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: clamp(1rem, 1.75vw, 1.125rem);
    opacity: 0.95;
}

/* Membership Cards */
.membership-card.featured {
    border-color: var(--primary);
    position: relative;
}

.membership-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

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

.membership-tier {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.membership-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

.membership-features {
    list-style: none;
    margin-bottom: 2rem;
}

.membership-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 40vw, 280px), 1fr));
    gap: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

.form-control {
    width: 100%;
    padding: clamp(0.875rem, 1.5vw, 1rem);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Footer */
.footer {
    background: var(--secondary);
    color: rgba(255, 255, 255, 0.8);
    padding: clamp(3rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2rem);
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 30vw, 250px), 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.footer-brand .footer-logo {
    height: clamp(50px, 8vw, 60px);
    margin-bottom: 1.5rem;
}

.footer-description {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

.footer-heading {
    color: white;
    font-size: clamp(1rem, 1.75vw, 1.125rem);
    margin-bottom: 1.5rem;
    font-family: var(--font-primary);
    font-weight: 600;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.75rem;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--accent);
    padding-left: 5px;
}

html[dir="rtl"] .footer-links a:hover,
html[dir="rtl"] .footer-contact a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: clamp(3rem, 6vw, 5rem) 0;
    text-align: center;
    color: white;
}

.cta-title {
    color: white;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --section-padding: 4rem 0;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(280px, 80vw);
        background: var(--bg-white);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 0;
        transform: translateX(100%);
        transition: var(--transition);
        z-index: 999;
        overflow-y: auto;
    }
    
    html[dir="rtl"] .nav-menu {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 0;
        width: 100%;
    }
    
    .language-switcher {
        margin: 1rem 0;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .membership-card.featured {
        transform: none;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-white { color: white; }
.bg-light { background: var(--bg-light); }
.bg-white { background: var(--bg-white); }

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading State */
body:not(.loaded) {
    opacity: 0;
}

body.loaded {
    animation: fadeInUp 0.5s ease-out;
    opacity: 1;
}
