/* ====================================
   MAIN STYLESHEET (main.css)
   Common styles for the entire website.
   ==================================== */

/* --- 1. Global Styles & Variables (Essential for consistency) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
  --dark-blue: #2C3E50;
  --light-gray: #F4F4F4;
  --white: #FFFFFF;
  --bright-blue: #3498DB;
  --medium-blue: #2980B9;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden; 
}

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


/* --- 2. Header Styles --- */

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    background: #2980b9;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

nav ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
}

nav ul li a:hover {
    color: #2980b9;
    background: rgba(102, 126, 234, 0.1);
}

.nav-cta {
    background: linear-gradient(135deg, #2980b9 0%, #2c3e50 100%);
    color: white !important;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}




/* --- 3. Footer Styles --- */

footer {
  background: var(--dark-blue);
  color: var(--white);
  padding: 40px 0 20px;
}


.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}


.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: baseline;
}

.footer-section {
  flex: 1;
  min-width: 220px;
}

.footer-section .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section .logo i {
  font-size: 1.5rem;
  color: var(--bright-blue);
}

.footer-section h3 {
color: var(--white);
  margin-bottom: 1rem;
  font-weight: 600; 
  font-size: 1.1rem; 
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--bright-blue);
}

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

.social-links a {
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    background: var(--bright-blue);
    transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* --- 4. Back to Top Button Styles --- */

.back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #2980b9, #2c3e50);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.back-to-top.show {
    display: block;
}



/* --- Responsive Navigation Bar --- */
.nav-toggle {
    display: none; 
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5em;
    position: absolute; 
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001; 
}

.hamburger {
    display: block;
    position: relative;
    width: 2em;
    height: 3px;
    background: var(--dark-blue);
    transition: transform 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--dark-blue);
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* --- 'X' Animation When Menu is Open --- */
.nav-open .hamburger {
    background: transparent;
}
.nav-open .hamburger::before {
    transform: rotate(45deg);
    top: 0;
    background: var(--white); 
}
.nav-open .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
    background: var(--white); 
}

/* اخفي نسخة الموبايل افتراضيًا */
.mobile-cta {
    display: none;
}

/* --- Mobile Styles (Show Menu, etc.) --- */
@media (max-width: 768px) {
    /* Show the hamburger menu on mobile */
    .nav-toggle {
        display: block;
    }
    
    
    .nav-cta {
        display: none;
    }

    
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 60%;
        max-width: 300px;
        background: var(--dark-blue);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        z-index: 1000;
    }
    
    
    .nav-open .nav-links {
        transform: translateX(0);
    }
    
    
    .nav-links li a {
        color: var(--white);
        font-size: 1.5rem;
    }

   /* ✅ زرار الموبايل يظهر جوة القائمة */
    .mobile-cta {
        display: block !important;
        width: 100%;
        text-align: center;
    }

    .mobile-cta .nav-cta {
        font-size: 1.2rem;
        padding: 0.8rem 2rem;
        background: linear-gradient(135deg, #2980b9 0%, #2c3e50 100%);
        color: white !important;
        border-radius: 50px;
        margin-top: -5rem;
        display: inline-block;
    }

    /* نخفي نسخة الديسكتوب */
    .desktop-cta {
        display: none !important;
    }
}
