/* ===== VARIABLES ===== */
:root {
  --primary: #dc3545;
  --secondary: #6c757d;
  --success: #198754;
  --info: #0dcaf0;
  --warning: #ffc107;
  --danger: #dc3545;
  --dark: #212529;
  --light: #f8f9fa;
  --header-bg-color: rgba(222, 38, 39, 0.39);
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  padding-top: 76px;
  line-height: 1.6;
  color: var(--dark);
  background-color: #ffffff;
}

body {
  padding-top: 90px;
}

@media (max-width: 991.98px) {
  body {
    padding-top: 80px;
  }
}

.badge {
  --bs-badge-padding-x: 0.65em;
  --bs-badge-padding-y: 0.35em;
  --bs-badge-font-size: 0.75em;
  --bs-badge-font-weight: 700;
  --bs-badge-color: #fff;
  --bs-badge-border-radius: var(--bs-border-radius);
  display: inline-block;
  padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x);
  font-size: var(--bs-badge-font-size);
  font-weight: var(--bs-badge-font-weight);
  line-height: 1;
  color: #360303 !important;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--bs-badge-border-radius);
}

.navbar-modern.scrolled + * {
  margin-top: 70px;
}

/* ===== NAVIGATION ===== */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: #ffffff !important;
  transition: all 0.3s ease;
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary) !important;
}

/* ===== CUSTOM BACKGROUND ===== */
.custom-red-bg {
  background-color: var(--header-bg-color) !important;
}

/* ===== FILTER CHIPS ===== */
.filter-chip {
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.filter-chip.active {
  background-color: var(--primary) !important;
  color: white !important;
  transform: scale(1.05);
}

.filter-chip:hover:not(.active) {
  background-color: var(--light) !important;
  color: var(--dark) !important;
}

/* ===== PAGE HEADERS ===== */
.page-header-full {
  padding: 5rem 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
}

.page-header-full::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--header-gradient, linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%));
}

/* Dynamic header backgrounds - will be overridden by admin settings */
.projects-header-full::before {
  background: var(
    --projects-header-bg,
    url('../images/headers/projects-bg.jpg') center/cover no-repeat,
    linear-gradient(135deg, rgba(25, 135, 84, 0.85) 0%, rgba(15, 81, 50, 0.85) 100%)
  );
}

.team-header-full::before {
  background: var(
    --team-header-bg,
    url('../images/headers/team-bg.jpg') center/cover no-repeat,
    linear-gradient(135deg, rgba(13, 110, 253, 0.85) 0%, rgba(8, 81, 186, 0.85) 100%)
  );
}

.clients-header-full::before {
  background: var(
    --clients-header-bg,
    url('../images/headers/clients-bg.jpg') center/cover no-repeat,
    linear-gradient(135deg, rgba(111, 66, 193, 0.85) 0%, rgba(85, 43, 158, 0.85) 100%)
  );
}

.about-header-full::before {
  background: var(
    --about-header-bg,
    url('../images/headers/about-bg.jpg') center/cover no-repeat,
    linear-gradient(135deg, rgba(220, 53, 69, 0.85) 0%, rgba(173, 32, 46, 0.85) 100%)
  );
}

.contact-header-full::before {
  background: var(
    --contact-header-bg,
    url('../images/headers/contact-bg.jpg') center/cover no-repeat,
    linear-gradient(135deg, rgba(32, 201, 151, 0.85) 0%, rgba(18, 138, 103, 0.85) 100%)
  );
}

.home-header-full::before {
  background: var(
    --home-header-bg,
    url('../images/headers/home-bg.jpg') center/cover no-repeat,
    linear-gradient(135deg, rgba(255, 193, 7, 0.85) 0%, rgba(204, 154, 0, 0.85) 100%)
  );
}

.page-header-full .container {
  position: relative;
  z-index: 2;
}

.page-header-full h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-header-full .lead {
  font-size: 1.25rem;
  font-weight: 300;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-header-full h1,
.page-header-full .lead,
.page-header-full .breadcrumb {
  color: white;
}

.page-header-full .breadcrumb {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  display: inline-block;
}

.page-header-full .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-header-full .breadcrumb-item a:hover {
  color: white;
  text-decoration: underline;
}

.page-header-full .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.9);
}

.page-header-full .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== PROJECT CARDS ===== */
.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  border: none;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

/* ===== CAROUSEL ===== */
.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: 400px;
  background-color: var(--light);
}

.carousel-item {
  height: 100%;
}

.carousel-item img {
  height: 100%;
  object-fit: cover;
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--dark);
  color: white;
  padding: 3rem 0 1rem;
}

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

footer a:hover {
  color: white;
  text-decoration: underline;
}

/* ===== PAGINATION ===== */
.page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
}

.page-link {
  color: var(--primary);
  border: 1px solid #dee2e6;
}

.page-link:hover {
  color: var(--primary);
  background-color: var(--light);
  border-color: #dee2e6;
}

/* ===== CATEGORY HEADERS ===== */
.category-header {
  font-weight: 600;
  margin-top: 2rem;
  font-size: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary);
  position: relative;
}

.category-header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--warning);
}

/* ===== PROJECT ITEMS ===== */
.project-item {
  margin-bottom: 1.5rem;
}

/* ===== BADGES ===== */
.bg-purple {
  background-color: #6f42c1 !important;
}

.badge {
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ===== TEAM STYLES ===== */
.management-photo {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.team-member-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.team-member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.team-member-photo {
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.team-member-card:hover .team-member-photo {
  transform: scale(1.05);
}

.support-team-card {
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.support-team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.support-team-card .card-header {
  border-bottom: none;
  font-weight: 600;
}

.support-team-list {
  max-height: 300px;
  overflow-y: auto;
}

.support-team-member {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.3s ease;
}

.support-team-member:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.support-team-member:last-child {
  border-bottom: none;
}

.support-team-name {
  font-weight: 500;
  color: #333;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #c82333;
  border-color: #bd2130;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .page-header-full {
    padding: 3rem 0;
    min-height: 300px;
  }

  .page-header-full h1 {
    font-size: 2.5rem;
  }

  .page-header-full .lead {
    font-size: 1.1rem;
  }

  body {
    padding-top: 70px;
  }

  .navbar-nav {
    text-align: center;
  }

  .carousel-inner {
    height: 250px;
  }

  .management-photo {
    height: 300px;
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .page-header-full h1 {
    font-size: 2rem;
  }

  .page-header-full .breadcrumb {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .category-header {
    font-size: 1.25rem;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-shadow {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.box-shadow {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.rounded-lg {
  border-radius: 15px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ===== CUSTOM SCROLLBAR ===== */
.support-team-list::-webkit-scrollbar {
  width: 6px;
}

.support-team-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.support-team-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.support-team-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.quality-policy-section {
  position: relative;
  background-attachment: fixed; /* Optional: for parallax effect */
}

.quality-policy-section .quality-content p {
  font-size: 1.25rem;
  line-height: 1.7;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.quality-policy-section .signature img {
  filter: brightness(0) invert(1); /* Makes signature white */
  opacity: 0.9;
}

.quality-policy-section .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* Modern Header Enhancements */
.navbar-modern {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better focus states */
.nav-link-modern:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Loading animation for logo */
.navbar-brand img {
  animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover effects for contact items */
.contact-item {
  position: relative;
  overflow: hidden;
}

.contact-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  transition: left 0.5s;
}

.contact-item:hover::before {
  left: 100%;
}
