/* ============================================
   UNC MALI - Custom Stylesheet
   Palette: Vert/Terre (Nature)
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #2B307A;
  --primary-dark: #1E2260;
  --primary-light: #3C429A;
  --secondary: #E8A820;
  --secondary-light: #F0B629;
  --earth: #3A3F8F;
  --earth-light: #5560B0;
  --beige: #F0F1F8;
  --beige-dark: #DDDEED;
  --cream: #F8F8FC;
  --text-dark: #2C2C2C;
  --text-muted: #6C757D;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
  --radius: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* --- Utility --- */
.section-padding {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  position: relative;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin: 1rem auto 1.5rem;
}

.bg-light-beige {
  background-color: var(--beige);
}

.bg-cream {
  background-color: var(--cream);
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border: none;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(43, 48, 122, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(43, 48, 122, 0.4);
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-outline-custom {
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 12px 34px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
}

.btn-outline-custom:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* --- Top Bar --- */
.top-bar {
  background: var(--primary-dark);
  color: var(--white);
  font-size: 0.85rem;
  padding: 8px 0;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1060;
  letter-spacing: 0.3px;
}

.top-bar .top-bar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.top-bar .top-bar-content i {
  color: var(--secondary);
  font-size: 0.9rem;
}

.top-bar .top-bar-content a {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.top-bar .top-bar-content a:hover {
  color: var(--secondary-light);
}

/* --- Navbar --- */
.navbar-unc {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: none;
  padding: 15px 0;
  transition: var(--transition);
  z-index: 1050;
  top: 36px;
}

.navbar-unc.scrolled {
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.navbar-unc .navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-unc .navbar-brand .logo-img {
  height: 65px;
  width: auto;
}

.navbar-unc.scrolled .navbar-brand .logo-img {
  height: 50px;
}

.navbar-unc .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: 8px 18px !important;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: var(--transition);
}

.navbar-unc .nav-link:hover,
.navbar-unc .nav-link.active {
  color: var(--primary);
  background: rgba(43, 48, 122, 0.08);
}

.lang-switch {
  background: var(--beige);
  border: 1px solid var(--beige-dark);
  border-radius: 50px;
  padding: 4px;
  display: flex;
  gap: 2px;
}

.lang-switch .lang-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.lang-switch .lang-btn.active {
  background: var(--primary);
  color: var(--white);
}

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

.hero-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  background-image: 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='1'%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-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1590650153855-d9e808231d41?w=1920&q=80') center/cover no-repeat;
  opacity: 0.15;
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-badge i {
  color: var(--secondary-light);
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-title .highlight {
  color: var(--secondary-light);
}

.hero-text {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 16px 40px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-hero-primary {
  background: var(--white);
  color: var(--primary-dark);
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  color: var(--primary-dark);
}

.btn-hero-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-hero-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-3px);
}

.hero-illustration {
  position: relative;
  z-index: 2;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-wrapper img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-float-card {
  position: absolute;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 16px 22px;
  box-shadow: var(--shadow-md);
  animation: floatY 3s ease-in-out infinite;
  color: var(--text-dark);
}

.hero-float-card.card-1 {
  top: 15%;
  left: -30px;
  animation-delay: 0s;
}

.hero-float-card.card-2 {
  bottom: 15%;
  right: -20px;
  animation-delay: 1.5s;
}

.hero-float-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.hero-float-card .icon.green { background: rgba(43,48,122,0.1); color: var(--primary); }
.hero-float-card .icon.gold { background: rgba(232,168,32,0.1); color: var(--secondary); }

.hero-float-card h6 {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-float-card .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dark);
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.stat-item {
  text-align: center;
  padding: 10px;
}

.stat-icon {
  width: 55px;
  height: 55px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 12px;
  transition: var(--transition);
}

.stat-icon.green { background: rgba(43,48,122,0.1); color: var(--primary); }
.stat-icon.gold { background: rgba(232,168,32,0.1); color: var(--secondary); }
.stat-icon.earth { background: rgba(60,66,154,0.1); color: var(--earth); }
.stat-icon.brown { background: rgba(85,96,176,0.1); color: var(--earth-light); }

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- About Section --- */
.about-section .about-content-text {
  text-align: left !important;
}
.about-section .about-content-text * {
  text-align: left !important;
}
.about-section .about-content-text h1,
.about-section .about-content-text h2,
.about-section .about-content-text h3,
.about-section .about-content-text h4,
.about-section .about-content-text h5,
.about-section .about-content-text h6 {
  display: none;
}
.about-section .about-content-text .btn,
.about-section .about-content-text a.btn {
  display: none;
}
.about-section .about-content-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about-section .about-image-wrapper {
  position: relative;
}

.about-section .about-image-wrapper img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.about-accent-box {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.about-accent-box .number {
  font-size: 2.5rem;
  font-weight: 800;
}

.about-accent-box .label {
  font-size: 0.85rem;
  opacity: 0.9;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 2rem;
}

.about-feature {
  display: flex;
  gap: 16px;
  align-items: start;
}

.about-feature .feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(43,48,122,0.1);
  color: var(--primary);
}

.about-feature h5 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--primary-dark);
}

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

/* --- Regions --- */
.region-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.06);
}

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

.region-card .region-img {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.region-card .region-body {
  padding: 24px;
}

.region-card h4 {
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.region-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Gallery / Photothèque --- */
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 20px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--white);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h5 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.gallery-overlay p {
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0;
}

.gallery-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.gallery-filter .filter-btn {
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  background: var(--beige);
  color: var(--text-muted);
}

.gallery-filter .filter-btn.active,
.gallery-filter .filter-btn:hover {
  background: var(--primary);
  color: var(--white);
}

/* --- Gallery Carousel --- */
.gallery-carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.gallery-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s ease;
  will-change: transform;
}

.gallery-carousel-track .gallery-slide {
  flex: 0 0 calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
}

.gallery-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 2rem;
}

.gallery-carousel-nav .carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-carousel-nav .carousel-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.gallery-carousel-nav .carousel-dots {
  display: flex;
  gap: 8px;
}

.gallery-carousel-nav .carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--beige-dark);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.gallery-carousel-nav .carousel-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

@media (max-width: 991.98px) {
  .gallery-carousel-track .gallery-slide {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}

@media (max-width: 575.98px) {
  .gallery-carousel-track .gallery-slide {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* --- Videotheque --- */
.video-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.06);
}

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

.video-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: var(--transition);
}

.video-card:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--primary);
  color: var(--white);
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.video-info {
  padding: 20px;
}

.video-info h5 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.video-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- Video Carousel --- */
.video-carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.video-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s ease;
  will-change: transform;
}

.video-carousel-track .video-slide {
  flex: 0 0 calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
}

.video-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 2rem;
}

.video-carousel-nav .carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.video-carousel-nav .carousel-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.video-carousel-nav .carousel-dots {
  display: flex;
  gap: 8px;
}

.video-carousel-nav .carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--beige-dark);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.video-carousel-nav .carousel-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

@media (max-width: 991.98px) {
  .video-carousel-track .video-slide {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}

@media (max-width: 575.98px) {
  .video-carousel-track .video-slide {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* --- Team --- */
.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.06);
  text-align: center;
}

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

.team-card .team-img-wrapper {
  position: relative;
  overflow: hidden;
}

.team-card .team-img-wrapper img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-card:hover .team-img-wrapper img {
  transform: scale(1.05);
}

.team-card .team-social {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  transition: bottom 0.4s ease;
}

.team-card:hover .team-social {
  bottom: 0;
}

.team-social a {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

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

.team-card .team-info {
  padding: 24px 20px;
}

.team-card .team-info h5 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.team-card .team-info .role {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 600;
}

/* --- Team Carousel --- */
.team-carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.team-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s ease;
  will-change: transform;
}

.team-carousel-track .team-slide {
  min-width: calc(25% - 18px);
  flex-shrink: 0;
}

.team-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 2rem;
}

.team-carousel-nav .carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.team-carousel-nav .carousel-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.team-carousel-nav .carousel-dots {
  display: flex;
  gap: 8px;
}

.team-carousel-nav .carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--beige-dark);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.team-carousel-nav .carousel-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

@media (max-width: 991.98px) {
  .team-carousel-track .team-slide {
    min-width: calc(50% - 12px);
  }
}

@media (max-width: 575.98px) {
  .team-carousel-track .team-slide {
    min-width: 100%;
  }
}

/* --- Partners Carousel --- */
.partner-carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.partner-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s ease;
  will-change: transform;
}

.partner-carousel-track .partner-slide {
  min-width: calc(25% - 18px);
  flex-shrink: 0;
}

.partner-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 2rem;
}

.partner-carousel-nav .carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.partner-carousel-nav .carousel-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.partner-carousel-nav .carousel-dots {
  display: flex;
  gap: 8px;
}

.partner-carousel-nav .carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--beige-dark);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.partner-carousel-nav .carousel-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

.partner-logo {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.06);
  transition: var(--transition);
  height: 120px;
}

.partner-logo:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.partner-logo img {
  max-height: 60px;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition);
}

.partner-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

.partner-slide a {
  text-decoration: none;
}

@media (max-width: 991.98px) {
  .partner-carousel-track .partner-slide {
    min-width: calc(33.333% - 16px);
  }
}

@media (max-width: 575.98px) {
  .partner-carousel-track .partner-slide {
    min-width: calc(50% - 12px);
  }
}

/* --- Latest News Carousel --- */
.news-carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.news-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s ease;
  will-change: transform;
}

.news-carousel-track .news-slide {
  flex: 0 0 calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.06);
  height: 100%;
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.news-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(43,48,122,0.12), rgba(190,152,67,0.18));
  overflow: hidden;
}

.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-media img {
  transform: scale(1.04);
}

.news-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 2rem;
}

.news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.news-card-meta {
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.news-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-card-meta i {
  color: var(--secondary);
}

.news-card-title-link {
  text-decoration: none;
}

.news-card-title {
  font-size: 1.12rem;
  line-height: 1.45;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.news-card-excerpt {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 18px;
  flex-grow: 1;
}

.news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.news-card-link:hover {
  color: var(--secondary);
}

.news-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 2rem;
}

.news-carousel-nav .carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.news-carousel-nav .carousel-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.news-carousel-nav .carousel-dots {
  display: flex;
  gap: 8px;
}

.news-carousel-nav .carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--beige-dark);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.news-carousel-nav .carousel-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

@media (max-width: 991.98px) {
  .news-carousel-track .news-slide {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}

@media (max-width: 575.98px) {
  .news-carousel-track .news-slide {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* --- Magazine / Flipbook Sections --- */
.magazine-section {
  position: relative;
}

/* --- Library Carousel --- */
.library-carousel-wrapper {
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
}

.library-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s ease;
  will-change: transform;
}

.library-carousel-track .library-slide {
  flex: 0 0 calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
}

.library-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 2rem;
}

.library-carousel-nav .carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.library-carousel-nav .carousel-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.library-carousel-nav .carousel-dots {
  display: flex;
  gap: 8px;
}

.library-carousel-nav .carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--beige-dark);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.library-carousel-nav .carousel-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

@media (max-width: 991.98px) {
  .library-carousel-track .library-slide {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}

@media (max-width: 575.98px) {
  .library-carousel-track .library-slide {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.magazine-item {
  text-align: center;
}

.magazine-cover {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--white);
}

.magazine-cover:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

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

.magazine-title {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
}

/* --- Bibliothèque Page --- */
.library-filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.library-filter-btn {
  padding: 8px 24px;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.library-filter-btn:hover,
.library-filter-btn.active {
  background: var(--primary);
  color: var(--white);
}

.library-page-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.library-page-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.library-page-cover {
  width: 100%;
  max-height: 350px;
  overflow: hidden;
  border-radius: 8px;
}

.library-page-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-section .cta-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='20' cy='20' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

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

.footer h5 {
  color: var(--white);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer a {
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
  display: block;
  padding: 5px 0;
  font-size: 0.95rem;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.footer-brand .logo-img {
  height: 60px;
  width: auto;
}

.footer-brand h4 {
  color: var(--white);
  font-weight: 800;
  margin: 0;
}

.footer-description {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1rem;
}

.footer-social a:hover {
  background: var(--primary-light);
  color: var(--white);
  padding: 0;
  transform: translateY(-3px);
}

.footer-contact li {
  display: flex;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  font-size: 0.9rem;
  list-style: none;
}

.footer-contact li i {
  color: var(--secondary-light);
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 25px 0;
  margin-top: 50px;
  font-size: 0.85rem;
}

.footer-copyright-line {
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(0.68rem, 1vw, 0.85rem);
}

.footer-copyright-line a,
.footer-copyright-line strong {
  display: inline;
  padding: 0;
  font-size: inherit;
  white-space: inherit;
}

/* --- Projects Page --- */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 176px 0 80px;
  position: relative;
  overflow: hidden;
}

.page-header .bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: 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='1'%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");
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 1rem;
  position: relative;
}

.page-header p {
  font-size: 1.15rem;
  opacity: 0.9;
  position: relative;
}

.breadcrumb-custom {
  position: relative;
  margin-bottom: 1.5rem;
}

.breadcrumb-custom a {
  color: rgba(255,255,255,0.7);
}

.breadcrumb-custom a:hover {
  color: var(--white);
}

.breadcrumb-custom .separator {
  margin: 0 10px;
  opacity: 0.5;
}

.breadcrumb-custom .current {
  color: var(--secondary-light);
}

/* Project Cards */
.project-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.06);
  height: 100%;
}

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

.project-card .project-img {
  height: 220px;
  object-fit: cover;
  width: 100%;
  transition: transform 0.5s ease;
}

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

.project-img-wrapper {
  overflow: hidden;
  position: relative;
}

.project-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

.project-badge.completed { background: var(--primary); color: var(--white); }
.project-badge.in-progress { background: var(--secondary); color: var(--white); }
.project-badge.planned { background: var(--earth); color: var(--white); }

.project-body {
  padding: 24px;
}

.project-body h4 {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.project-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.project-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 16px;
}

.project-meta span {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-meta span i {
  color: var(--primary);
}

/* --- Blog --- */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.06);
  transition: var(--transition);
  height: 100%;
}

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

.blog-card .blog-img {
  height: 220px;
  object-fit: cover;
  width: 100%;
}

.blog-body {
  padding: 24px;
}

.blog-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-meta i {
  color: var(--primary);
}

.blog-body h4 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.blog-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(43,48,122,0.08);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 12px;
}

/* --- Contact --- */
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.contact-form .form-control,
.contact-form .form-select {
  border: 2px solid var(--beige-dark);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.95rem;
  transition: var(--transition);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43,48,122,0.1);
}

.contact-form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.contact-info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  gap: 18px;
  align-items: start;
  transition: var(--transition);
}

.contact-info-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.contact-info-card .icon {
  width: 55px;
  height: 55px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: rgba(43,48,122,0.1);
  color: var(--primary);
}

.contact-info-card h5 {
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

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

/* --- Animations (AOS-like manual) --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.7s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.8s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Lightbox Modal --- */
.lightbox-modal .modal-content {
  background: transparent;
  border: none;
}

.lightbox-modal .modal-body {
  padding: 0;
}

.lightbox-modal img {
  border-radius: var(--radius);
}

.lightbox-modal .btn-close {
  position: absolute;
  top: -40px;
  right: 0;
  filter: invert(1);
}

/* --- Scroll to top --- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  cursor: pointer;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
  background: var(--primary-dark);
}

/* --- Video Modal --- */
.modal-video .modal-content {
  background: #000;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
}

.modal-video .ratio {
  border-radius: var(--radius);
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-section {
    padding-top: 120px;
  }

  .hero-illustration {
    margin-top: 3rem;
  }

  .hero-float-card {
    display: none;
  }

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

  .stats-bar {
    margin-top: 0;
    border-radius: 0;
  }

  .about-accent-box {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1rem;
    display: inline-block;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-text {
    font-size: 1rem;
  }

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

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

  .stat-number {
    font-size: 1.6rem;
  }

  .contact-form {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn-hero {
    text-align: center;
    justify-content: center;
  }
}

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   CMS-Specific Styles (Oxadel CMS Integration)
   ============================================ */

/* --- Legacy Navbar (CMS menu system) --- */
#header {
  transition: 0.5s;
  z-index: 997;
  padding: 12px 0;
  top: 36px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#header.header-scrolled {
  top: 0;
  box-shadow: var(--shadow-sm);
  padding: 8px 0;
}

#header .logo {
  font-size: 30px;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

#header .logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 65px;
  margin-top: -5px;
  margin-bottom: 5px;
  transition: var(--transition);
}

#header.header-scrolled .logo img {
  max-height: 50px;
}

.header-bg {
  background: rgba(255,255,255,0.95);
}

.header-no-bg {
  box-shadow: none !important;
}

.header-scrolled {
  box-shadow: var(--shadow-sm) !important;
}

/* --- Navbar CMS --- */
.navbar {
  padding: 0;
}

.navbar ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
}

.navbar li {
  position: relative;
}

.navbar > ul > li {
  position: relative;
  white-space: nowrap;
  padding: 8px 0 8px 8px;
}

.navbar a, .navbar a:focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: 8px;
}

.navbar a:hover, .navbar .active, .navbar .active:focus, .navbar li:hover > a {
  color: var(--primary);
  background: rgba(43,48,122,0.08);
}

.navbar a .drop-arrow {
  font-size: 12px;
  line-height: 0;
  margin-left: 5px;
}

.navbar .dropdown ul {
  display: block;
  position: absolute;
  left: 10px;
  top: 100%;
  margin: 0;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  background: var(--white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  transition: 0.3s;
  z-index: 99;
}

.navbar .dropdown:hover > ul {
  opacity: 1;
  visibility: visible;
}

.navbar .dropdown ul li {
  min-width: 220px;
}

.navbar .dropdown ul a {
  padding: 10px 20px;
  font-size: 0.9rem;
  color: var(--text-dark);
  border: none;
  display: block;
  border-radius: 0;
  background: transparent;
}

.navbar .dropdown ul a:hover {
  color: var(--primary);
  background: var(--beige);
}

.navbar .dropdown .dropdown ul {
  top: 0;
  left: 100%;
  visibility: hidden;
}

.navbar .dropdown .dropdown:hover > ul {
  opacity: 1;
  top: 0;
  left: 100%;
  visibility: visible;
}

@media (max-width: 1366px) {
  .navbar .dropdown .dropdown ul { left: -90%; }
  .navbar .dropdown .dropdown:hover > ul { left: -100%; }
}

/* Mobile Nav */
.mobile-nav-toggle {
  color: var(--primary-dark);
  font-size: 28px;
  cursor: pointer;
  display: none;
  line-height: 0;
  transition: 0.5s;
  margin-top: -5px;
}

.mobile-nav-toggle.bi-x {
  color: var(--primary);
}

@media (max-width: 991px) {
  .mobile-nav-toggle { display: block; }
  .navbar ul { display: none; }
}

.navbar-mobile {
  position: fixed;
  overflow: hidden;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  transition: 0.3s;
  z-index: 999;
  height: 100%;
  width: 100%;
}

.navbar-mobile .mobile-nav-toggle {
  position: absolute;
  top: 65px;
  right: 35px;
  font-size: 25px;
  border: 1px solid var(--beige-dark);
  padding: 2px;
  background: var(--white);
  border-radius: 8px;
}

.navbar-mobile ul {
  display: block;
  position: absolute;
  top: 100px;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 15px 0 0;
  background-color: var(--white);
  overflow-y: auto;
  transition: 0.3s;
}

.navbar-mobile > ul > li {
  padding: 0;
  border-bottom: 1px solid var(--beige-dark);
}

.navbar-mobile a, .navbar-mobile a:focus {
  padding: 10px 2.5rem;
  font-size: 15px;
  color: var(--text-dark);
  border: none;
  border-radius: 0;
}

.navbar-mobile .dropdown ul {
  position: static;
  display: none;
  margin: 10px 30px;
  padding: 10px 0;
  background: var(--white);
  box-shadow: none;
}

.navbar-mobile .dropdown > .dropdown-active {
  display: block;
}

.header-scrolled .navbar-mobile ul {
  top: 64px;
}

.header-scrolled .navbar-mobile .mobile-nav-toggle {
  top: 25px;
}

/* --- Topbar CMS --- */
#topbar {
  height: 36px;
  transition: 0.5s;
  z-index: 998;
  background: var(--primary-dark);
  color: var(--white);
  font-size: 0.85rem;
  text-wrap: nowrap;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

#topbar.topbar-scrolled {
  top: -36px;
}

#topbar .contact-info a {
  line-height: 1;
  transition: 0.3s;
  color: rgba(255,255,255,0.8);
}

#topbar .contact-info a:hover {
  color: var(--secondary-light);
}

#topbar .contact-info i {
  color: var(--secondary);
  padding-right: 4px;
  margin-left: 15px;
  line-height: 0;
}

#topbar .contact-info i:first-child {
  margin-left: 0;
}

#topbar .social-links a {
  color: rgba(255,255,255,0.7);
  display: inline-block;
  line-height: 1px;
  transition: 0.3s;
}

#topbar .social-links a:hover {
  color: var(--secondary-light);
}

/* --- Fixed top margin --- */
.fixed-top-margin {
  margin-top: 100px;
}

@media (max-width: 992px) {
  .fixed-top-margin { margin-top: 80px; }
}

/* Home page hero extends behind the fixed navbar */
.home-page .hero-section {
  margin-top: -100px;
}
@media (max-width: 992px) {
  .home-page .hero-section { margin-top: -80px; }
}

/* --- Hero / Banner Slider (CMS) --- */
#hero {
  padding: 0;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

#hero .hero-bg-pattern {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0.08;
  background-image: 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='1'%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 .hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0.15;
  mix-blend-mode: overlay;
  background: url('https://images.unsplash.com/photo-1590650153855-d9e808231d41?w=1920&q=80') center/cover no-repeat;
}

#hero .hero-container {
  position: relative;
  z-index: 2;
}

#hero .hero-content {
  color: var(--white);
}

#hero .hero-content h2 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  color: var(--white);
}

#hero .hero-content h2 .highlight {
  color: var(--secondary-light);
}

#hero .hero-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 560px;
  margin-bottom: 2rem;
  line-height: 1.8;
  color: var(--white);
}

#hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
}

#hero .hero-badge i {
  color: var(--secondary-light);
}

#hero .hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

#hero .slider-link, #hero .btn-theme {
  padding: 16px 40px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--primary-dark);
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

#hero .slider-link:hover, #hero .btn-theme:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  color: var(--primary-dark);
}

/* Carousel (legacy) */
#hero .carousel-item {
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

#hero .carousel-item::before {
  content: "";
  background: linear-gradient(135deg, rgba(30,34,96,0.85), rgba(43,48,122,0.7));
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

#hero .carousel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 0; top: 0; left: 0; right: 0;
  overflow: hidden;
}

#hero .carousel-content {
  text-align: left;
}

#hero .slider-content {
  max-width: 600px;
}

#hero .slider-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#hero .slider-details {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 30px;
  line-height: 1.8;
}

#hero .carousel-inner .carousel-item {
  transition-property: opacity;
  background-position: center top;
}

#hero .carousel-inner .active.carousel-item-end,
#hero .carousel-inner .active.carousel-item-start,
#hero .carousel-inner .carousel-item { opacity: 0; }

#hero .carousel-inner .active,
#hero .carousel-inner .carousel-item-next.carousel-item-start,
#hero .carousel-inner .carousel-item-prev.carousel-item-end { opacity: 1; transition: 0.5s; }

#hero .carousel-inner .active.carousel-item-end,
#hero .carousel-inner .active.carousel-item-start,
#hero .carousel-inner .carousel-item-next,
#hero .carousel-inner .carousel-item-prev { left: 0; transform: translate3d(0,0,0); }

#hero .carousel-control-next, #hero .carousel-control-prev {
  width: 10%; visibility: hidden;
}

#hero .carousel-control-next-icon, #hero .carousel-control-prev-icon {
  background: none; font-size: 48px; line-height: 1;
}

#hero .carousel:hover .carousel-control-next,
#hero .carousel:hover .carousel-control-prev { visibility: visible; }

#hero .carousel-indicators li {
  list-style-type: none;
  cursor: pointer;
}

.carousel-item-clear::before { display: none !important; }

@media (max-width: 992px) {
  #hero, #hero .carousel-item { height: 60vh; }
  #hero .carousel-content.container { padding: 0 50px; }
  #hero .carousel-content { text-align: center; }
  #hero .slider-title { font-size: 2rem; }
  #hero .hero-content h2 { font-size: 2.5rem; }
}

@media (max-height: 500px) {
  #hero, #hero .carousel-item { height: 120vh; }
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 20px 0;
  min-height: 40px;
  background: var(--beige);
}

.breadcrumbs h2, .breadcrumbs h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--primary-dark);
}

.breadcrumbs ol {
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.breadcrumbs ol li + li { padding-left: 10px; }
.breadcrumbs ol li + li::before { display: inline-block; padding-right: 10px; color: var(--text-muted); content: "/"; }

/* --- Section Styles --- */
section { padding: 80px 0; }

.section-title {
  text-align: center;
  padding-bottom: 30px;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  padding-bottom: 15px;
  position: relative;
  color: var(--primary-dark);
}

.section-title h2::before {
  content: "";
  position: absolute;
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  bottom: 0;
  left: calc(50% - 40px);
}

.section-title p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.section-bg {
  background-color: var(--beige);
}

/* --- Services / Icon Boxes --- */
.services .icon-box {
  text-align: center;
  border: 1px solid rgba(43,48,122,0.15);
  padding: 40px 20px;
  transition: var(--transition);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
}

.services .icon-box:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.services .icon-box .icon {
  margin: 0 auto 20px;
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.services .icon-box .icon i {
  color: var(--white);
  font-size: 28px;
  transition: var(--transition);
}

.services .icon-box h2 {
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: var(--white);
}

.services .icon-box p {
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 0;
}

.services .icon-box img {
  margin-bottom: 20px;
  max-height: 80px;
  border-radius: var(--radius);
}

/* --- Staff / Team (CMS) --- */
.staff {
  background: var(--white);
}

.staff .member {
  position: relative;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.06);
  transition: var(--transition);
}

.staff .member:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.staff .member .pic {
  overflow: hidden;
  width: 120px;
  min-width: 120px;
  border-radius: 50%;
}

.staff .member .pic img {
  transition: var(--transition);
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.staff .member:hover img {
  transform: scale(1.1);
}

.staff .member .member-info {
  padding-left: 24px;
}

.staff .member h3 {
  font-weight: 700;
  margin-bottom: 5px;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.staff .member span {
  display: block;
  font-weight: 600;
  position: relative;
  font-size: 0.85rem;
  padding-bottom: 10px;
  color: var(--secondary);
}

.staff .member span::after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 2px;
  background: var(--primary);
  bottom: 0;
  left: 0;
  border-radius: 1px;
}

.staff .member p {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.staff .member .member-info .custom-field-title { display: none; }
.staff .member .member-info .custom-field-value {
  padding: 0 !important;
  border: 0 !important;
  opacity: 0.7;
  margin-bottom: 0 !important;
}

/* --- Gallery (CMS) --- */
.gallery .gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  border: none;
  position: relative;
}

.gallery .gallery-item img {
  transition: transform 0.5s ease;
  border-radius: var(--radius);
}

.gallery .gallery-item:hover img {
  transform: scale(1.08);
}

/* --- FAQ / Accordion --- */
.faq .accordion-item {
  border-radius: var(--radius) !important;
  margin-bottom: 12px;
  border: 1px solid var(--beige-dark);
  overflow: hidden;
}

.faq .accordion-button {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
}

.faq .accordion-button:not(.collapsed) {
  color: var(--white) !important;
  background-color: var(--primary) !important;
  box-shadow: none;
}

.faq .accordion-item:last-of-type .accordion-button.collapsed {
  background: var(--beige);
}

/* --- Testimonials (CMS) --- */
.testimonials .testimonial-wrap { padding-left: 50px; }

.testimonials .testimonial-item {
  box-sizing: content-box;
  padding: 30px 30px 30px 60px;
  margin: 30px 15px;
  min-height: 200px;
  box-shadow: var(--shadow-sm);
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
}

.testimonials .testimonial-item .testimonial-img {
  width: 90px;
  height: auto;
  border-radius: var(--radius);
  border: 4px solid var(--white);
  position: absolute;
  left: -45px;
}

.testimonials .testimonial-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 10px 0 5px;
  color: var(--primary-dark);
}

.testimonials .testimonial-item p {
  font-style: italic;
  margin: 15px auto;
  color: var(--text-muted);
}

.testimonials .testimonial-item .quote-icon-left,
.testimonials .testimonial-item .quote-icon-right {
  color: var(--beige-dark);
  font-size: 26px;
}

.testimonials .swiper-pagination { margin-top: 20px; position: relative; }

.testimonials .swiper-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  margin: 0 6px;
  background-color: var(--white);
  opacity: 1;
  border: 2px solid var(--primary);
}

.testimonials .swiper-pagination .swiper-pagination-bullet-active {
  background-color: var(--primary);
}

@media (max-width: 767px) {
  .testimonials .testimonial-wrap { padding-left: 0; }
  .testimonials .testimonial-item { padding: 30px; margin: 15px; }
  .testimonials .testimonial-item .testimonial-img { position: static; left: auto; }
}

/* --- Partners (CMS Swiper) --- */
.partners {
  background: var(--beige);
}

.partners .thumbnail {
  text-align: center;
  padding: 20px;
}

.partners .thumbnail img {
  border-radius: var(--radius);
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition);
  max-height: 80px;
}

.partners .thumbnail:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* --- Contact --- */
.contact .info, .contact .php-email-form {
  width: 100%;
  background: var(--white);
}

.contact .info i {
  font-size: 20px;
  color: var(--primary);
  float: left;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 14px;
  transition: var(--transition);
  background: rgba(43,48,122,0.1);
}

.contact .info h4 {
  padding: 0 0 0 60px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--primary-dark);
}

.contact .info p {
  padding: 0 0 0 60px;
  margin-bottom: 0;
  color: var(--text-muted);
}

.contact .info .email, .contact .info .phone { margin-top: 30px; }

.contact .info .address:hover i, .contact .info .email:hover i, .contact .info .phone:hover i {
  background: var(--primary);
  color: var(--white);
}

.contact .php-email-form .form-group { padding-bottom: 8px; }

.contact .php-email-form .error-message {
  display: none; color: var(--white); background: #ed3c0d;
  text-align: left; padding: 15px; font-weight: 600;
}

.contact .php-email-form .sent-message {
  display: none; color: var(--white); background: #18d26e;
  text-align: center; padding: 15px; font-weight: 600;
  border-radius: var(--radius);
}

.contact .php-email-form .loading { display: none; background: var(--white); text-align: center; padding: 15px; }

/* --- Buttons --- */
.btn-theme {
  border: 0;
  padding: 12px 32px;
  color: var(--white);
  transition: var(--transition);
  border-radius: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(43,48,122,0.3);
}

.btn-theme:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(43,48,122,0.4);
}

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

.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.btn-secondary, .bg-secondary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

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

.btn-outline-theme {
  border-radius: 0.375rem;
  border: 1px solid var(--beige-dark);
  color: var(--primary);
}

.btn-outline-theme:hover, .btn-outline-theme:active {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--white);
}

/* --- More Button --- */
.more-btn {
  text-align: center;
  margin-top: 20px;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  left: 15px;
  bottom: 15px;
  z-index: 996;
  background: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.back-to-top i { font-size: 28px; color: var(--white); line-height: 0; }
.back-to-top:hover { background: var(--primary-dark); color: var(--white); }
.back-to-top.active { visibility: visible; opacity: 1; }

/* --- Form Controls --- */
.form-control {
  border-color: var(--beige-dark);
  border-radius: 10px;
  padding: 12px 16px;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43,48,122,0.1);
}

.list-group-item {
  border-color: var(--beige-dark);
}

/* --- Cards --- */
.card {
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.06);
  display: block;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.sidebar-card {
  border-radius: var(--radius);
}

.sidebar-card h4 { font-size: 1.25rem; }

/* --- Select2 --- */
.select2-container .select2-selection--single { height: 38px !important; }

.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
  border: 1px solid var(--beige-dark) !important;
  border-radius: 10px !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--beige) !important;
  margin: 2px !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--primary);
  color: var(--white);
}

.select2-container--default .select2-results__option--selected {
  background-color: var(--beige);
}

.select2-dropdown {
  border: 1px solid var(--beige-dark) !important;
}

/* --- Pagination --- */
.active > .page-link, .page-link.active {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--white) !important;
}

.page-link {
  color: var(--primary) !important;
  border-radius: 8px !important;
  margin: 0 3px;
  border: 1px solid var(--beige-dark);
}

/* --- Footer (CMS) --- */
#footer {
  color: rgba(255,255,255,0.8);
  background-color: var(--primary-dark);
  position: relative;
  z-index: 995;
}

#footer .footer-top {
  padding: 80px 0 30px;
}

#footer .footer-top h3, #footer .footer-top .footer-title h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 1.5rem;
}

#footer .footer-top .footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#footer .footer-top .footer-links ul i {
  padding-right: 2px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  line-height: 1;
}

#footer .footer-top .footer-links ul li {
  padding: 8px 0;
  display: flex;
  align-items: center;
}

#footer .footer-top .footer-links ul li:first-child { padding-top: 0; }

#footer .footer-top .footer-links ul a {
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
  display: inline-block;
  line-height: 1;
  font-size: 0.95rem;
}

#footer .footer-top .footer-links ul a:hover {
  color: var(--secondary-light);
  padding-left: 5px;
}

#footer a { color: rgba(255,255,255,0.7); }
#footer a:hover { color: var(--secondary-light); }

#footer .footer-bottom {
  background-color: rgba(0,0,0,0.15);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  overflow-x: auto;
}

#footer .footer-bottom a { color: rgba(255,255,255,0.6); }
#footer .footer-bottom a:hover { color: var(--secondary-light); }

#footer .copyright { color: rgba(255,255,255,0.6); }
#footer .credits { padding-top: 5px; font-size: 13px; color: rgba(255,255,255,0.4); }

#footer .footer-newsletter {
  font-size: 15px;
}

#footer .footer-newsletter h5 i {
  margin-right: 6px;
  color: var(--secondary-light);
}

.footer-newsletter-desc {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
}

#footer .footer-newsletter form {
  margin-top: 20px;
  background: rgba(255,255,255,0.08);
  padding: 5px 5px 5px 16px;
  position: relative;
  border-radius: 50px;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

#footer .footer-newsletter form:focus-within {
  border-color: var(--secondary-light);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(232, 168, 32, 0.15);
}

#footer .footer-newsletter form input[type=email] {
  border: 0;
  padding: 8px 4px;
  flex: 1;
  min-width: 0;
  background: transparent;
  color: var(--white);
  font-size: 0.9rem;
}

#footer .footer-newsletter form input[type=email]::placeholder {
  color: rgba(255,255,255,0.45);
}

#footer .footer-newsletter form input[type=email]:focus {
  box-shadow: none;
  outline: none;
}

#footer .footer-newsletter form button {
  border: 0;
  background: var(--secondary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 15px;
  transition: var(--transition);
  flex-shrink: 0;
  cursor: pointer;
}

#footer .footer-newsletter form button:hover {
  background: var(--secondary-light);
  transform: scale(1.08);
}

#footer .footer-newsletter form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#footer .footer-newsletter .alert {
  border-radius: 12px;
  font-size: 0.85rem;
  padding: 10px 14px;
}

.footer-title { margin-bottom: 15px; }

.footer-title h3 {
  font-size: 1.1rem;
}

/* --- Social Links --- */
.social-links { display: flex; }

.social-links a {
  width: 38px;
  height: 38px;
  font-size: 18px;
  line-height: 1;
  padding: 8px 0;
  margin-right: 4px;
  border-radius: 10px;
  text-align: center;
  transition: var(--transition);
  display: inline-block;
  color: var(--white) !important;
}

.social-links a:hover { box-shadow: inset rgba(0,0,0,0.4) 0 0 30px; }

.social-links .social-facebook { background: #1877f2; }
.social-links .social-x { background: #000; }
.social-links .social-linkedin { background: #0077b5; }
.social-links .social-youtube { background: red; }
.social-links .social-instagram { background: #8134af; }
.social-links .social-pinterest { background: #bd081c; }
.social-links .social-threads { background: #dd2a7b; }
.social-links .social-snapchat { background: #cecc06; }

#topbar .social-links a {
  width: 28px;
  height: 28px;
  padding: 7px;
  font-size: 14px;
}

/* --- WhatsApp Float --- */
.whatsapp_float {
  position: fixed;
  width: 70px;
  height: 70px;
  bottom: 15px;
  right: 15px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 40px;
  padding: 8px;
  border: 4px solid rgba(255,255,255,0.6);
  font-family: Arial, sans-serif !important;
  line-height: 40px;
  z-index: 999999;
}

.whatsapp_float:hover, .whatsapp_float:active, .whatsapp_float:visited { color: #fff; }

@media screen and (max-width: 767px) {
  .whatsapp_float { bottom: 20px; right: 10px; width: 60px; height: 60px; font-size: 34px; }
}

/* --- Preloader (CMS) --- */
#preloader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  overflow: hidden;
  background: var(--white);
}

#preloader:before {
  content: "";
  position: fixed;
  top: calc(50% - 25px);
  left: calc(50% - 25px);
  border: 4px solid var(--beige-dark);
  border-top-color: var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 0.8s linear infinite;
}

/* --- Search Header Box --- */
.header-search-btn {
  width: 90px;
  height: 26px;
  border-radius: 50px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 0 5px;
  color: rgba(255,255,255,0.8);
}

.header-search-btn span {
  margin: 6px 0 4px;
  font-size: 13px;
}

#header-search-box {
  width: 100%;
  height: 100%;
  transition: 0.5s ease-in-out;
  transform: translate(0,100%) scale(0,0);
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 1000;
  background: var(--primary-dark);
}

#header-search-box.open {
  transform: scale(1,1);
  opacity: 0.97;
}

#header-search-box input[type=search] {
  position: absolute;
  font-weight: 300;
  text-align: center;
  border: 0;
  margin-top: -51px;
  padding-left: 30px;
  padding-right: 30px;
  outline: 0;
  top: calc(50% - 40px);
  width: 100%;
  color: #fff;
  background: rgba(0,0,0,0);
  font-size: 60px;
}

#header-search-box input[type=search]::placeholder { color: rgba(255,255,255,0.5); opacity: 1; }

#header-search-box .btn {
  margin-left: -100px;
  border-radius: 50px;
  padding: 10px 50px;
  text-transform: uppercase;
  position: absolute;
  top: 50%; right: auto; left: 50%;
  margin-top: 80px;
  height: 64px;
  font-size: 30px;
}

#header-search-box .close {
  background: rgba(255,255,255,0.1);
  border: none;
  opacity: 1;
  padding: 10px 17px;
  font-size: 28px;
  position: fixed;
  top: 15px;
  right: 15px;
  color: var(--white);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  line-height: 15px;
}

/* --- Appearance Toggle --- */
.appearance-toggle { margin: 0 5px; text-align: center; }
.appearance-toggle .checkbox { opacity: 0; position: absolute; }
.appearance-toggle small { font-size: 13px; font-weight: lighter; }

.appearance-toggle .checkbox-label {
  width: 90px;
  height: 26px;
  border-radius: 50px;
  position: relative;
  padding: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.appearance-toggle .fa-moon, .appearance-toggle .fa-sun { color: #f1c40f; }

.appearance-toggle .checkbox-label .ball {
  background-color: var(--beige-dark);
  width: 20px;
  height: 20px;
  position: absolute;
  left: 4px;
  top: 2px;
  border-radius: 50%;
  transition: transform 0.2s linear;
}

.appearance-toggle .checkbox:checked + .checkbox-label .ball {
  transform: translateX(60px);
}

/* --- Dashboard Link --- */
.dashboard_Link { display: inline-block; margin-left: 5px; }

.header-dropdown img {
  width: 20px; height: 20px; margin-right: 5px; border-radius: 5px;
}

.header-dropdown .btn {
  border: none; padding: 0; margin-left: 15px;
}

.header-dropdown i { margin-right: 5px; }

.header-lang-dropdown .btn,
.header-lang-dropdown .btn:hover,
.header-lang-dropdown .btn:focus,
.header-lang-dropdown .btn.show {
  color: #fff !important;
}

.header-lang-dropdown .dropdown-menu .dropdown-item,
.header-lang-dropdown .dropdown-menu .dropdown-item:hover,
.header-lang-dropdown .dropdown-menu .dropdown-item:focus,
.header-lang-dropdown .dropdown-menu .dropdown-item.active {
  color: #000 !important;
}

/* --- OWL Carousel --- */
.owl-stage-outer .item { margin: 0 10px; }

.owl-stage-outer .item p a {
  color: var(--primary);
}

/* --- Misc Utility --- */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; border-color: var(--primary) !important; }

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

.thumbnail img {
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-lg);
  width: 100%;
}

.post-main-photo {
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
}

.bottom-article {
  overflow: hidden;
  padding: 20px 30px;
  margin-top: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--beige-dark);
  background: var(--beige);
}

.bottom-article .title { font-size: 1.1rem; }

.line-frame {
  text-align: center;
  border: 1px solid var(--beige-dark);
  padding: 20px;
  transition: var(--transition);
  border-radius: var(--radius-lg);
}

.embed-responsive-item, .video-iframe { height: 500px; }

.post-card:hover .badge { opacity: 1 !important; }
.post-card h5, .badge-inline { font-size: 1rem; }
.post-card h3 { font-size: 1.4rem; }
.h-200px { height: 200px; }

ul.social-network { list-style: none; margin: 0; padding: 0; }
ul.social-network li { display: inline; margin: 0 2px; }
ul.social-network li a { color: var(--white); text-align: center; border-radius: 50%; width: 36px; height: 36px; display: inline-block; padding: 10px 0 0; line-height: 10px; font-size: 18px; }

.share { display: inline-block; }
.share-title { font-size: 24px; }
.share-title i { line-height: 32px; margin: 0 4px; }

.text-justify, .topic-page article .article-body { text-align: justify; }

#google-map, #contact-google-map {
  position: relative;
  height: 350px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

iframe { width: 100%; }

.sub-title { font-size: 1.5rem; margin-bottom: 20px; color: var(--primary-dark); }

.widget-title {
  padding: 10px 15px;
  background: var(--beige);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.sidebar-list .list-group .active,
.sidebar-list .list-group a:hover {
  color: var(--primary);
}

.sidebar-list .list-group .badge {
  float: right;
  border-radius: 50px;
  background: var(--primary);
}

.categories-widget .categories-title { cursor: pointer; }

.green-audio-player {
  width: 100%;
  min-width: 250px;
  background: var(--beige);
  box-shadow: none;
  border-radius: var(--radius);
}

.green-audio-player .slider .gap-progress,
.green-audio-player .slider .gap-progress .pin { background-color: var(--primary); }

.green-audio-player .volume .volume__button.open path { fill: var(--primary); }

.iti, .select2 { width: 100% !important; margin-bottom: 15px !important; }
.select2-container--open { z-index: 9999; }

.contact-card .contact-icon {
  width: 55px;
  height: 55px;
  text-align: center;
  margin-right: 15px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43,48,122,0.1);
  color: var(--primary);
}

.extra-images-count {
  position: absolute;
  right: 18px;
  bottom: 15px;
  font-size: 24px;
  opacity: 0.8;
}

.extra-images-count .text-primary { color: var(--white) !important; }

img { max-width: 100%; }

article ul li { list-style-type: disc; }
article ol li { list-style-type: auto; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

footer { margin-top: auto; bottom: 0; }

.maintenance-mode { background: var(--cream); }

.cookies-accept-box {
  background-color: rgba(30,34,96,0.9);
  padding: 20px;
  border-radius: var(--radius);
}

.cookies-accept {
  bottom: 0;
  position: fixed;
  right: 0;
  border-radius: 4px;
  padding: 15px;
  z-index: 999999;
}

.cookies-accept button {
  box-shadow: 0 0 2px 0 rgba(255,255,255,0.5);
}

.fixed-area-menu {
  overflow: hidden;
  overflow-y: scroll;
  width: 270px;
  position: fixed;
  background: var(--white);
  z-index: 99;
  top: 250px;
  height: calc(100% - 280px) !important;
  max-height: calc(100% - 280px) !important;
  padding-right: 10px;
  border-radius: var(--radius);
}

.fixed-area-menu h5 { font-weight: 800; }

.fixed-area-menu::-webkit-scrollbar { width: 5px; }
.fixed-area-menu::-webkit-scrollbar-track { background: var(--beige); }
.fixed-area-menu::-webkit-scrollbar-thumb { background: var(--beige-dark); border-radius: 6px; }
.fixed-area-menu::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.fixed-min-top {
  top: 120px;
  height: calc(100% - 150px) !important;
  max-height: calc(100% - 150px) !important;
}

pre {
  padding: 10px;
  border-radius: var(--radius);
  background: var(--beige);
}

.datepicker-dropdown { padding: 20px !important; }
.datetimepicker { min-width: 270px; padding: 7px; }
.datetimepicker table { width: 100%; }

.modal-backdrop { background-color: var(--primary-dark); }

.page-popup .btn-close { filter: none; }

.tooltip-inner { background-color: var(--primary); }
.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before { border-top-color: var(--primary); }
.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before { border-bottom-color: var(--primary); }

.post-gallery { background: var(--beige) !important; border-radius: var(--radius); }

/* Section dividers */
.home-page .testimonials, .home-page .gallery, .home-page .faq, .divider {
  border-top: 1px solid var(--beige-dark);
}

.section-border-top { border-top: 1px solid var(--beige-dark); }

.no-data { color: var(--text-muted) !important; }

.btn.disabled, .btn:disabled, fieldset:disabled .btn { color: var(--text-muted) !important; }

.header-form-search .form-control { background-color: var(--beige) !important; }

.img-circle { border-radius: 50% !important; }

.read-more-link:hover, .card-title:hover { color: var(--primary) !important; }

/* --- Responsive CMS-specific --- */
@media (max-width: 992px) {
  .breadcrumbs h2 { margin: 0 0 10px; }
}

@media (max-width: 768px) {
  .staff .member { display: block !important; }
  .staff .member .member-info { padding: 0; text-align: center; }
  .staff .member .pic { margin: 0 auto 20px; }
  .staff .member span::after { left: calc(50% - 25px); }
  .navbar-mobile-bg { background: var(--white); }
  .breadcrumbs .d-flex { display: block !important; }
  .breadcrumbs ol { display: block; }
  .breadcrumbs ol li { display: inline-block; }
  .container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl { padding: 0 1.5rem; }
  #topbar .controls { margin: 0 auto; }
  .fixed-area-menu { position: relative !important; width: auto !important; top: 0 !important; overflow: auto !important; margin-bottom: 20px; border-bottom: 1px solid var(--beige-dark); }
  #topbar .social-links { padding-top: 0 !important; max-width: 125px; overflow: hidden; }
  .categories-widget .categories-title i { font-size: 24px; }
}

@media (min-width: 576px) { .fixed-area-menu { width: 100% !important; } }
@media (min-width: 768px) { .fixed-area-menu { width: 28% !important; } }
@media (min-width: 992px) { .fixed-area-menu { width: 23% !important; } }
@media (min-width: 1000px) { .fixed-area-menu { width: 20% !important; } }
@media (min-width: 1300px) { .fixed-area-menu { width: 19% !important; } }
@media (min-width: 1600px) { .fixed-area-menu { width: 17% !important; } }

/* ===== Global Sidebar ===== */
.global-sidebar { position: sticky; top: 100px; }
.sidebar-widget { background: var(--white, #fff); border-radius: 8px; padding: 20px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.sidebar-widget-title { font-size: 1.05rem; font-weight: 700; color: var(--heading-color, #1a5632); margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--beige-dark, #e8e0d4); }
.sidebar-widget-title i { margin-right: 6px; }

/* Recent Articles */
.sidebar-recent-articles { display: flex; flex-direction: column; gap: 12px; }
.sidebar-recent-item { display: flex; gap: 12px; align-items: flex-start; }
.sidebar-recent-thumb { flex-shrink: 0; width: 70px; height: 70px; border-radius: 6px; overflow: hidden; display: block; }
.sidebar-recent-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.sidebar-recent-thumb:hover img { transform: scale(1.05); }
.sidebar-recent-thumb-placeholder { background: var(--beige, #f5f0e8); display: flex; align-items: center; justify-content: center; color: var(--heading-color, #1a5632); font-size: 1.5rem; }
.sidebar-recent-info { flex: 1; min-width: 0; }
.sidebar-recent-title { display: block; font-size: .875rem; font-weight: 600; color: var(--heading-color, #2c2c2c); line-height: 1.4; margin-bottom: 4px; transition: color .2s; }
.sidebar-recent-title:hover { color: var(--primary-color, #1a5632); text-decoration: none; }
.sidebar-recent-date { color: #888; font-size: .775rem; }
.sidebar-recent-date i { margin-right: 3px; }

/* Library Card (MEADD style) */
.sidebar-library-card { border-left: 4px solid #1a5632; background: var(--white, #fff); }
.sidebar-library-title { font-size: 1.25rem; font-weight: 700; color: #1a5632; margin-bottom: 12px; line-height: 1.3; }
.sidebar-library-desc { font-size: .875rem; color: #444; line-height: 1.6; margin-bottom: 16px; }
.sidebar-library-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: 2px solid #1a5632; border-radius: 6px; color: #1a5632; font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .3px; transition: all .3s; text-decoration: none; }
.sidebar-library-btn:hover { background: #1a5632; color: #fff; text-decoration: none; }
.sidebar-library-btn i { font-size: 1.1rem; }

/* Announces List */
.sidebar-announce-list { list-style: none; padding: 0; margin: 0; }
.sidebar-announce-item { padding: 10px 0; border-bottom: 1px solid var(--beige-dark, #e8e0d4); }
.sidebar-announce-item:last-child { border-bottom: none; }
.sidebar-announce-title { display: block; font-size: .875rem; font-weight: 600; color: var(--heading-color, #2c2c2c); line-height: 1.4; margin-bottom: 4px; transition: color .2s; }
.sidebar-announce-title:hover { color: var(--primary-color, #1a5632); text-decoration: none; }
.sidebar-announce-meta { font-size: .775rem; color: #888; }
.sidebar-announce-meta i { margin-right: 3px; }
.sidebar-announce-meta .badge { font-size: .65rem; vertical-align: middle; }
.sidebar-view-all { font-size: .85rem; font-weight: 600; color: var(--primary-color, #1a5632); transition: color .2s; }
.sidebar-view-all:hover { color: var(--heading-color, #2c2c2c); text-decoration: none; }
.sidebar-view-all i { transition: transform .2s; }
.sidebar-view-all:hover i { transform: translateX(3px); }

/* RTL adjustments */
.dir-rtl .sidebar-library-card { border-left: none; border-right: 4px solid #1a5632; }
.dir-rtl .sidebar-widget-title i { margin-right: 0; margin-left: 6px; }
.dir-rtl .sidebar-recent-date i { margin-right: 0; margin-left: 3px; }
.dir-rtl .sidebar-announce-meta i { margin-right: 0; margin-left: 3px; }
.dir-rtl .sidebar-library-btn i { margin-right: 0; }
.dir-rtl .sidebar-announce-meta .badge { margin-left: 0; margin-right: 4px; }
