/* ============================
   MAHER - Custom Stylesheet
   ============================ */

/* ---------- Variables ---------- */
:root {
  --primary: #1a3c6e;
  --primary-dark: #0f2a52;
  --primary-light: #2d5fa1;
  --accent: #d4a843;
  --accent-dark: #b8922e;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --transition: all 0.3s ease;
}

/* ---------- Global ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--primary-dark);
}

a {
  text-decoration: none;
  transition: var(--transition);
}

.set img {
  width: 230px;
  background-color: white;
}

img {
  max-width: 100%;
}

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

.section-subtitle {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
  position: relative;
}

.section-desc {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Top Bar ---------- */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 0;
  font-size: 0.82rem;
}

.top-bar .top-contact span {
  color: rgba(255, 255, 255, 0.85);
}

.top-bar .top-social a {
  color: rgba(255, 255, 255, 0.7);
  margin-left: 14px;
  font-size: 0.95rem;
}

.top-bar .top-social a:hover {
  color: var(--accent);
}

/* ---------- Navbar ---------- */
#mainNav {
  background: var(--primary);
  padding: 12px 0;
  transition: var(--transition);
  z-index: 1050;
}

#mainNav.scrolled {
  background: var(--primary-dark);
  padding: 8px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand .brand-text strong {
  font-size: 1.4rem;
  letter-spacing: 2px;
}

.navbar-brand .brand-text small {
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 8px 16px !important;
  font-size: 0.92rem;
  transition: var(--transition);
}

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

.dropdown-menu {
  background: var(--white);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  min-width: 220px;
}

.dropdown-item {
  padding: 10px 20px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--primary);
  color: var(--white);
}

/* ---------- Hero ---------- */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 50%, var(--primary) 100%);
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section .z-1 {
  z-index: 1;
}

.hero-section .tracking-wide {
  letter-spacing: 6px;
  color: var(--accent);
}

.hero-section .display-3 {
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-section .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary-dark);
  font-weight: 600;
  padding: 12px 32px;
  border-radius: 50px;
}

.hero-section .btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
}

.hero-section .btn-outline-light {
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
}

.hero-section .btn-outline-light:hover {
  transform: translateY(-2px);
}

/* ---------- Stats ---------- */
.stats-section {
  background: var(--primary-dark);
  padding: 50px 0;
  margin-top: -1px;
}

.stat-box {
  color: var(--white);
  padding: 20px;
}

.stat-box i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.stat-box h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

.stat-box p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ---------- About ---------- */
.about-img-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.about-img-placeholder {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: var(--radius);
}

.about-img-placeholder i {
  font-size: 5rem;
  margin-bottom: 16px;
  opacity: 0.6;
}

.about-img-placeholder span {
  font-size: 1.1rem;
  opacity: 0.5;
}

/* ---------- History / Timeline ---------- */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--primary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 28px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--primary);
  z-index: 1;
}

.timeline-item.left::after {
  right: -9px;
}

.timeline-item.right::after {
  left: -9px;
}

.timeline-content {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.timeline-content:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.timeline-year {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 4px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.timeline-content h5 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Timeline responsive */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 60px;
    padding-right: 20px;
  }

  .timeline-item::after {
    left: 11px !important;
    right: auto !important;
  }
}

/* ---------- Mission & Vision ---------- */
.mission-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.mv-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 40px;
  height: 100%;
  transition: var(--transition);
}

.mv-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-5px);
}

.mv-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.mv-icon i {
  font-size: 1.8rem;
  color: var(--primary-dark);
}

.mv-card h3 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.mv-card ul {
  list-style: none;
  padding: 0;
}

.mv-card ul li {
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.92rem;
  line-height: 1.6;
}

.mv-card ul li::before {
  content: '\F26A';
  font-family: 'bootstrap-icons';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Why Choose Us ---------- */
.feature-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  height: 100%;
  transition: var(--transition);
  border-top: 4px solid transparent;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--accent);
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.feature-icon i {
  font-size: 2rem;
  color: var(--white);
}

.feature-card h5 {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ---------- Services ---------- */
.service-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 100%;
  transition: var(--transition);
  border-left: 4px solid var(--primary);
}

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

.service-icon {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.service-icon i {
  font-size: 1.5rem;
  color: var(--white);
}

.service-card h5 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.service-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
}

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

/* ---------- Staff ---------- */
.staff-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  text-align: center;
  height: 100%;
  transition: var(--transition);
}

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

.staff-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.staff-avatar i {
  font-size: 2.5rem;
  color: var(--white);
}

.staff-card h5 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.staff-role {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.staff-bio {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.staff-social a {
  color: var(--primary);
  font-size: 1.1rem;
  margin: 0 6px;
}

.staff-social a:hover {
  color: var(--accent);
}

/* ---------- Events ---------- */
.event-card {
  display: flex;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 100%;
  transition: var(--transition);
}

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

.event-date {
  background: var(--primary);
  color: var(--white);
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.event-date .day {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.event-date .month {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
}

.event-content {
  padding: 20px;
}

.event-content h5 {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.event-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.event-desc {
  margin-top: 8px;
}

/* ---------- Blogs ---------- */
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 100%;
  transition: var(--transition);
}

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

.blog-img-placeholder {
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-img-placeholder i {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.4);
}

.blog-body {
  padding: 24px;
}

.blog-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.blog-meta span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-body h5 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
}

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

/* ---------- Testimonials ---------- */
.testimonial-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 40px;
}

.testimonial-avatar {
  margin-bottom: 16px;
}

.testimonial-avatar i {
  font-size: 3.5rem;
  color: var(--accent);
}

.stars i {
  color: var(--accent);
  font-size: 1rem;
}

.testimonial-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 20px;
}

.testimonial-card h5 {
  color: var(--white);
  margin-bottom: 4px;
}

.testimonial-card small {
  color: var(--accent);
}

.carousel-indicators {
  position: relative;
  margin-top: 20px;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
}

.carousel-indicators button.active {
  background: var(--accent);
}

.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  opacity: 1;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: var(--accent);
}

/* ---------- Contact ---------- */
.contact-info-card {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  height: 100%;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 28px;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.contact-icon i {
  font-size: 1.2rem;
  color: var(--accent);
}

.contact-info-item h6 {
  color: var(--white);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.contact-info-item p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  margin-bottom: 0;
  line-height: 1.6;
}

.contact-form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.contact-form-card .form-control,
.contact-form-card .form-select {
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: var(--transition);
}

.contact-form-card .form-control:focus,
.contact-form-card .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 60, 110, 0.1);
}

.map-placeholder {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-radius: var(--radius);
  padding: 60px;
  text-align: center;
}

.map-placeholder i {
  font-size: 3rem;
  color: var(--primary);
  display: block;
  margin-bottom: 12px;
}

.map-placeholder h5 {
  margin-bottom: 8px;
}

.map-placeholder p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---------- Footer ---------- */
.footer-section {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 60px 0 0;
}

.footer-brand {
  color: var(--white);
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  margin-right: 8px;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--primary-dark);
}

.footer-title {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-contact {
  list-style: none;
  padding: 0;
}

.footer-contact li {
  margin-bottom: 10px;
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
}

.footer-contact li i {
  color: var(--accent);
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  margin-top: 40px;
}

.footer-bottom p {
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.65);
}

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

/* ---------- Back to Top ---------- */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: var(--white);
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

#backToTop:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

#backToTop.show {
  display: flex;
}

/* ---------- Buttons Override ---------- */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

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

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .section-padding {
    padding: 60px 0;
  }

  .hero-section {
    min-height: 80vh;
  }

  .hero-section .display-3 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .navbar-collapse {
    background: var(--primary-dark);
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 10px;
    max-height: 80vh;
    overflow-y: auto;
  }

  .navbar-nav .nav-link {
    padding: 10px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }

  .navbar-nav .dropdown-menu {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    border-radius: 8px;
    padding: 4px 0;
    margin: 0;
  }

  .navbar-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 24px;
    font-size: 0.88rem;
  }

  .navbar-nav .dropdown-item:hover,
  .navbar-nav .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.12);
    color: var(--accent);
  }

  .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    padding: 6px 10px;
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.4);
  }

  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }
}

@media (max-width: 576px) {
  .navbar-brand .brand-text strong {
    font-size: 1.1rem;
  }

  .navbar-brand .brand-text small {
    font-size: 0.58rem;
  }

  .hero-section .display-3 {
    font-size: 1.6rem;
  }

  .stat-box h2 {
    font-size: 1.8rem;
  }

  .event-card {
    flex-direction: column;
  }

  .event-date {
    flex-direction: row;
    gap: 8px;
    padding: 12px;
  }

  .mv-card {
    padding: 24px;
  }

  .contact-form-card {
    padding: 20px;
  }
}

/* ---------- Animations ---------- */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.hero-section .btn-primary:hover {
  animation: pulse 0.5s ease;
}

.history-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--primary-dark);
}

.history-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(15, 42, 82, 0.97) 0%, rgba(26, 60, 110, 0.92) 50%, rgba(45, 95, 161, 0.9) 100%);
  z-index: 1;
}

.history-hero-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(30deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
    linear-gradient(150deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
    linear-gradient(30deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
    linear-gradient(150deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
    linear-gradient(60deg, rgba(255, 255, 255, .6) 25%, transparent 25.5%, transparent 75%, rgba(255, 255, 255, .6) 75%, rgba(255, 255, 255, .6)),
    linear-gradient(60deg, rgba(255, 255, 255, .6) 25%, transparent 25.5%, transparent 75%, rgba(255, 255, 255, .6) 75%, rgba(255, 255, 255, .6));
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

.history-hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 20px 60px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-eyebrow span {
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.history-hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
}

.history-hero-content h1 .text-accent {
  color: var(--accent);
}

.history-hero-content .hero-lead {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
  font-family: 'Inter', sans-serif;
}

/* Floating decorative year elements */
.floating-years {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.floating-years .fy {
  position: absolute;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  font-size: 8rem;
  line-height: 1;
  user-select: none;
}

.floating-years .fy:nth-child(1) {
  top: 5%;
  left: -2%;
}

.floating-years .fy:nth-child(2) {
  top: 60%;
  right: -3%;
}

.floating-years .fy:nth-child(3) {
  bottom: 10%;
  left: 15%;
  font-size: 6rem;
}

/* --- Stats Ribbon --- */
.stats-ribbon {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 0;
  position: relative;
  z-index: 3;
}

.stat-item {
  padding: 32px 20px;
  text-align: center;
  position: relative;
  transition: background 0.3s;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.stat-item+.stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40%;
  background: rgba(255, 255, 255, 0.12);
}

.stat-item .stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-item .stat-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 0;
}

/* --- Cards Section --- */
.history-cards-section {
  padding: 100px 0 80px;
  background: #f5f6f8;
  position: relative;
}

.history-cards-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, #eef0f3 0%, #f5f6f8 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-header .label {
  display: inline-block;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  color: var(--primary-dark);
  margin-bottom: 14px;
}

.section-header .desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* --- Milestone Cards --- */
.milestone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
}

.milestone-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: default;
  display: flex;
  flex-direction: column;
}

.milestone-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

/* Card top color band */
.card-band {
  height: 6px;
  width: 100%;
}

.band-gold {
  background: linear-gradient(90deg, #b8922e, #d4a843, #e8c264);
}

.band-teal {
  background: linear-gradient(90deg, #0d9488, #14b8a6, #5eead4);
}

.band-blue {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-light));
}

.band-purple {
  background: linear-gradient(90deg, #7c3aed, #8b5cf6, #a78bfa);
}

.band-rose {
  background: linear-gradient(90deg, #be123c, #e11d48, #fb7185);
}

.band-emerald {
  background: linear-gradient(90deg, #047857, #059669, #34d399);
}

/* Card body */
.card-inner {
  padding: 32px 28px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Year row */
.card-year-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-year {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary-dark);
  opacity: 0.15;
  transition: all 0.4s;
}

.milestone-card:hover .card-year {
  opacity: 0.3;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}

.icon-gold {
  background: linear-gradient(135deg, #b8922e, #d4a843);
}

.icon-teal {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
}

.icon-blue {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.icon-purple {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.icon-rose {
  background: linear-gradient(135deg, #e11d48, #fb7185);
}

.icon-emerald {
  background: linear-gradient(135deg, #059669, #34d399);
}

.card-inner h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-inner>p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 0;
}

/* Expandable details */
.card-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  opacity: 0;
}

.milestone-card.expanded .card-details {
  max-height: 400px;
  opacity: 1;
}

.card-details ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
}

.card-details ul li {
  position: relative;
  padding: 5px 0 5px 22px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.card-details ul li::before {
  content: '\F26A';
  font-family: 'bootstrap-icons';
  position: absolute;
  left: 0;
  top: 6px;
  font-size: 0.7rem;
}

.band-gold+.card-inner .card-details ul li::before {
  color: #d4a843;
}

.band-teal+.card-inner .card-details ul li::before {
  color: #14b8a6;
}

.band-blue+.card-inner .card-details ul li::before {
  color: var(--primary-light);
}

.band-purple+.card-inner .card-details ul li::before {
  color: #8b5cf6;
}

.band-rose+.card-inner .card-details ul li::before {
  color: #fb7185;
}

.band-emerald+.card-inner .card-details ul li::before {
  color: #34d399;
}

/* Expand toggle button */
.card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--primary);
}

.card-toggle:hover {
  gap: 10px;
}

.card-toggle i {
  font-size: 0.7rem;
  transition: transform 0.35s;
}

.milestone-card.expanded .card-toggle i {
  transform: rotate(180deg);
}

.milestone-card.expanded .card-toggle .toggle-text::after {
  content: 'Show Less';
}

.milestone-card:not(.expanded) .card-toggle .toggle-text::after {
  content: 'Read More';
}

/* Featured / large card variant */
.milestone-card.card-featured {
  grid-column: span 2;
}

.milestone-card.card-featureds {
  grid-column: span 3;
}

.milestone-card.card-featured .card-inner {
  padding: 36px 32px 32px;
}

.milestone-card.card-featured h3 {
  font-size: 1.3rem;
}

/* --- Journey Line connecting cards --- */
.journey-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 20px;
  position: relative;
}

.journey-connector .line {
  width: 100%;
  max-width: 800px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--primary), transparent);
  position: relative;
}

.journey-connector .line::before,
.journey-connector .line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.journey-connector .line::before {
  left: 0;
  background: var(--primary);
}

.journey-connector .line::after {
  right: 0;
  background: var(--accent);
}

/* --- CTA --- */
.history-cta {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 90px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.history-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212, 168, 67, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
}

.cta-inner {
  position: relative;
  z-index: 1;
}

.cta-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 14px;
}

.cta-inner p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 32px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  padding: 16px 42px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-cta:hover {
  background: #e8c264;
  color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 168, 67, 0.35);
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .milestone-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .milestone-card.card-featured {
    grid-column: span 2;
  }

  .history-hero-content h1 {
    font-size: 3rem;
  }
}

@media (max-width: 767px) {
  .milestone-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .milestone-card.card-featured {
    grid-column: span 1;
  }

  .history-hero-content h1 {
    font-size: 2.2rem;
  }

  .history-hero-content .hero-lead {
    font-size: 1rem;
  }

  .stat-item+.stat-item::before {
    display: none;
  }

  .stat-item .stat-num {
    font-size: 1.8rem;
  }

  .cta-inner h2 {
    font-size: 1.8rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .floating-years {
    display: none;
  }
}

@media (max-width: 575px) {
  .history-hero {
    min-height: 45vh;
  }

  .history-hero-content h1 {
    font-size: 1.9rem;
  }

  .card-inner {
    padding: 24px 20px 20px;
  }

  .card-year {
    font-size: 2rem;
  }

  .card-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}