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

:root {
  --primary-color: #1e3a8a;
  --secondary-color: #3b82f6;
  --accent-color: #60a5fa;
  --dark-color: #0f172a;
  --light-color: #f8fafc;
  --white: #ffffff;
  --gray: #6b7280;
  --text-dark: #1f2937;
  --text-light: #4b5563;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --border-radius: 8px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-color);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 { 
  font-size: 2.5rem; 
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-weight: 700;
}

h2 { 
  font-size: 2rem; 
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-weight: 600;
}

h3 { 
  font-size: 1.5rem; 
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-weight: 600;
}

h4 { 
  font-size: 1.25rem; 
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-weight: 600;
  }

h5 { 
  font-size: 1.1rem; 
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-weight: 600;
}

h6 { 
  font-size: 1rem; 
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  line-height: 1.6;
}

/* ===== NAVIGATION ===== */
.navbar {
  background: linear-gradient(135deg, var(--dark-color), var(--primary-color)) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  padding: 0.4rem 0;
  transition: var(--transition);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  color: var(--accent-color) !important;
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 38px !important;
  width: 80px !important;
  object-fit: contain;
  transition: var(--transition);
  margin-right: 0.5rem;
}

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

.navbar-nav .nav-link {
  color: var(--white) !important;
  font-weight: 500;
  padding: 0.4rem 0.9rem !important;
  margin: 0 0.1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  font-size: 1rem;
}

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

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
  left: 0;
}

.navbar-toggler {
  border: none;
  padding: 0.15rem 0.4rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2830, 58, 138, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Ensure consistent navbar container */
.navbar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Mobile navbar adjustments */
@media (max-width: 991.98px) {
  .navbar-nav {
    text-align: center;
    padding: 0.5rem 0;
}

  .navbar-nav .nav-link {
    margin: 0.15rem 0;
    padding: 0.6rem 1rem !important;
  }
  
  .navbar-brand img {
    height: 32px !important;
    width: 65px !important;
}

  .navbar-brand {
    font-size: 1.1rem;
}
}

/* ===== HERO SECTION ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/back-1.jpg') center/cover;
  opacity: 0.3;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--white);
  animation: fadeInUp 1s ease;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  letter-spacing: -0.02em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.95);
  animation: fadeInUp 1s ease 0.2s both;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===== CAROUSEL ===== */
.carousel-item {
  height: 100vh;
  background-size: cover;
  background-position: center;
  position: relative;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.8), rgba(59, 130, 246, 0.8));
  z-index: 1;
}

.carousel-caption {
  z-index: 2;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-caption h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  letter-spacing: -0.02em;
}

.carousel-caption p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease 0.2s both;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.7;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid transparent;
  transition: var(--transition);
}

.carousel-indicators [data-bs-target].active {
  background-color: var(--accent-color);
  border-color: var(--white);
}

/* ===== BUTTONS ===== */
.btn {
  padding: 0.7rem 2.2rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-size: 1.08rem;
  box-shadow: 0 2px 8px rgba(30,58,138,0.08);
}

.btn-primary, .btn-light {
  background: #1e3a8a;
  color: #fff !important;
  border: none;
}

.btn-primary:hover, .btn-light:hover, .btn:hover {
  background: #2541b2;
  color: #fff !important;
  transform: scale(1.045);
  box-shadow: 0 4px 16px rgba(30,58,138,0.18);
}

.btn-outline {
  background: #fff;
  color: #1e3a8a !important;
  border: 2px solid #1e3a8a;
}

.btn-outline:hover {
  background: #1e3a8a;
  color: #fff !important;
  border-color: #1e3a8a;
  transform: scale(1.045);
}

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 0;
}

.section-light {
  background-color: var(--white);
}

.section-dark {
  background-color: var(--primary-color);
  color: var(--white);
}

.section-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
}

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

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: none;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ===== LISTS ===== */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  padding-left: 2rem;
  transition: var(--transition);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1rem;
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.2rem;
}

.feature-list li:hover {
  transform: translateX(10px);
  color: var(--secondary-color);
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 1s ease both;
}

.animate-fade-in-left {
  animation: fadeInLeft 1s ease both;
}

.animate-fade-in-right {
  animation: fadeInRight 1s ease both;
}

.animate-slide-up {
  animation: slideInUp 1s ease both;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
  color: var(--white);
  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 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--accent-color);
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }
  
  .carousel-caption h1 {
    font-size: 2.8rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .navbar-nav .nav-link {
    margin: 0.25rem 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2.2rem;
    letter-spacing: -0.01em;
  }
  
  .carousel-caption h1 {
    font-size: 2.2rem;
    letter-spacing: -0.01em;
  }
  
  .carousel-caption p {
    font-size: 1.1rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.py-5 { padding: 3rem 0; }
.px-4 { padding: 0 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ===== LOADING ANIMATION ===== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== TABLE STYLES ===== */
.table th {
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
  font-weight: 600;
  border: none;
  padding: 1rem;
}

.table td {
  vertical-align: middle;
  text-align: center;
  padding: 1rem;
  border-color: rgba(0, 0, 0, 0.1);
}

.table-hover tbody tr:hover {
  background-color: rgba(30, 58, 138, 0.05);
  transform: scale(1.01);
  transition: var(--transition);
}

.product-name-img {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.product-name-img span {
  text-align: left;
  flex: 1;
  font-weight: 500;
}

.product-name-img img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-name-img img:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* ===== HERO SLIDER ===== */
.hero-slider .carousel-item {
  height: 60vh;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-slider .carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.8), rgba(59, 130, 246, 0.8));
  z-index: 1;
}

.hero-slider .carousel-caption {
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
}

.hero-slider .carousel-caption h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-slider .carousel-caption p {
  font-size: 1.1rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}