/* style.css - FINAL MASTER VERSION */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Montserrat:wght@300;400;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary-red: #C8102E;
    --primary-blue: #0077B6;
    
    /* Tech Theme */
    --tech-dark: #0f172a;
    --tech-light: #f1f5f9;
    --tech-accent: #38bdf8;
    
    /* Text & BG */
    --text-main: #334155;
    --bg-color: #f8fafc;
    
    /* Fonts */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-ar);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

body[dir="rtl"] { text-align: right; }
body[dir="ltr"] { text-align: left; font-family: var(--font-en); }

/* ================= HEADER & NAVIGATION ================= */
header {
    position: fixed; width: 100%; top: 0; z-index: 2000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    height: 90px; /* Fixed height to prevent jumping */
}

/* LOGO FIX */
.logo { display: flex; align-items: center; gap: 15px; text-decoration: none; z-index: 2001; }
.logo img {
    height: 60px; /* Force small size */
    width: 60px;
    object-fit: cover; border-radius: 50%;
    border: 2px solid #eee;
}
.logo-text {
    font-size: 1.4rem; font-weight: 900; color: var(--primary-red);
    text-transform: uppercase; line-height: 1; display: flex; flex-direction: column;
}
.logo-text span { color: var(--primary-blue); font-size: 0.8em; }

/* MENU FIX */
nav { display: flex; align-items: center; }
nav ul { list-style: none; display: flex; gap: 25px; margin: 0; padding: 0; }
nav a { text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 0.95rem; transition: 0.3s; }
nav a:hover { color: var(--primary-red); }

.lang-btn { padding: 5px 15px; border: 1px solid var(--text-main); border-radius: 50px; font-size: 0.8rem; cursor: pointer; }
.menu-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; z-index: 2001; }
.menu-toggle span { width: 30px; height: 3px; background: var(--text-main); border-radius: 3px; }

/* ================= LAYOUT BASICS ================= */
/* Padding top ensures content doesn't hide behind header */
.container { padding: 140px 10% 80px; position: relative; }
.btn {
    display: inline-block; padding: 15px 45px; 
    background: linear-gradient(90deg, var(--primary-red), #a0001e);
    color: white; text-decoration: none; font-weight: bold; 
    border-radius: 50px; transition: 0.3s;
    box-shadow: 0 10px 20px rgba(200, 16, 46, 0.3);
}
.btn:hover { transform: translateY(-3px); }

/* ================= HOMEPAGE HERO ================= */
.hero {
    height: 90vh; display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative; color: white; background: #000;
    padding: 0 20px; margin-bottom: 60px;
}
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, rgba(0, 119, 182, 0.4), rgba(0, 0, 0, 0.7)); z-index: 1;
}
.hero-content {
    position: relative; z-index: 2; padding: 40px; max-width: 900px; width: 100%;
    background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 20px;
}
.hero h1 { font-size: 3rem; color: #fff; margin-bottom: 15px; }
.hero p { font-size: 1.2rem; color: #f1f5f9; margin-bottom: 30px; }

/* ================= SERVICES PAGE (DASHBOARD) ================= */
.services-hero {
    background: linear-gradient(135deg, var(--tech-dark) 0%, #1e293b 100%);
    padding: 160px 20px 100px;
    text-align: center; color: white; position: relative; overflow: hidden;
}
.track-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px; margin-top: -50px; position: relative; z-index: 2; padding: 0 20px;
}
.track-card {
    background: white; border-radius: 20px;
    border: 1px solid rgba(200,200,200,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    display: flex; flex-direction: column; overflow: hidden;
}
.track-header { background: #f8fafc; padding: 25px; border-bottom: 1px solid #e2e8f0; position: relative; }
.track-icon {
    width: 60px; height: 60px; background: var(--tech-light);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin-bottom: 15px; color: var(--primary-blue);
    border: 1px solid #cbd5e1;
}
.track-body { padding: 30px; flex-grow: 1; }
.curriculum-list { list-style: none; padding: 0; }
.curriculum-list li {
    padding: 10px 0; border-bottom: 1px dashed #e2e8f0;
    color: var(--text-main); font-size: 0.95rem; display: flex; align-items: center; gap: 10px;
}
.curriculum-list li::before { content: '›'; color: var(--tech-accent); font-weight: bold; }
.track-footer { padding: 20px; background: #f1f5f9; text-align: center; }

/* ================= SECTORS & CARDS ================= */
.sectors-grid, .services-photo-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; margin-top: 40px;
}
.sector-card, .service-photo-card {
    background: white; border-radius: 20px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid #f1f5f9;
    display: flex; flex-direction: column;
}
.sector-img-container, .service-img-wrapper { height: 200px; width: 100%; overflow: hidden; }
.sector-img-container img, .service-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.sector-content, .service-info { padding: 25px; text-align: center; }

/* ================= SECTORS CAROUSEL ================= */
.carousel-wrapper { overflow: hidden; padding: 20px 0; width: 100%; }
.carousel-track { display: flex; gap: 20px; width: max-content; animation: scroll 30s linear infinite; }
.sector-slide { width: 300px; height: 200px; border-radius: 15px; overflow: hidden; flex-shrink: 0; }
.sector-slide img { width: 100%; height: 100%; object-fit: cover; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ================= PHILOSOPHY CARD ================= */
.tech-card-container {
    background: white; border-radius: 30px; padding: 60px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05); position: relative; overflow: hidden;
}
.tech-card-container::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-blue));
}

/* ================= LEGAL PAGE ================= */
.legal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.legal-card { background: white; padding: 30px; border-radius: 12px; border-right: 5px solid var(--primary-blue); box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.legal-card.warning { border-right-color: var(--primary-red); }
.legal-card.money { border-right-color: #27ae60; }
.legal-ref { font-size: 0.8rem; background: #eee; padding: 5px; border-radius: 5px; display: inline-block; margin-bottom: 10px; }

/* ================= FOOTER ================= */
footer { background: var(--tech-dark); color: white; padding: 50px 10%; text-align: center; }

/* ================= MOBILE FIXES ================= */
@media (max-width: 768px) {
    /* Menu */
    .menu-toggle { display: flex; }
    nav {
        position: fixed; top: 0; left: 0; width: 100%; height: 0;
        background: white; overflow: hidden; transition: 0.4s;
        flex-direction: column; justify-content: center; z-index: 1999;
    }
    nav.active { height: 100vh; }
    nav ul { flex-direction: column; gap: 30px; }
    
    /* Structure */
    .container { padding: 120px 5% 60px; }
    .hero { height: 80vh; padding: 0 15px; }
    .hero h1 { font-size: 2rem; }
    
    /* Grids */
    .track-container, .sectors-grid, .legal-grid, .services-photo-grid { grid-template-columns: 1fr; }
    .sector-slide { width: 250px; height: 160px; }
}