/* ============================================
   4Skills Academy - Base Styles
   Variables, Reset, Typography, RTL, Accessibility
   ============================================ */

/* CSS Variables for Brand Colors */
:root {
    --primary-color: #0067B1;
    --secondary-color: #6E3FA3;
    --accent-color: #F47721;
    --tertiary-color: #00A499;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #334155;
    --text-light: #64748b;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #0067B1 0%, #6E3FA3 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

body.splash-active {
    overflow: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
}

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

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.section-padding {
    padding: 5rem 0;
}

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

/* Utility Classes */
.bg-light {
    background-color: var(--light-color);
}

.bg-dark {
    background-color: var(--dark-color);
}

.bg-primary {
    background: var(--gradient);
}

.bg-gradient {
    background: var(--gradient);
}

.text-white {
    color: var(--white) !important;
}

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

.lead {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

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

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

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

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

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

[dir="rtl"] .lang-dropdown {
    left: 0;
    right: auto;
}

[dir="rtl"] .program-list li {
    padding-left: 0;
    padding-right: 1.5rem;
}

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

[dir="rtl"] .pillar-item,
[dir="rtl"] .process-step,
[dir="rtl"] .info-item,
[dir="rtl"] .event-card {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .nav-menu {
    left: auto;
    right: -100%;
}

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

[dir="rtl"] .card-link i,
[dir="rtl"] .read-more i {
    transform: scaleX(-1);
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    inset: 0;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.splash-hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    color: var(--white);
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.splash-content h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: 1px;
}

.splash-content p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 500;
    opacity: 0.9;
}

.splash-logo {
    width: clamp(110px, 25vw, 150px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .scroll-top,
    .lang-selector,
    .hero-slider,
    .slider-btn,
    .slider-dots,
    .mobile-menu-toggle,
    form,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .section-padding {
        padding: 1rem 0;
    }

    a {
        text-decoration: underline;
        color: #000;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    :root {
        --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.3);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Responsive Typography */
@media (max-width: 968px) {
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .section-title {
        font-size: 1.75rem;
    }
}
