/* main.css - تنسيقات الصفحة الرئيسية وأنماط المظهر والخلفيات المتنوعة */

/* Grid Helpers */
.grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: var(--transition);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(var(--primary-rgb), 0.75) 100%);
    z-index: 1;
}

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

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.95;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Why Us Section */
.why-us-section {
    padding: 80px 0;
    background-color: var(--card-bg);
    transition: background-color 0.4s;
}

.section-title {
    font-size: 2.25rem;
    color: var(--text-color);
    position: relative;
    margin-bottom: 15px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
    transition: var(--transition);
}

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

.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.12),
                0 0 15px 2px rgba(var(--primary-rgb), 0.08),
                inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.feat-card {
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.feat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.feat-card h3 {
    margin-bottom: 12px;
    color: var(--text-color);
}

.feat-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Projects Section */
.projects-section {
    padding: 80px 0;
    background-color: var(--bg-color);
    transition: background-color 0.4s;
}

.project-grid {
    margin-top: 50px;
}

.project-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 15px 35px rgba(var(--primary-rgb), 0.15),
                0 0 20px 2px rgba(var(--primary-rgb), 0.08),
                inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.project-img-wrapper {
    position: relative;
    padding-top: 65%; /* 16:10 Aspect Ratio */
    overflow: hidden;
}

.project-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img {
    transform: scale(1.08);
}

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-color);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-projects {
    padding: 60px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-top: 40px;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a252f 100%);
    color: var(--white);
    padding: 80px 0;
    transition: var(--transition);
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 35px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* -----------------------------------------
   أنماط الخلفيات المتنوعة (Background Modes)
   ----------------------------------------- */

/* النمط الداكن (Dark Mode) */
body.bg-dark {
    --bg-color: #0e131f;
    --card-bg: #161c2a;
    --text-color: #f7fafc;
    --text-muted: #a0aec0;
    --border-color: #242f47;
}

body.bg-dark .card, body.bg-dark .project-card {
    background: rgba(22, 28, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

body.bg-dark .card:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.2),
                0 0 20px 3px rgba(var(--primary-rgb), 0.12),
                inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.bg-dark .project-card:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    box-shadow: 0 15px 35px rgba(var(--primary-rgb), 0.22),
                0 0 25px 4px rgba(var(--primary-rgb), 0.12),
                inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
body.bg-dark .navbar {
    background-color: var(--card-bg);
    border-bottom-color: var(--border-color);
}
body.bg-dark .nav-link {
    color: var(--text-color);
}
body.bg-dark .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
body.bg-dark .form-item input,
body.bg-dark .form-item select,
body.bg-dark .form-item textarea {
    background-color: #1f293d;
    border-color: var(--border-color);
    color: var(--text-color);
}
body.bg-dark .form-item input:focus,
body.bg-dark .form-item textarea:focus {
    background-color: #243048;
}

/* النمط المتدرج (Gradient Mode) */
body.bg-gradient {
    background: linear-gradient(135deg, #f5f7fb 0%, rgba(var(--primary-rgb), 0.1) 100%) !important;
    background-attachment: fixed !important;
}
body.bg-gradient.bg-dark {
    background: linear-gradient(135deg, #0a0e17 0%, #151b29 100%) !important;
    background-attachment: fixed !important;
}

/* النمط الدافئ (Warm Beige) */
body.bg-warm {
    --bg-color: #fcf9f2;
    --card-bg: #ffffff;
    --text-color: #3e3325;
    --text-muted: #8c765c;
    --border-color: #ebdfd3;
}

body.bg-warm .card, body.bg-warm .project-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(140, 118, 92, 0.15);
    box-shadow: 0 8px 32px 0 rgba(140, 118, 92, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

body.bg-warm .card:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.12),
                0 0 15px 2px rgba(var(--primary-rgb), 0.08),
                inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

body.bg-warm .project-card:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 15px 35px rgba(var(--primary-rgb), 0.15),
                0 0 20px 2px rgba(var(--primary-rgb), 0.08),
                inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
body.bg-warm .navbar {
    background-color: #fcf9f2;
    border-bottom: 2px solid var(--border-color);
}
body.bg-warm .form-item input,
body.bg-warm .form-item select,
body.bg-warm .form-item textarea {
    background-color: #fdfdfb;
    border-color: var(--border-color);
}

/* -----------------------------------------
   أنماط التخطيط والواجهات (Layout Styles)
   ----------------------------------------- */

/* 1. التخطيط الكلاسيكي (Classic) */
/* يعتمد التنسيق المفتوح والأساسي */

/* 2. التخطيط الذهبي الفاخر (Modern Gold) */
body.layout-modern_gold {
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 10px;
}
body.layout-modern_gold .navbar-logo {
    color: var(--secondary-color);
}
body.layout-modern_gold .logo-icon {
    color: var(--secondary-color);
}
body.layout-modern_gold .navbar {
    border-bottom: 2px solid var(--secondary-color);
}
body.layout-modern_gold .feat-card {
    border-top: 4px solid var(--secondary-color);
}
body.layout-modern_gold .feat-icon {
    color: var(--secondary-color);
}
body.layout-modern_gold .section-title::after {
    background-color: var(--secondary-color);
}
body.layout-modern_gold .project-card {
    border: 1px solid var(--secondary-color);
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.1);
}
body.layout-modern_gold .project-card:hover {
    box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary-color);
}
body.layout-modern_gold .hero-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(var(--primary-rgb), 0.8) 100%);
}

/* 3. التخطيط الزجاجي البلوري (Glassmorphism) */
body.layout-glassmorphism {
    background-image: radial-gradient(at 0% 0%, rgba(var(--primary-rgb), 0.08) 0px, transparent 50%),
                      radial-gradient(at 50% 0%, rgba(var(--primary-rgb), 0.05) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(var(--primary-rgb), 0.08) 0px, transparent 50%);
    background-attachment: fixed;
}
body.layout-glassmorphism .navbar {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
body.layout-glassmorphism .card,
body.layout-glassmorphism .project-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
}
body.layout-glassmorphism .feat-card {
    border-top: 4px solid var(--primary-color);
}
body.bg-dark.layout-glassmorphism .navbar {
    background: rgba(22, 28, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
body.bg-dark.layout-glassmorphism .card,
body.bg-dark.layout-glassmorphism .project-card {
    background: rgba(22, 28, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

/* 4. التخطيط البسيط (Minimalist) */
body.layout-minimalist {
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-premium: none;
}
body.layout-minimalist .card,
body.layout-minimalist .project-card {
    border: 1px solid var(--border-color);
    box-shadow: none !important;
}
body.layout-minimalist .card:hover,
body.layout-minimalist .project-card:hover {
    transform: none;
    border-color: var(--primary-color);
}
body.layout-minimalist .btn {
    border-radius: 0px !important;
    box-shadow: none !important;
}
body.layout-minimalist .btn:hover {
    transform: none;
}
body.layout-minimalist .section-title::after {
    margin: 10px 0 0; /* Align line to right for RTL in titles */
    width: 40px;
}
body.layout-minimalist .why-us-section .section-title::after,
body.layout-minimalist .projects-section .section-title::after {
    margin-left: auto;
    margin-right: auto;
}

/* ==================== ANNOUNCEMENT BANNER STYLES ==================== */
.announcement-banner {
    padding: 10px 0;
    font-size: 0.95rem;
    font-weight: 700;
    transition: var(--transition);
    position: relative;
    z-index: 10;
    animation: slideIn 0.3s ease-out;
}

.announcement-banner .container.banner-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.banner-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    line-height: 1.4;
}

.banner-icon {
    font-size: 1.15rem;
    animation: pulse 1.5s infinite ease-in-out;
}

.banner-close-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    font-weight: 700;
    opacity: 0.75;
    transition: var(--transition);
    color: inherit;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.banner-close-btn:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.15);
}

/* 1. Standard Color Banners */
.banner-danger {
    background-color: var(--danger-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.banner-warning {
    background-color: #f59e0b;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.banner-info {
    background-color: var(--info-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.banner-success {
    background-color: var(--success-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* 2. Glassmorphic Banners (Adaptation for layout-glassmorphism) */
body.layout-glassmorphism .announcement-banner {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body.layout-glassmorphism .banner-danger {
    background: rgba(239, 68, 68, 0.82);
}

body.layout-glassmorphism .banner-warning {
    background: rgba(245, 158, 11, 0.82);
}

body.layout-glassmorphism .banner-info {
    background: rgba(59, 130, 246, 0.82);
}

body.layout-glassmorphism .banner-success {
    background: rgba(16, 185, 129, 0.82);
}

/* 3. Dark Mode Glassmorphic Banners */
body.bg-dark.layout-glassmorphism .announcement-banner {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.bg-dark.layout-glassmorphism .banner-danger {
    background: rgba(239, 68, 68, 0.65);
}

body.bg-dark.layout-glassmorphism .banner-warning {
    background: rgba(245, 158, 11, 0.65);
}

body.bg-dark.layout-glassmorphism .banner-info {
    background: rgba(59, 130, 246, 0.65);
}

body.bg-dark.layout-glassmorphism .banner-success {
    background: rgba(16, 185, 129, 0.65);
}

/* 4. Minimalist Banners (No shadows, no rounded corners) */
body.layout-minimalist .announcement-banner {
    box-shadow: none !important;
    border-bottom: 1px solid var(--border-color);
}

body.layout-minimalist .banner-close-btn {
    border-radius: 0;
}

/* ==================== RESPONSIVE DESIGN & MEDIA QUERIES ==================== */

/* Tablets & iPads (max-width: 1024px) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.7rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .why-us-section, .projects-section, .cta-section {
        padding: 60px 0;
    }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    .hero-section {
        height: 440px;
    }
    .hero-title {
        font-size: 2.1rem;
        line-height: 1.4;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        padding: 0 15px;
    }
    .hero-buttons .btn {
        width: 100%;
    }
    .section-title {
        font-size: 1.75rem;
    }
    .section-subtitle {
        font-size: 0.95rem;
    }
    .why-us-section, .projects-section, .cta-section {
        padding: 50px 0;
    }
    .card {
        padding: 20px;
    }
    .cta-section h2 {
        font-size: 1.65rem;
    }
    .cta-section p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Very Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-section {
        height: 400px;
    }
    .container {
        padding: 0 15px;
    }
    .announcement-banner {
        font-size: 0.85rem;
        padding: 8px 0;
    }
    .announcement-banner .container.banner-container {
        position: relative;
        padding-right: 15px;
        padding-left: 35px; /* مساحة لزر الإغلاق */
        justify-content: flex-start;
    }
    .banner-content {
        gap: 6px;
    }
    .banner-close-btn {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
}


