/*
  Quick Theming via CSS Variables
  #1a1a1aff
  #59A8A8
  #71CACA
  - Change all colors in one place: :root color variables below
  - Change all fonts in one place: --primary-font and --secondary-font
  Tip: For semi-transparent overlays, we use --primary-rgb and rgba(var(--primary-rgb), <alpha>)
*/

:root {
  /* Brand Colors */
  --primary-color: #59A8A8;            /* Main brand color (navy) */
  --primary-color-hover: #71CACA;      /* Darker primary for hovers */
  --secondary-color: #71CACA;          /* Accent color (orange) */
  --secondary-color-hover: #71CACA;    /* Darker accent for hovers */

  /* Surfaces & Backgrounds */
  --background-color: #0c0c0c;         /* Page background */
  --surface-color: #0c0c0c;            /* Cards / panels background */
  --surface-muted: #000000ff;            /* Section alternate background */
  --hero-bg-start: #000000ff;            /* Hero gradient start */
  --hero-bg-end: #0c0c0c;              /* Hero gradient end */

  /* Text & Lines */
  --text-color: #333333;               /* Main text */
  --text-light-color: #ffffffff;         /* Secondary text */
  --border-color: #E9ECEF;             /* Input borders, light lines */
  --divider-color: #ffffffff;            /* Footer top divider, etc. */
  --muted-link-color: #ffffffff;         /* Muted link color in footer */

  /* Scrollbar */
  --scrollbar-track: #131313ff;

  /* RGB triplet for alpha usages (matches --primary-color) */
  --primary-rgb: 20, 33, 61;           /* r,g,b of #14213D */

  /* Typography */
  --primary-font: 'Unbounded', sans-serif , Special Gothic Expanded One, sans-serif;
  --secondary-font: 'Unbounded', sans-serif , Special Gothic Expanded One, sans-serif;
}

/* Reset and Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--primary-font);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--secondary-font);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}
h1 { font-size: 3.5rem; font-weight: 700; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; color: var(--text-light-color); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary { background-color: var(--primary-color); color: var(--background-color); }
.btn-primary:hover {
  background-color: var(--primary-color-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.30);
}
.btn-secondary { background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-secondary:hover { background-color: var(--primary-color); color: var(--background-color); transform: translateY(-2px); }

/* Navigation */
.navbar {
  position: fixed; top: 0; width: 100%;
  background-color: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000; padding: 1rem 0; transition: all 0.3s ease;
}
.navbar.scrolled { background-color: rgba(0, 0, 0, 0.98); box-shadow: 0 2px 20px rgba(0,0,0,0.1); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo { height: 40px; width: auto; }
.logo-text { font-size: 1.2rem; font-weight: 600; color: var(--primary-color); }
.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-link { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color 0.3s ease; position: relative; }
.nav-link:hover, .nav-link.active { color: var(--secondary-color); }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background-color: var(--secondary-color); transition: width 0.3s ease; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.hamburger { display: none; flex-direction: column; cursor: pointer; }
.bar { width: 25px; height: 3px; background-color: var(--primary-color); margin: 3px 0; transition: 0.3s; }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%); padding-top: 80px; }
.hero-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-title { font-size: 3.5rem; color: var(--primary-color); margin-bottom: 1.5rem; }
.highlight { color: var(--secondary-color); position: relative; }
.hero-description { font-size: 1.2rem; color: var(--text-light-color); margin-bottom: 2rem; line-height: 1.8; }
.hero-buttons { display: flex; gap: 1rem; margin-bottom: 2rem; }
.hero-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.hero-card { background: var(--surface-color); padding: 2rem; border-radius: 16px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0);; transition: transform 0.3s ease; }
.hero-card i { font-size: 3rem; color: var(--secondary-color); margin-bottom: 1rem; }
.hero-card h3 { color: var(--primary-color); margin-bottom: 0.5rem; }

/* Sections */
section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title { color: var(--primary-color); margin-bottom: 1rem; }
.section-subtitle { font-size: 1.2rem; color: var(--text-light-color); max-width: 600px; margin: 0 auto; }

/* About */
.about { background-color: var(--surface-muted); }
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-text h3 { color: var(--primary-color); margin-bottom: 1rem; margin-top: 2rem; }
.about-text h3:first-child { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2rem; }
.stat { text-align: center; }
.stat h4 { font-size: 2.5rem; color: var(--secondary-color); margin-bottom: 0.5rem; }
.about-image { position: relative; }
.about-img { width: 100%; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.10); }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card { background: var(--surface-color); padding: 2.5rem; border-radius: 16px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.10); transition: transform 0.3s ease; }
.service-card:hover { transform: translateY(-10px); }
.service-icon { width: 80px; height: 80px; background: linear-gradient(135deg, var(--secondary-color), var(--secondary-color-hover)); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }
.service-icon i { font-size: 2rem; color: var(--background-color); }
.service-card h3 { color: var(--primary-color); margin-bottom: 1rem; }
.service-features { list-style: none; margin-top: 1.5rem; }
.service-features li { padding: 0.5rem 0; color: var(--text-light-color); position: relative; padding-left: 1.5rem; }
.service-features li::before { content: '✓'; position: absolute; left: 0; color: var(--secondary-color); font-weight: bold; }

/* Portfolio */
.portfolio { background-color: var(--surface-muted); }
.portfolio-filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; }
.filter-btn { padding: 0.8rem 1.5rem; border: none; background: var(--surface-color); color: var(--text-light-color); border-radius: 8px; cursor: pointer; transition: all 0.3s ease; font-weight: 500; }
.filter-btn.active, .filter-btn:hover { background-color: var(--primary-color); color: var(--background-color); }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.portfolio-item { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.10); transition: transform 0.3s ease; }
.portfolio-item:hover { transform: translateY(-10px); }
.portfolio-image { position: relative; overflow: hidden; }
.portfolio-image img { width: 100%; height: 250px; object-fit: cover; transition: transform 0.3s ease; }
.portfolio-overlay { position: absolute; inset: 0; background: #00000074; color: var(--background-color); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; text-align: center; padding: 2rem; }
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-item:hover .portfolio-image img { transform: scale(1.1); }
.portfolio-overlay h3 { margin-bottom: 0.5rem; }
.portfolio-link { color: var(--secondary-color); font-size: 1.5rem; margin-top: 1rem; transition: transform 0.3s ease; }
.portfolio-link:hover { transform: scale(1.2); }


/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 3rem; }
.team-member { background: var(--surface-color); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.10); transition: transform 0.3s ease; }
.team-member:hover { transform: translateY(-10px); }
.member-image { height: 300px; overflow: hidden; }
.member-image img { width: 100%; height: 100%; object-fit: cover; }
.member-info { padding: 2rem; }
.member-role { color: var(--secondary-color); font-weight: 500; margin-bottom: 1rem; }
.member-description { margin-bottom: 1.5rem; }
.member-skills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.skill { background-color: var(--surface-muted); color: var(--primary-color); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.9rem; font-weight: 500; }
.member-social { display: flex; gap: 1rem; }
.member-social a { color: var(--text-light-color); font-size: 1.2rem; transition: color 0.3s ease; }
.member-social a:hover { color: var(--secondary-color); }

/* Contact */
.contact { background-color: #151515ff; }
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.contact-icon { width: 60px; height: 60px; background: linear-gradient(135deg, var(--secondary-color), var(--secondary-color-hover)); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.contact-icon i { font-size: 1.5rem; color: var(--background-color); }
.contact-details h3 { color: var(--primary-color); margin-bottom: 0.5rem; }
.contact-form { background: #0c0c0c; padding: 2.5rem; border-radius: 16px; box-shadow: 0 10px 40px #0c0c0c; }
.form-group { margin-bottom: 1.5rem; }
.form-group input, .form-group textarea { width: 100%; padding: 1rem; border: 2px solid var(--border-color); border-radius: 8px; font-family: inherit; font-size: 1rem; transition: border-color 0.3s ease; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--secondary-color); }

/* Footer */
.footer { background-color: var(--primary-color); color: var(--background-color); padding: 3rem 0 1rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section h3 { margin-bottom: 1rem; color: var(--secondary-color); }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.5rem; }
.footer-section ul li a { color: var(--muted-link-color); text-decoration: none; transition: color 0.3s ease; }
.footer-section ul li a:hover { color: var(--secondary-color); }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.social-links { display: flex; gap: 1rem; }
.social-links a { color: var(--muted-link-color); font-size: 1.5rem; transition: color 0.3s ease; }
.social-links a:hover { color: var(--secondary-color); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid var(--divider-color); color: var(--muted-link-color); }

/* Responsive */
@media (max-width: 768px) {
  .nav-menu { position: fixed; left: -100%; top: 70px; flex-direction: column; background-color: var(--surface-color); width: 100%; text-align: center; transition: 0.3s; box-shadow: 0 10px 27px rgba(0,0,0,0.05); padding: 2rem 0; }
  .nav-menu.active { left: 0; }
  .hamburger { display: flex; }
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .hero-container { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .hero-title { font-size: 2.5rem; }
  .hero-buttons { justify-content: center; flex-wrap: wrap; }
  .about-content { grid-template-columns: 1fr; gap: 2rem; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .contact-content { grid-template-columns: 1fr; gap: 2rem; }
  .portfolio-filters { flex-wrap: wrap; }
  .hero-visual { grid-template-columns: 1fr; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .container { padding: 0 15px; }
  section { padding: 3rem 0; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .stats { grid-template-columns: 1fr; gap: 1rem; }
  .team-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 0.6s ease-out; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--secondary-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color-hover); }


/*
  Quick Theming via CSS Variables
*/

:root {
  /* Brand Colors */
  --primary-color: #59A8A8;
  --primary-color-hover: #71CACA;
  --secondary-color: #71CACA;
  --secondary-color-hover: #71CACA;

  /* Dark Mode (Default) */
  --background-color: #0c0c0c;
  --surface-color: #1a1a1a;
  --surface-muted: #000000;
  --hero-bg-start: #000000;
  --hero-bg-end: #0c0c0c;
  --text-color: #ffffff;
  --text-light-color: #cccccc;
  --border-color: #333333;
  --divider-color: #333333;
  --muted-link-color: #cccccc;
  --scrollbar-track: #131313;
  --primary-rgb: 20, 61, 42; /* RGB for primary color */
}

/* Light Mode Variables */
body.light-mode {
  --background-color: #f4f4f9;
  --surface-color: #ffffff;
  --surface-muted: #e9ecef;
  --hero-bg-start: #ffffff;
  --hero-bg-end: #f4f4f9;
  --text-color: #333333;
  --text-light-color: #666666;
  --border-color: #dee2e6;
  --divider-color: #dee2e6;
  --muted-link-color: #6c757d;
  --scrollbar-track: #e9ecef;
}


/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--secondary-font);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-color); /* Apply text color variable */
}

p {
  margin-bottom: 1rem;
  color: var(--text-light-color); /* Apply text light color variable */
}

/* Navigation */
.navbar {
  background-color: rgba(17, 17, 17, 0.95);
  /* ... باقي الأنماط ... */
}

body.light-mode .navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-link {
    color: var(--text-light-color); /* Changed from --text-color */
}

body.light-mode .nav-link {
    color: var(--text-color);
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-color);
}


/* Update specific elements for light mode */
body.light-mode .hero-title {
    color: var(--primary-color);
}

body.light-mode .hero-card {
    background: var(--surface-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

body.light-mode .service-card,
body.light-mode .portfolio-item,
body.light-mode .team-member {
    background: var(--surface-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

body.light-mode .contact-form {
    background: var(--surface-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background-color: #f8f9fa;
    border-color: var(--border-color);
    color: var(--text-color);
}

body.light-mode .filter-btn {
    background: var(--surface-muted);
    color: var(--text-color);
}

body.light-mode .filter-btn.active,
body.light-mode .filter-btn:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

body.light-mode .footer {
    background-color: var(--primary-color);
    color: #ffffff;
}

body.light-mode .footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
}

body.light-mode .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}


/* إخفاء لوجو الوضع الفاتح بشكل افتراضي (في الوضع المظلم) */
.logo-light-mode {
    display: none;
}
.logo-dark-mode {
    display: block;
}

/* في الوضع الفاتح، اعكس الإظهار */
body.light-mode .logo-light-mode {
    display: block;
}
body.light-mode .logo-dark-mode {
    display: none;
}

/* تأكد من أن لون النص بجانب اللوجو يتغير أيضًا */
body.light-mode .logo-text {
    color: var(--text-color); /* سيأخذ اللون الأسود من متغيرات الوضع الفاتح */
}
