/* 1. CSS Variables (Root) */
:root {
  /* Color System */
  --primary-color: #166aea;
  --primary-dark: #0d4f9c;
  --primary-light: #e9f2ff;
  --secondary-color: #ffd166;
  --secondary-dark: #ffc745;
  --accent-color: #e74c3c;
  --accent-dark: #c0392b;
  --success-color: #2ecc71;
  --success-dark: #27ae60;

  /* Text Colors */
  --text-color: #333;
  --text-light: #666;
  --text-lighter: #888;
  --text-white: white;
  --text-muted: #bbb;

  /* Background Colors */
  --bg-light: #f8f9fa;
  --bg-white: white;
  --bg-dark: #222;
  --bg-overlay: rgba(0, 0, 0, 0.9);

  /* Border & Shadow */
  --border-color: #e0e0e0;
  --border-light: #eee;
  --border-dark: #444;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.15);

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  --gradient-hero-overlay: linear-gradient(
    rgba(13, 79, 156, 0.85),
    rgba(13, 79, 156, 0.9)
  );
  --gradient-mobile-menu: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );

  /* Transparent Overlays */
  --overlay-light: rgba(255, 255, 255, 0.15);
  --overlay-lighter: rgba(255, 255, 255, 0.1);
  --overlay-dark: rgba(255, 255, 255, 0.1);
}

/* 2. Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-light);
  padding-top: 120px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

/* 3. Layout Components */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 4. Reusable Components */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(22, 106, 234, 0.3);
}

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

.btn-secondary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--text-white);
}

.card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 5px 15px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--shadow-color);
}

.section-padding {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  color: var(--primary-color);
  font-size: 36px;
  margin-bottom: 15px;
}

.section-title p {
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
  font-size: 18px;
}

/* 5. Header & Navigation (GLOBAL) */
header {
  background: var(--gradient-primary);
  color: var(--text-white);
  padding: 20px 0;
  box-shadow: 0 2px 10px var(--shadow-color);
  position: fixed;
  z-index: 1100;
  top: 0;
  left: 0;
  width: 100%;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-white);
  text-align: left;
  flex-shrink: 0;
}

.logo-wrapper {
  background-color: var(--bg-white);
  border-radius: 50%;
  overflow: hidden;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  padding: 0px;
}

.logo-img {
  width: 100%;
  height: auto;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
}

.logo-text span {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.9;
}

/* Navigation */
nav {
  position: relative;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 5px;
}

.nav-menu > li {
  position: relative;
}

.nav-link {
  color: var(--text-white);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 4px;
  transition: background-color 0.3s;
  display: block;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--overlay-light);
}

/* Dropdown Menu Styles */
.has-dropdown > .nav-link::after {
  content: "▼";
  font-size: 10px;
  margin-left: 5px;
  display: inline-block;
  transition: transform 0.3s;
}

.has-dropdown:hover > .nav-link::after {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  min-width: 220px;
  box-shadow: 0 5px 15px var(--shadow-color);
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.has-dropdown:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--bg-white);
}

.nav-dropdown li {
  border-bottom: 1px solid var(--border-light);
}

.nav-dropdown li:last-child {
  border-bottom: none;
}

.nav-dropdown a {
  color: var(--text-color);
  padding: 12px 20px;
  display: block;
  text-decoration: none;
  transition: background-color 0.3s;
}

.nav-dropdown a:hover {
  background-color: #f5f5f5;
  color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger__icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-white);
  margin: 4px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Mobile Menu Styles */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-overlay);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__content {
  position: absolute;
  top: 100px;            /* push below fixed header */
  right: 0;
  width: 50%;
  max-width: 350px;
  height: calc(100% - 100px);
  background: var(--gradient-mobile-menu);
  padding: 10px 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

.mobile-menu.active .mobile-menu__content {
  transform: translateX(0);
}

/* Mobile menu items */
.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu__item {
  margin-bottom: 5px;
  position: relative;
}

.mobile-menu__link {
  display: block;
  padding: 10px;
  color: var(--text-white);
  text-decoration: none;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-size: 16px;
}

.mobile-menu__link:hover,
.mobile-menu__link.active {
  background-color: var(--overlay-light);
}

/* Mobile submenu */
.mobile-submenu {
  display: none;
}

.mobile-submenu.active {
  display: block;
}

.mobile-submenu__item {
  margin-bottom: 5px;
}

.mobile-submenu__link {
  display: block;
  padding: 12px 15px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-size: 14px;
}

.mobile-submenu__link:hover {
  background-color: var(--overlay-lighter);
}

/* 6. Footer (GLOBAL) */
footer {
  background: var(--bg-dark);
  color: var(--text-muted);
  padding: 60px 0 30px;
}

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

.footer-column h4 {
  color: var(--text-white);
  margin-bottom: 20px;
  font-size: 18px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--text-white);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--overlay-dark);
  border-radius: 50%;
  color: var(--text-white);
  text-decoration: none;
  transition: background 0.3s;
}

.social-links a:hover {
  background: var(--primary-color);
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-dark);
  font-size: 14px;
}

/* 7. Common UI Patterns */
.form-group {
  margin-bottom: 25px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  background-color: #fafafa;
  font-family: "Open Sans", sans-serif;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(22, 106, 234, 0.1);
}

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

/* Newsletter Form */
.newsletter {
  background: var(--gradient-primary);
  color: var(--text-white);
  padding: 60px 0;
  text-align: center;
  margin-top: 80px;
}

.newsletter h3 {
  font-size: 32px;
  margin-bottom: 20px;
}

.newsletter p {
  max-width: 600px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
}

.newsletter-input {
  flex-grow: 1;
  padding: 15px 20px;
  border: none;
  border-radius: 4px 0 0 4px;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
}

.newsletter-btn {
  background: var(--secondary-color);
  color: var(--text-color);
  border: none;
  padding: 0 30px;
  border-radius: 0 4px 4px 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.newsletter-btn:hover {
  background: var(--secondary-dark);
}

/* 8. Global Responsive Styles */
@media (max-width: 992px) {
  .nav-menu {
    gap: 2px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 14px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .header-content {
    position: relative;
    z-index: 1000;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-input,
  .newsletter-btn {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 10px;
  }

  .section-padding {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 30px;
  }
}

@media (max-width: 576px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .container {
    padding: 0 15px;
  }
}

/* 9. Global Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}
