/**
 * Academy Avan - English Institute Theme
 * Primary: #002F30 (Deep Forest Green)
 * Secondary: #DDD287 to #C5A85C (Gold Gradient)
 */

/* === CSS Variables Override === */
:root {
  --academy-primary: #001e3b;
  --academy-primary-light: #5A8FFB;
  --academy-primary-bg: #b8d4d4;
  --academy-primary-bg-light: #c8dede;
  --academy-primary-muted: rgba(0, 47, 48, 0.08);
  --academy-primary-soft: rgba(0, 47, 48, 0.12);
  --academy-primary-dark: #001e3b;
  --academy-gold: #F3A33A;
  --academy-gold-dark: #C5A85C;
  --academy-gold-gradient: linear-gradient(112.09deg, #F3A33A 0%,#ffb700 100%);
  --academy-gold-soft: rgba(221, 210, 135, 0.15);
  --academy-gold-pattern: rgba(221, 210, 135, 0.12);
  --themecolor: #001e3b;
  --themeop: 0, 47, 48;
  --themebg: rgba(0, 47, 48, 0.06);
  --themehover: #004648;
  --themeborder: rgba(0, 47, 48, 0.15);
  --backgray: #b8d4d4;
  --card-bg: rgba(255, 255, 255, 0.95);
  --mainshadow: 0 4px 24px rgba(0, 47, 48, 0.08);
  --mainshadowhover: 0 8px 32px rgba(0, 47, 48, 0.15);
}

/* === Site-Wide Green Background (closer to main color) + Gold Learning Elements === */
/* Background starts from the highest part on every screen - no white strip */
html {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(225deg, #ffffff 0%, #6698FD 30%, #3261bd 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(225deg, #ffffff 0%, #6698FD 30%, #3261bd 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
          radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 47, 48, 0.08) 0%, transparent 50%),
          radial-gradient(ellipse 60% 40% at 100% 50%, rgba(0, 47, 48, 0.05) 0%, transparent 50%),
          radial-gradient(ellipse 60% 40% at 0% 80%, rgba(197, 168, 92, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* === Floating Background Elements - A, B, icons moving === */
.floating-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-item {
  position: absolute;
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.08);
  opacity: 0.6;
  animation: float-drift 18s ease-in-out infinite;
}

.float-item.float-a,
.float-item.float-b {
  font-family: Georgia, serif;
  font-size: 4rem;
}

.float-item.float-icon {
  font-size: 2rem;
  color: rgba(197, 168, 92, 0.12);
}

.float-a { top: 8%; left: 5%; animation-delay: 0s; animation-duration: 20s; }
.float-b { top: 15%; right: 8%; animation-delay: -3s; animation-duration: 22s; }
.float-item:nth-child(3) { top: 25%; left: 12%; animation-delay: -6s; animation-duration: 16s; }
.float-item:nth-child(4) { top: 45%; right: 15%; animation-delay: -2s; animation-duration: 19s; }
.float-item:nth-child(5) { top: 60%; left: 8%; animation-delay: -8s; animation-duration: 21s; }
.float-item:nth-child(6) { top: 75%; right: 10%; animation-delay: -4s; animation-duration: 17s; }
.float-item:nth-child(7) { top: 85%; left: 18%; animation-delay: -10s; animation-duration: 23s; }
.float-item:nth-child(8) { top: 35%; left: 85%; animation-delay: -5s; animation-duration: 18s; }
.float-item:nth-child(9) { top: 55%; right: 5%; animation-delay: -7s; animation-duration: 20s; }
.float-item:nth-child(10) { top: 70%; left: 90%; animation-delay: -9s; animation-duration: 15s; }

@keyframes float-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(15px, -20px) rotate(5deg); }
  50% { transform: translate(-10px, 15px) rotate(-3deg); }
  75% { transform: translate(20px, 10px) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .float-item { animation: none; }
}

/* === Scroll-reactive section animations === */
.scroll-animate {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.scroll-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-animate {
    opacity: 1;
    transform: none;
  }
}

/* === Main Header - 80% Width, Sticky, Centered, Glass === */
.header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 1280px;
  padding: 0 1rem;
  z-index: 1030;
}

.header-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
}

.header .academy-header-nav.navbar,
.header .navbar,
.header .navbar-fixed-top {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  top: auto !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  box-shadow: 0 2px 12px rgba(0, 47, 48, 0.04);
  overflow: visible;
}

/* Main content clearance for fixed header - above floating bg */
body.home-page main.main,
body main.main {
  margin-top: 9rem !important;
  padding-top: 1rem !important;
  position: relative;
  z-index: 1;
}

/* Header sections - visually separated */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.header-inner > .ml-xl-3 {
  padding: 0.5rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.header-inner #navbar {
  padding: 0.5rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.header-inner .left-header {
  padding: 0.5rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1200px) {
  .header {
    width: 90%;
  }
}

@media (max-width: 768px) {
  .header {
    width: calc(100% - 2rem);
    top: max(0.75rem, env(safe-area-inset-top));
  }

  .header .container.header-inner {
    margin-top: 0.5rem;
    padding-top: 0.25rem;
  }

  body main.main {
    margin-top: 10rem !important;
  }

  .header .academy-header-nav.navbar {
    border-radius: 20px;
  }
}

@media (max-width: 576px) {
  .header {
    top: max(1rem, env(safe-area-inset-top));
  }

  .header .container.header-inner {
    margin-top: 0.75rem;
    padding-top: 0.35rem;
  }
}

.nav > li > a:hover,
.nav > li > a:focus,
.center-nav .nav > li > a:hover {
  color: var(--academy-primary);
}

.center-nav .nav > li > a::before {
  background: var(--academy-gold-gradient);
}

.log-btn {
  background: var(--academy-gold-gradient);
  color: var(--academy-primary);
  font-weight: 600;
  border-radius: 10px;
}

.log-btn:hover {
  background: linear-gradient(135deg, #C5A85C 0%, #b8984a 100%);
  color: var(--academy-primary);
  box-shadow: var(--mainshadowhover);
}

.register-btn,
.search-btn {
  background-color: var(--themebg);
  border-color: var(--themeborder);
  color: var(--academy-primary);
  margin-right: 1px;
  border-radius: 10px;
}

.register-btn:hover,
.search-btn:hover {
  background-color: rgba(0, 47, 48, 0.12);
  color: var(--academy-primary);
}

.register-btn-r {
  background-color: var(--themebg);
  border-color: var(--themeborder);
  color: var(--academy-primary);
}

/* Profile image button in header */
.profile-img-btn {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.profile-img-btn:hover {
  transform: scale(1.1);
}


.profile-img-btn:hover img {
  border-color: var(--academy-gold) !important;
  box-shadow: 0 0 12px rgba(197, 168, 92, 0.4);
}

/* Ensure login-notif dropdown works with profile button */
.profile-img-btn.login-notif-header {
  margin-left: 0.5rem;
}

/* === Modern Slider Section === */
.container-slider {
  margin: 2rem auto 3rem;
  padding: 2rem;
  max-width: 1200px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.short-news-date {
  padding: 1rem 1.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 47, 48, 0.06);
}

.short-news-date:hover {
  background: rgba(255, 255, 255, 0.35);
}

.main-slider {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--mainshadow);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.main-slider:hover {
  box-shadow: var(--mainshadowhover);
}

.main-slider .carousel-inner .item {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-slider .carousel-caption {
  background: linear-gradient(to top, #3261bd 0%, transparent 100%);
  padding: 4rem 2rem 2rem;
  text-align: right;
  border-radius: 0 0 24px 24px;
}

.main-slider .carousel-caption h3 {
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.main-slider .carousel-caption .caption-box {
  background: var(--academy-gold-gradient);
  color: var(--academy-primary);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#myCarousel .carousel-control {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%);
  left: 12px !important;
  right: auto !important;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: var(--mainshadow);
}

#myCarousel .carousel-control.right {
  left: auto !important;
  right: 12px !important;
}

#myCarousel .carousel-control i {
  font-size: 1.6rem;
  color: var(--academy-primary);
}

.main-slider:hover #myCarousel .carousel-control {
  opacity: 1;
}

#myCarousel .carousel-control:hover {
  background: var(--academy-gold-gradient);
}

#myCarousel .carousel-control:hover i {
  color: var(--academy-primary);
}

.carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 2px solid white;
  transition: all 0.3s ease;
}

.carousel-indicators li.active {
  background: var(--academy-gold-gradient);
  transform: scale(1.2);
}

/* Carousel indicators on mobile - keep above slider bottom, not behind */
@media (max-width: 768px) {
  #myCarousel .carousel-indicators {
    bottom: 1rem !important;
    z-index: 5;
    position: absolute;
  }
}

@media (max-width: 576px) {
  #myCarousel .carousel-indicators {
    bottom: 1.25rem !important;
    z-index: 5;
  }
}

#toggleCarousel {
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--academy-primary);
  transition: all 0.3s ease;
}

#toggleCarousel:hover {
  background: var(--academy-gold-gradient);
}

/* === Icon Bar - 3D Buttons with Theme Colors === */
.icon-bar {
  padding: 3rem 2rem;
  margin-bottom: 4rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 4rem);
  max-width: 1200px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.icon-bar .container.d-flex {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .icon-bar .container.d-flex {
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
  }
}

@media (max-width: 576px) {
  .icon-bar .container.d-flex {
    display: flex !important;
    gap: 1rem;
    justify-items: stretch;
    align-items: stretch;
  }

  .icon-bar .container.d-flex .icon-bar-item {
    width: 100%;
    min-width: 0;
    margin: 0;
  }
}

/* Each item is the box - gold gradient */
.icon-bar-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  min-width: 140px;
  background: var(--academy-gold-gradient);
  border-radius: 20px;
  text-decoration: none;
  color: var(--academy-primary);
  position: relative;
  overflow: visible;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
          0 4px 0 0 rgba(197, 168, 92, 0.5),
          0 6px 20px rgba(0, 47, 48, 0.15),
          inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(197, 168, 92, 0.3);
  transform: translateY(0);
}

/* Icon - no background, just the icon inside the item */
.icon-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: none !important;
}

.icon-bar-icon i,
.icon-bar-item .fa-blog,
.icon-bar-item .fa-images,
.icon-bar-item .fa-shopping-cart,
.icon-bar-item .fa-graduation-cap {
  font-size: 2.2rem;
  color: var(--academy-primary);
  transition: color 0.3s ease, transform 0.3s ease;
  background: none !important;
  background-color: transparent !important;
}

/* Text - centered beside icon, proper placement (override base style.css) */
.icon-bar-item span {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--academy-primary);
  line-height: 1.3;
  opacity: 1;
  position: static;
  bottom: auto;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* Hover */
.icon-bar-item:hover {
  transform: translateY(-6px);
  box-shadow:
          0 10px 0 0 rgba(197, 168, 92, 0.4),
          0 12px 28px rgba(0, 47, 48, 0.2),
          inset 0 1px 0 rgba(255, 255, 255, 0.5),
          0 0 24px rgba(197, 168, 92, 0.3);
}

.icon-bar-item:hover .icon-bar-icon i {
  transform: scale(1.08);
  color: var(--academy-primary-dark);
}

.icon-bar-item:hover span {
  color: var(--academy-primary-dark);
}

/* Active - press down */
.icon-bar-item:active {
  transform: translateY(-2px);
  box-shadow:
          0 2px 0 0 rgba(197, 168, 92, 0.6),
          0 4px 12px rgba(0, 47, 48, 0.15),
          inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.icon-bar-item:active .icon-bar-icon i {
  transform: scale(0.98);
}

/* Fallback for old img-based items if any */
.icon-bar-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* === News & Blog Sections === */
/* Constrained width - match icon-bar/slider, don't touch walls */
.news-box,
.middle-carousel {
  width: calc(100% - 4rem);
  max-width: 1200px;
  margin: 0 auto 5rem;
  padding: 2.5rem 2rem;
  background: rgba(255, 255, 255, 0.2);
  background-image: none;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.news-box .container,
.middle-carousel .container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Header: title + more button - improved placement */
.news-header,
.middle-carousel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(0, 47, 48, 0.1);
}

.news-header .title,
.middle-carousel-header .title {
  margin: 0;
  color: var(--academy-primary);
  font-weight: 700;
  font-size: 1.75rem;
  position: relative;
  padding-right: 2rem;
  text-align: right;
  direction: rtl;
}

.news-header .title::before,
.middle-carousel-header .title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  background: var(--academy-gold-gradient);
  -webkit-mask-image: url(../img/svg/4dot.svg);
  mask-image: url(../img/svg/4dot.svg);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background-image: none;
}

/* More button - pill style (h4 reset for button look) */
.news-header a .more,
.middle-carousel-header a .more,
.news-header .more,
.middle-carousel-header .more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--academy-primary);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 47, 48, 0.15);
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.news-header .more:hover,
.middle-carousel-header .more:hover {
  background: var(--academy-gold-gradient);
  color: var(--academy-primary);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(197, 168, 92, 0.35);
  transform: translateY(-2px);
}

.news-list {
  display: grid;
  gap: 2rem;
}

/* News list as horizontal scrollable on mobile (swiper-like) */
@media (max-width: 768px) {
  .news-list {
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    gap: 1.5rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--academy-gold) rgba(255, 255, 255, 0.1);
  }

  .news-list::-webkit-scrollbar {
    height: 6px;
  }

  .news-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
  }

  .news-list::-webkit-scrollbar-thumb {
    background: var(--academy-gold-gradient);
    border-radius: 10px;
  }

  .news-list .news-item {
    flex: 0 0 calc(85% - 1rem);
    min-width: calc(85% - 1rem);
    max-width: calc(85% - 1rem);
    scroll-snap-align: start;
    margin: 0;
  }
}

@media (max-width: 576px) {
  .news-list .news-item {
    flex: 0 0 calc(90% - 1rem);
    min-width: calc(90% - 1rem);
    max-width: calc(90% - 1rem);
  }
}

.news-item {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--mainshadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--mainshadowhover);
}

.news-item .news-img {
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.news-item img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.news-item .img-detils {
  background: linear-gradient(to top, rgba(0, 47, 48, 0.85), transparent);
  padding: 1rem;
}

.news-subject-box {
  background: var(--academy-gold-gradient);
  color: var(--academy-primary);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
  margin: 0.75rem 1rem;
}

.news-info {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.news-info p {
  color: rgba(0, 47, 48, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.6;
  min-height: calc(1.6em * 3);
  margin-bottom: 0;
}

.news-title {
  color: var(--academy-primary);
  font-weight: 700;
  transition: color 0.3s ease;
}

.news-item:hover .news-title {
  color: var(--academy-gold-dark);
}

.heart-comment-item {
  color: rgba(255,255,255,0.95);
}

/* Swiper/Trending slider */
.tranding-slider .swiper-slide {
  transition: transform 0.4s ease;
}

.tranding-slider .swiper-slide:hover {
  transform: scale(1.03);
}

.tranding-slide .news-item {
  border-radius: 20px;
}

/* === About Us Section - image left, title, description === */
.about-us-section {
  width: calc(100% - 4rem);
  max-width: 1200px;
  margin: 0 auto 5rem;
  padding: 2.5rem 2rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.about-us-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  direction: ltr;
}

.about-us-image {
  flex: 0 0 320px;
  min-width: 280px;
}

.about-us-image img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--mainshadow);
}

.about-us-content {
  flex: 1;
  min-width: 260px;
  direction: rtl;
  text-align: right;
}

.about-us-title {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--academy-primary);
}

.about-us-description {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(0, 47, 48, 0.9);
}

.about-us-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: var(--academy-primary);
  background: var(--academy-gold-soft);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.about-us-link:hover {
  background: var(--academy-gold-gradient);
  color: var(--academy-primary);
}

@media (max-width: 768px) {
  .about-us-section {
    width: calc(100% - 2rem);
  }
  .about-us-inner {
    flex-direction: column;
  }
  .about-us-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 576px) {
  .about-us-section {
    width: calc(100% - 1.5rem);
    padding: 1.5rem 1rem;
  }
}

/* === Footer - Complete Redesign === */
footer {
  margin-top: 4rem;
}

/* Main footer container - the div with .footer class inside footer */
footer .footer {
  width: 80%;
  max-width: 1280px;
  margin: 0 auto 1.5rem;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  background: #001e3b !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  padding: 4rem 0 3rem;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* Gold accent line at top */
footer .footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 4px;
  background: var(--academy-gold-gradient);
  border-radius: 0 0 4px 4px;
  pointer-events: none;
}

/* Subtle gold glow accents */
footer .footer::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(221, 210, 135, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

footer .footer > .container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
}

.user-wall-head {
  margin-top: -200px !important;
}

/* Footer nav - pill-style links */
.footer-header {
  padding: 2rem 0 3rem;
  margin-bottom: 0;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
}

.footer-nav ul li a {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-nav ul li a:hover {
  color: var(--academy-primary);
  background: var(--academy-gold-gradient);
  transform: translateY(-2px);
}

/* Middle section - glass card */
.footer-middle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(221, 210, 135, 0.2);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  margin: 2rem 0;
  backdrop-filter: blur(10px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

/* Footer user action buttons */
.footer-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.footer-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 80px;
}

.footer-action-btn i {
  font-size: 1.5rem;
  color: var(--academy-gold);
}

.footer-action-btn span {
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-action-btn:hover {
  background: var(--academy-gold-gradient);
  color: var(--academy-primary);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(197, 168, 92, 0.3);
}

.footer-action-btn:hover i {
  color: var(--academy-primary);
}

.footer-logout-btn {
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.3);
}

.footer-logout-btn:hover {
  background: rgba(220, 53, 69, 0.25);
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-social a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
  background: var(--academy-gold-gradient);
  transform: scale(1.15);
  box-shadow: 0 4px 20px rgba(197, 168, 92, 0.4);
  border-color: transparent;
}

.footer-social a img {
  width: 24px;
  height: 24px;
}

/* Footer icons - white on dark */
footer .footer img[src*=".svg"],
footer .footer img[src*="svg"] {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

footer .footer .footer-social a:hover img {
  filter: brightness(0) invert(0);
}

.footer-addres,
.footer-phone {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-addres span,
.footer-phone span,
.footer-phone a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.4rem;
}

.footer-addres i,
.footer-phone i {
  color: var(--academy-gold);
  font-size: 1.8rem;
}

/* Footer bottom - copyright & badges */
.footer-footer {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-footer .copyright {
  flex: 1;
  min-width: 200px;
}

.footer-footer .copyright span,
.footer-footer .copyright a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.3rem;
  line-height: 1.8;
}

.footer-footer .copyright a:hover {
  color: var(--academy-gold);
}

.footer-footer-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-footer-left a {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all 0.3s ease;
  padding: 0.5rem;
}

.footer-footer-left a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.08);
}

/* App download buttons in footer */
.footer-footer-left .sp_btn {
  width: auto;
  height: auto;
  padding: 0.8rem 1.5rem;
  border-radius: 14px;
  font-size: 1.3rem;
}

@media (max-width: 768px) {
  /* Footer responsive - spacing from walls like header */
  footer .footer {
    width: calc(100% - 2rem);
    margin-bottom: 1rem;
    padding: 2.5rem 1.5rem 2rem;
  }

  .footer-header {
    padding: 1.5rem 0 2rem;
  }

  .footer-nav ul {
    gap: 0.5rem 1rem;
  }

  .footer-nav ul li a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .footer-middle {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1.5rem;
    margin: 1.5rem 0;
    gap: 1.5rem;
  }

  .footer-user-actions {
    justify-content: center;
    width: 100%;
  }

  .footer-action-btn {
    flex: 1 1 calc(25% - 0.75rem);
    min-width: 70px;
    padding: 0.6rem 0.5rem;
  }

  .footer-action-btn i {
    font-size: 1.3rem;
  }

  .footer-action-btn span {
    font-size: 0.8rem;
  }

  .footer-addres,
  .footer-phone {
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-addres span,
  .footer-phone span,
  .footer-phone a {
    font-size: 1.2rem;
  }

  .footer-addres i,
  .footer-phone i {
    font-size: 1.5rem;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-footer {
    flex-direction: column;
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    gap: 1.5rem;
  }

  .footer-footer .copyright {
    text-align: center;
  }

  .footer-footer-left {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  footer .footer {
    width: calc(100% - 1rem);
    padding: 2rem 1rem 1.5rem;
  }

  .footer-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-nav ul li {
    width: 100%;
  }

  .footer-nav ul li a {
    width: 100%;
    text-align: center;
  }

  .footer-middle {
    padding: 1.25rem 1rem;
  }

  .footer-user-actions {
    gap: 0.75rem;
  }

  .footer-action-btn {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: 60px;
    padding: 0.5rem 0.4rem;
  }

  .footer-action-btn i {
    font-size: 1.2rem;
  }

  .footer-action-btn span {
    font-size: 0.75rem;
  }

  .footer-addres span,
  .footer-phone span,
  .footer-phone a {
    font-size: 1.1rem;
  }

  .footer-footer-left a {
    width: 48px;
    height: 48px;
  }
}

/* === Global Enhancements === */
main.main {
  background: transparent;
}

.sp_theme {
  background: var(--academy-gold-gradient);
  color: var(--academy-primary);
}

.sp_theme:hover {
  background: linear-gradient(135deg, #C5A85C 0%, #b8984a 100%);
  color: var(--academy-primary);
}

/* Smooth scroll & motion */
@media (prefers-reduced-motion: no-preference) {
  * {
    scroll-behavior: smooth;
  }
}

/* Dropdown menus */
/* Header dropdown menus - match header glass style */
.header .dropdown-menu {
  width: 80%;
  max-width: 1280px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  margin: 0;
  margin-top: 0.5rem;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 47, 48, 0.12);
}

.header .dropdown-menu .content-list li a:hover,
.header .dropdown-menu .left-content-list li a:hover {
  background-color: var(--academy-gold-soft);
}

/* Left content area in dropdown - academy gradient */
.header .dropdown-menu .left-content {
  background: linear-gradient(135deg, var(--academy-primary) 0%, var(--academy-primary-dark) 100%);
  border-radius: 16px;
  margin: 1rem;
}

.header .dropdown-menu .left-content-list li a {
  color: rgba(255, 255, 255, 0.95);
}

.header .dropdown-menu .left-content-list li a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Bottom menu - mobile only, always visible, modern glass with spacing from walls */
.bottom-menu {
  display: none;
}

@media (max-width: 768px) {
  .bottom-menu {
    display: block !important;
    position: fixed !important;
    bottom: 1rem !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 1020;
    width: calc(100% - 2rem);
    max-width: 600px;
    margin: 0;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    box-shadow: 0 -4px 24px rgba(0, 47, 48, 0.12);
    /* Prevent dragging */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }

  /* Hide bottom-bars button since menu is always visible */
  .bottom-bars {
    display: none !important;
  }

  .bottom-menu .d-flex {
    gap: 0.5rem;
  }

  .bottom-menu button {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--academy-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
  }

  .bottom-menu button:hover,
  .bottom-menu button:active {
    background: var(--academy-gold-gradient);
    color: var(--academy-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 168, 92, 0.3);
  }

  .bottom-menu button i {
    font-size: 1.3rem;
  }

  .bottom-user-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: var(--academy-gold-gradient) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 16px rgba(197, 168, 92, 0.4) !important;
    overflow: hidden;
  }

  .bottom-user-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(197, 168, 92, 0.5) !important;
  }

  .bottom-user-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Hide bottom-menu-box - cleaner design */
  .bottom-menu-box {
    display: none !important;
  }

  /* Add padding to main content for bottom menu */
  body main.main {
    padding-bottom: 5rem;
  }
}

@media (max-width: 576px) {
  .bottom-menu {
    width: calc(85% - 1rem) !important;
    bottom: 0.5rem !important;
    padding: 0.6rem 0.875rem;
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .bottom-menu button {
    width: 40px;
    height: 40px;
  }

  .bottom-menu button i {
    font-size: 1.2rem;
  }

  .bottom-user-btn {
    width: 44px !important;
    height: 44px !important;
  }

  .bottom-bars {
    width: 44px;
    height: 44px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .news-box,
  .middle-carousel {
    width: calc(100% - 2rem);
    padding: 1.75rem 1.5rem;
  }

  .news-header .title,
  .middle-carousel-header .title {
    font-size: 1.5rem;
    text-align: right;
    direction: rtl;
  }

  .icon-bar .container {
    gap: 1.25rem;
  }

  .icon-bar-item {
    padding: 1rem 1.25rem;
    min-width: 120px;
    gap: 0.75rem;
  }

  .icon-bar-icon i {
    font-size: 1.9rem;
  }

  .icon-bar-item span {
    font-size: 1rem;
  }

  main.main {
    margin-top: 9rem !important;
  }
}

@media (max-width: 576px) {
  .news-box,
  .middle-carousel {
    width: calc(100% - 1.5rem);
    padding: 1.5rem 1rem;
  }

  .news-header,
  .middle-carousel-header {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
  }

  .news-header .title,
  .middle-carousel-header .title {
    text-align: right;
    direction: rtl;
    width: 100%;
  }

  .icon-bar .container {
    gap: 1rem;
  }

  .icon-bar-item {
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
  }

  .icon-bar-item span {
    font-size: 0.95rem;
  }

  .main-slider .carousel-caption h3 {
    font-size: 1.6rem;
  }
}

/* === Page-Level Styles (Content, Blog, Contact, etc.) === */
.content-right-sp {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.content-right-sp:hover {
  background: rgba(255, 255, 255, 0.18);
}

.sp_background {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.sp_background:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Make content-left.sp_background text readable */
.content-left.sp_background {
  color: #0e2f30;
}

.content-left.sp_background h4,
.content-left.sp_background p,
.content-left.sp_background span,
.content-left.sp_background a {
  color: #0e2f30;
}

/* Make last-seen readable */
.last-seen {
  color: #0e2f30 !important;
}

.last-seen i,
.last-seen span {
  color: #0e2f30 !important;
}

.sp_navtab .nav-tabs > li.active > a {
  color: var(--academy-primary);
}

.sp_navtab .nav > li > a:focus {
  color: var(--academy-primary);
}

.content-left .sp_card,
.content-left .border-sm {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

/* Section titles - gold accent */
h1.title,
h2.title {
  color: var(--academy-primary);
}

.sp_btn.sp_theme,
.sp_btn.sp_theme_re,
.sp_btn.sp_green,
.sp_btn.sp_green_re {
  background: var(--academy-gold-gradient);
  color: var(--academy-primary);
}

.sp_btn.sp_theme:hover,
.sp_btn.sp_green_re:hover {
  background: linear-gradient(135deg, #C5A85C 0%, #b8984a 100%);
}

/* Contact page */
.contact .contact-header,
.contact .contact-form-box {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.contact form .form-control:focus {
  border-color: var(--academy-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 47, 48, 0.15);
}

/* Content list cards */
.content-list .news-item,
.contentlist .news-item {
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--mainshadow);
}

/* Text readability on green background */

/* Gallery filter - add margin to prevent overlap with header */
.gallery-filter {
  margin-top: 6rem !important;
}

@media (max-width: 768px) {
  .gallery-filter {
    margin-top: 5rem !important;
  }
}

@media (max-width: 576px) {
  .gallery-filter {
    margin-top: 4rem !important;
  }
}

/* Gallery modal - smaller size */
#galleryModal .modal-dialog {
  max-width: 720px !important;
  width: 95% !important;
  max-height: 88vh !important;
  margin: 1rem auto !important;
}

.gallerymodal-box.d-flex {
  max-height: 82vh;
  overflow-y: auto;
  padding: 0.75rem !important;
}

@media (max-width: 768px) {
  #galleryModal .modal-dialog {
    max-width: 95% !important;
    max-height: 90vh !important;
  }
  .gallerymodal-box.d-flex {
    max-height: 85vh;
    flex-direction: column !important;
  }
}

@media (max-width: 576px) {
  #galleryModal .modal-dialog {
    width: 100% !important;
    max-height: 92vh !important;
  }
  .gallerymodal-box.d-flex {
    max-height: 88vh;
    padding: 0.5rem !important;
  }
}

/* Gallery items - separate and style with rounded corners */
.content-slider.items.isotope {
  margin-top: 14rem !important;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0;
}

.content-slider.items.isotope .item.isotope-item {
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(0, 47, 48, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem !important;
  margin-right: 0.75rem !important;
  margin-left: 0.75rem !important;
  margin-top: 0 !important;
}

/* Ensure isotope items have proper spacing */
.content-slider.items.isotope .isotope-item {
  margin-bottom: 1.5rem !important;
  margin-right: 0.75rem !important;
  margin-left: 0.75rem !important;
}

.content-slider.items.isotope .item.isotope-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 47, 48, 0.15);
  background: rgba(255, 255, 255, 0.2);
}

.content-slider.items.isotope .item.isotope-item img {
  border-radius: 20px 20px 0 0;
  width: 100%;
  height: auto;
  display: block;
}

.content-slider.items.isotope .item.isotope-item .gallery-selector {
  display: block;
  border-radius: 20px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .content-slider.items.isotope {
    margin-top: 12rem !important;
    gap: 1rem;
  }

  .content-slider.items.isotope .item.isotope-item {
    border-radius: 16px;
    margin-bottom: 1rem !important;
  }

  .content-slider.items.isotope .item.isotope-item img {
    border-radius: 16px 16px 0 0;
  }

  .content-slider.items.isotope .item.isotope-item .gallery-selector {
    border-radius: 16px;
  }
}

@media (max-width: 576px) {
  .content-slider.items.isotope {
    margin-top: 10rem !important;
    gap: 0.75rem;
  }

  .content-slider.items.isotope .item.isotope-item {
    border-radius: 12px;
    margin-bottom: 0.75rem !important;
  }

  .content-slider.items.isotope .item.isotope-item img {
    border-radius: 12px 12px 0 0;
  }

  .content-slider.items.isotope .item.isotope-item .gallery-selector {
    border-radius: 12px;
  }
}

.navbar .container {
  height: 80px;
  width: 90% !important;
}