/* ===================================
   Base & Shared Styles (All Pages)
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.for {
    width: 7%;

    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.05rem;
    font-family: inherit;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    letter-spacing: -0.01em;
}

:root {
    /* Separated Green Colors */
    --green-primary: #10b981;
    --green-dark: #059669;
    --green-light: #34d399;
    --green-bg: #ecfdf5;

    /* Separated Yellow Colors */
    --yellow-primary: #fbbf24;
    --yellow-dark: #f59e0b;
    --yellow-light: #fcd34d;
    --yellow-bg: #fefce8;

    /* White Gradient Backgrounds */
    --bg-white-pure: #ffffff;
    --bg-white-soft: #fefefe;
    --bg-white-warm: #fdfdfd;
    --bg-white-cool: #fafbfc;
    --bg-white-light: #f8f9fa;

    /* Neutral Colors */
    --text-dark: #111827;
    --text-light: #6b7280;
    --bg-light: linear-gradient(135deg, #ffffff 0%, #fafbfc 50%, #f8f9fa 100%);
    --bg-white: #ffffff;
    --border-color: #e5e7eb;

    /* Modern Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Green Shadows */
    --shadow-green: 0 4px 14px 0 rgba(16, 185, 129, 0.15);
    --shadow-green-lg: 0 10px 25px 0 rgba(16, 185, 129, 0.2);

    /* Yellow Shadows */
    --shadow-yellow: 0 4px 14px 0 rgba(251, 191, 36, 0.15);
    --shadow-yellow-lg: 0 10px 25px 0 rgba(251, 191, 36, 0.2);
}

html[dir="rtl"] {
    direction: rtl;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    line-height: 1.85;
    color: var(--text-dark);
    background: var(--bg-light);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 18px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100%;
}

html[dir="rtl"] body {
    text-align: right;
}

/* Header Styles - Glassmorphism Effect */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.3rem 0rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

nav {
    width: 100%;
    padding: 0 .4rem;
    display: flex;
    justify-content: space-between;

    align-items: center;
}

.logo {
    font-size: 1.99rem;
    font-weight: 800;
    color: var(--green-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover {
    color: var(--green-dark);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: .5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 900;
    font-size: 1.4rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.75rem .65rem;
    margin-left: 0rem;
    border-radius: 12px;
    letter-spacing: -0.01em;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green-primary) 0%, var(--green-light) 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

html[dir="rtl"] .nav-links a::before {
    right: 50%;
    transform: translateX(50%);
    border-radius: 0 0 3px 3px;
}

html[dir="ltr"] .nav-links a::before {
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px 3px 0 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-links a:hover {
    color: var(--green-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-green);
}

.nav-links a:hover::after {
    opacity: 1;
}

.nav-links a:hover::before {
    width: 70%;
}

/* Active Page Indicator */
.nav-links a.active {
    color: var(--green-primary);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    font-weight: 700;
    transform: translateY(-2px);
    box-shadow: var(--shadow-green);
}

.nav-links a.active::after {
    opacity: 1;
}

.nav-links a.active::before {
    width: 80%;
    background: linear-gradient(90deg, var(--green-primary) 0%, var(--green-light) 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Navigation Badge Styles */
/* Navigation Badge Styles */
.nav-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #22c55e;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
    z-index: 10;
}

html[dir="rtl"] .nav-badge {
    right: auto;
    left: -12px;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 251, 252, 0.98) 100%);
    border-radius: 0;
}

/* Footer - Modern Design */
footer {
    background: var(--text-dark);
    color: white;
    text-align : center;
    padding: 3rem 2rem;
    margin-top: auto;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--green-primary) 0%, var(--yellow-primary) 100%);
}

/* Add padding to bottom of main to prevent footer overlap */
main {
    padding-bottom: 9rem;
    /* Increased to account for larger footer */
}

footer p {
    margin: 0.5rem 0;
    /* Restored breathing room */
    opacity: 0.9;
    font-size: 1.1rem;
    /* Restored readable font size */
    font-weight: 500;
}

/* Responsive Design - Base */
@media (max-width: 1024px) {
    body {
        font-size: 16px;
    }

    main {
        padding: 3rem 1.5rem;
    }

    .logo {
        font-size: 1.75rem;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.65rem 0.55rem;
    }
}

/* Responsive media queries removed to enforce desktop layout on mobile */

/* Global Button Disabled State */
button:disabled,
.btn:disabled,
input[type="submit"]:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(0.5);
    background-color: #9ca3af !important;
    /* Optional: Neutral gray to look "hovered" / inactive */
    color: #e5e7eb !important;
}

/* Ensure hover effects are killed on disabled */
button:disabled:hover,
.btn:disabled:hover {
    transform: none;
    box-shadow: none;
    background-color: #9ca3af !important;
}