/* Tarteel | ترتيل - Main Stylesheet */

:root {
    --primary-color: #dc143c;
    --primary-dark: #a00d2d;
    --background-dark: #0a0e27;
    --background-light: #1a1f3a;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --border-color: #2a2f4a;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    --font-family-ar: 'Cairo', sans-serif;
    --font-family-en: 'Poppins', sans-serif;
    
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-en);
    background-color: var(--background-dark);
    color: var(--text-light);
    line-height: 1.6;
}

html[dir="rtl"] body {
    font-family: var(--font-family-ar);
    direction: rtl;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-dark) 100%);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Hamburger on left side */
html[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

.logo a {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo a:hover {
    color: var(--text-light);
}

.logo {
    flex: 0 0 auto;
    margin: 0 1rem;
}

/* Navigation */
.nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

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

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

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

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.lang-btn:hover {
    background-color: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

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

.btn-admin {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-admin:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    order: -1;
}

html[dir="rtl"] .mobile-menu-toggle {
    order: -1;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    transition: var(--transition);
    display: block;
}

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

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

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

/* Sticky Top */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-dark) 100%);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-light);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 3rem;
}

/* Cards */
.card {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.card-text {
    color: var(--text-gray);
    line-height: 1.8;
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-light);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-light);
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

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

/* Footer */
.footer {
    background-color: var(--background-light);
    border-top: 2px solid var(--primary-color);
    padding: 60px 0 20px;
    margin-top: 80px;
}

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

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.footer-section a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-gray);
}

/* Utilities */
.text-center {
    text-align: center;
}

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

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

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }

.pb-1 { padding-bottom: 1rem; }
.pb-2 { padding-bottom: 2rem; }

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

/* Sticky Top */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 999;
}
