@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Colors - HSL */
  --background: 0 0% 100%;
  --foreground: 240 85% 8%;

  --card: 0 0% 100%;
  --card-foreground: 240 85% 8%;

  --popover: 0 0% 100%;
  --popover-foreground: 240 85% 8%;

  /* Primary - MILTEX Navy Blue */
  --primary: 241 67% 15%;
  --primary-foreground: 0 0% 100%;

  /* Secondary - Lighter Navy for backgrounds */
  --secondary: 240 15% 96%;
  --secondary-foreground: 241 67% 15%;

  /* Muted - Subtle backgrounds */
  --muted: 240 10% 97%;
  --muted-foreground: 240 10% 45%;

  /* Accent - MILTEX Yellow */
  --accent: 54 100% 50%;
  --accent-foreground: 240 85% 8%;

  /* Destructive */
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 100%;

  /* Borders & Inputs */
  --border: 240 10% 90%;
  --input: 240 10% 90%;
  --ring: 241 67% 15%;

  --radius: 0.75rem;

  /* Custom Design Tokens */
  --gradient-primary: linear-gradient(135deg, hsl(241 67% 15%) 0%, hsl(241 67% 25%) 100%);
  --gradient-accent: linear-gradient(135deg, hsl(54 100% 50%) 0%, hsl(45 100% 60%) 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(13, 12, 63, 0) 0%, rgba(13, 12, 63, 0.8) 100%);

  /* Shadows */
  --shadow-elegant: 0 4px 24px -4px hsl(241 67% 15% / 0.12);
  --shadow-hover: 0 8px 32px -8px hsl(241 67% 15% / 0.18);
  --shadow-accent: 0 4px 20px -4px hsl(54 100% 50% / 0.3);
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-primary {
  color: hsl(var(--primary)) !important;
}

.bg-primary {
  background-color: hsl(var(--primary) / var(--bs-bg-opacity, 1)) !important;
}

.text-primary-foreground {
  color: hsl(var(--primary-foreground)) !important;
}

.text-accent {
  color: hsl(var(--accent)) !important;
}

.bg-accent {
  background-color: hsl(var(--accent) / var(--bs-bg-opacity, 1)) !important;
}

.text-accent-foreground {
  color: hsl(var(--accent-foreground)) !important;
}

.bg-muted {
  background-color: hsl(var(--muted) / var(--bs-bg-opacity, 1)) !important;
}

.badge-accent {
  background-color: hsl(var(--accent)) !important;
  color: hsl(var(--accent-foreground)) !important;
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground)) !important;
}

.gradient-text {
  background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-padding {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

.container-custom {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 640px) {
  .container-custom {
    max-width: 640px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 768px) {
  .container-custom {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    max-width: 1024px;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1280px) {
  .container-custom {
    max-width: 1280px;
  }
}

@media (min-width: 1400px) {
  .container-custom {
    max-width: 1400px;
  }
}

.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-hover);
}

.accent-border {
  position: relative;
}

.accent-border::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 4rem;
  height: 0.25rem;
  background-color: hsl(var(--accent));
}

/* Navbar Customization */
.navbar {
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(var(--border), 0.4);
}

.nav-link {
  font-weight: 500;
  color: hsl(var(--foreground));
  transition: color 0.2s;
}

.nav-link:hover {
  color: hsl(var(--accent));
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: hsl(241, 67%, 13%);
  /* Slightly darker */
  color: hsl(var(--primary-foreground));
}

.btn-accent {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-accent:hover {
  background-color: hsl(45, 100%, 60%);
  color: hsl(var(--accent-foreground));
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

/* Footer Customization */
footer a {
  text-decoration: none;
}

/* Animations */
@keyframes scroll {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(16px);
    opacity: 0;
  }
}

/* About Section Redesign */
.about-card {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-left-color: hsl(var(--accent));
}

.about-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(var(--secondary)) 0%, #ffffff 100%);
  color: hsl(var(--primary));
  border-radius: 12px;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.about-card:hover .about-icon {
  background: hsl(var(--primary));
  color: #ffffff;
  transform: rotateY(180deg);
}

.about-card:hover .about-icon i {
  transform: rotateY(-180deg);
  /* Keep icon facing forward */
}

.bg-pattern-dots {
  background-image: radial-gradient(hsl(var(--primary)) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.05;
}

/* Dark Theme About Section */
.bg-pattern-dots-light {
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
}

.about-card-dark {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.about-card-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 224, 0, 0.3);
  /* Gold accent */
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.about-card-dark .about-icon {
  background: rgba(255, 224, 0, 0.1);
  /* Gold tint */
  color: hsl(var(--accent));
  border: 1px solid rgba(255, 224, 0, 0.2);
}

.about-card-dark:hover .about-icon {
  background: hsl(var(--accent));
  color: hsl(var(--primary));
  box-shadow: 0 0 20px rgba(255, 224, 0, 0.4);
}

/* Stats Section Redesign */
.bg-stats-parallax {
  background-image: url('../img/hero1.png');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.bg-stats-parallax::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(13, 12, 63, 0.9), rgba(13, 12, 63, 0.8));
}

.stat-item {
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: hsl(var(--accent));
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.8);
}

.stat-icon {
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.stat-item:hover .stat-icon {
  color: hsl(var(--accent));
  transform: scale(1.1);
}

/* Contact Section Redesign */
.contact-icon-box {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--primary));
  color: hsl(var(--accent));
  border-radius: 12px;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.contact-info-item:hover .contact-icon-box {
  background-color: hsl(var(--accent));
  color: hsl(var(--primary));
  transform: rotate(15deg);
}

.form-control-custom {
  border: 2px solid transparent;
  background-color: hsl(var(--muted));
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-control-custom:focus {
  background-color: #fff;
  border-color: hsl(var(--accent));
  box-shadow: 0 0 0 4px rgba(255, 224, 0, 0.1);
  outline: none;
}

.form-floating-custom>label {
  padding: 1rem 1.25rem;
}

.contact-card {
  border: none;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-elegant);
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal.reveal-left {
  transform: translateX(-30px);
}

.reveal.reveal-right {
  transform: translateX(30px);
}

.reveal.reveal-left.active,
.reveal.reveal-right.active {
  transform: translateX(0);
}

.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

.delay-400 {
  transition-delay: 0.4s;
}

.delay-500 {
  transition-delay: 0.5s;
}

/* Organization Chart */
.org-chart {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow-x: auto;
  padding: 2rem 0;
}

.org-chart ul {
  padding-top: 20px;
  position: relative;
  transition: all 0.5s;
  display: flex;
  justify-content: center;
  margin: 0;
  padding-left: 0;
}

.org-chart li {
  float: left;
  text-align: center;
  list-style-type: none;
  position: relative;
  padding: 20px 10px 0 10px;
  transition: all 0.5s;
}

/* We will use ::before and ::after to draw the connectors */
.org-chart li::before,
.org-chart li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid hsl(var(--border));
  width: 50%;
  height: 20px;
}

.org-chart li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid hsl(var(--border));
}

/* We need to remove left-right connectors from elements without any siblings */
.org-chart li:only-child::after,
.org-chart li:only-child::before {
  display: none;
}

/* Remove space from the top of single children */
.org-chart li:only-child {
  padding-top: 0;
}

/* Remove left connector from first child and right connector from last child */
.org-chart li:first-child::before,
.org-chart li:last-child::after {
  border: 0 none;
}

/* Adding back the vertical connector to the last nodes */
.org-chart li:last-child::before {
  border-right: 2px solid hsl(var(--border));
  border-radius: 0 5px 0 0;
}

.org-chart li:first-child::after {
  border-radius: 5px 0 0 0;
}

/* Time to add downward connectors from parents */
.org-chart ul ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid hsl(var(--border));
  width: 0;
  height: 20px;
}

.org-chart .org-card {
  border: 1px solid hsl(var(--border));
  padding: 1rem;
  text-decoration: none;
  color: hsl(var(--foreground));
  display: inline-block;
  border-radius: var(--radius);
  transition: all 0.3s;
  background: #fff;
  min-width: 180px;
  box-shadow: var(--shadow-elegant);
  position: relative;
  z-index: 1;
}

.org-chart .org-card:hover {
  background: hsl(var(--secondary));
  border-color: hsl(var(--accent));
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.org-chart .org-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 2px solid hsl(var(--primary));
}

.org-chart .org-card h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: hsl(var(--primary));
}

.org-chart .org-card p {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .org-chart {
    justify-content: flex-start;
    /* Allow scrolling on small screens */
  }
}

/* News Button Custom Style */
.btn-news-link {
  border-color: #030326 !important;
  color: #030326 !important;
  transition: all 0.3s ease;
}

.btn-news-link:hover {
  background-color: #030326 !important;
  color: #ffffff !important;
}

/* Leadership Section Styles */
.section-title-underline {
  width: 60px;
  height: 4px;
  background-color: #dc3545;
  /* Red color from image */
  border-radius: 2px;
}

.team-card {
  transition: transform 0.3s ease;
}

.team-card:hover {
  transform: translateY(-5px);
}

.team-img-wrapper {
  overflow: hidden;
  border-radius: 4px;
  box-shadow: var(--shadow-elegant);
}

.team-img {
  transition: transform 0.5s ease;
  filter: grayscale(20%);
}

.team-card:hover .team-img {
  transform: scale(1.05);
  filter: grayscale(0%);
}