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

/* ==========================================================================
   AL JAMIATHUL HASANIYYA (الجامعة الحسنية) - OFFICIAL STYLESHEET
   Matching original PDF design, color palette (#b69f3f), and typography
   ========================================================================== */

:root {
  --primary-gold: #b69f3f;
  --primary-gold-dark: #9e872e;
  --primary-gold-light: #d6be5e;
  --gold-bg-light: #fbf9f1;
  --gold-bg-card: #f8f5e7;
  --dark-text: #262315;
  --dark-brown: #3a341c;
  --muted-text: #706852;
  --border-gold: #e2d7a7;
  --border-gold-strong: #b69f3f;
  --ticker-dark: #6e5e23;
  --white: #ffffff;
  --card-shadow: 0 8px 24px rgba(182, 159, 63, 0.12);
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic: 'Amiri', 'Scheherazade New', serif;
  --font-arabic-modern: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
  --font-malayalam: 'Manjari', 'Noto Sans Malayalam', sans-serif;
  --font-heading: 'Poppins', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--dark-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================================================================
   BASE PARAGRAPH & SENTENCE JUSTIFICATION
   ========================================================================== */
p {
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
}

/* Exceptions for contact info, centered labels, and quotes */
.footer-contact-info p,
.contact-detail p,
.footer-poll-box p,
.verse-translation,
.verse-surah,
.cal-hijri-subtitle,
.stats-number-box p,
.cal-event-title,
.top-bar p,
.mark-sheet-header p,
.result-marksheet-sheet .mark-sheet-header p,
.text-center,
.text-center p {
  text-align: inherit;
  text-align-last: auto;
}

/* Typography Helpers */
.arabic-text {
  font-family: var(--font-arabic);
  direction: rtl;
}

.malayalam-text {
  font-family: var(--font-malayalam);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   TOP BAR & NAVIGATION
   ========================================================================== */
.top-bar {
  background-color: var(--primary-gold);
  color: #fff;
  padding: 8px 0;
  font-size: 0.9rem;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-search-form {
  display: flex;
  align-items: center;
  position: relative;
  width: 260px;
}

.top-search-input {
  width: 100%;
  padding: 6px 36px 6px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
}

.top-search-input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}

.top-search-input:focus {
  background-color: rgba(255, 255, 255, 0.35);
  border-color: #fff;
}

.top-search-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}

.top-auth-link {
  color: #fff;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.top-auth-link:hover {
  text-decoration: underline;
  opacity: 0.95;
}

/* Main Navigation */
.main-navbar {
  background-color: var(--primary-gold);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 52px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 6px;
  position: relative;
  display: inline-block;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-link.active::after,
.nav-link:hover::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background-color: #ffffff;
  border-radius: 2px;
}

.nav-right-icons {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Switcher (EN / AR) */
.lang-switch-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.lang-switch-wrap:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.55);
}

.lang-pill-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1;
}

.lang-pill-btn:hover {
  color: #ffffff;
}

.lang-pill-btn.active {
  background: #ffffff;
  color: var(--primary-gold-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.lang-toast-notice {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--dark-brown);
  color: #fff;
  border-left: 4px solid var(--primary-gold);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lang-toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-section {
  position: relative;
  background-color: #e9e4d5;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 40px 0;
  border-bottom: 4px solid var(--primary-gold);
  overflow: hidden;
}

.hero-bg-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center right;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.4s ease-in-out, transform 6.5s cubic-bezier(0.1, 0.9, 0.2, 1);
  will-change: opacity, transform;
}

.hero-bg-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(245, 241, 230, 0.95) 0%,
    rgba(245, 241, 230, 0.90) 40%,
    rgba(245, 241, 230, 0.45) 70%,
    rgba(245, 241, 230, 0.15) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.hero-section .container {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  z-index: 3;
}

.hero-content {
  position: relative;
  max-width: 680px;
  width: 100%;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 3;
}

.hero-logo-wrap {
  margin-bottom: 25px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  width: 100%;
}

.hero-logo {
  max-height: 120px;
  width: auto;
  margin: 0;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

.hero-verse-box {
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-left: none;
  box-shadow: none;
  padding: 4px 0 12px 0;
  margin-bottom: 24px;
  position: relative;
  min-height: 155px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.hero-verse-content {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.hero-verse-box.fade-out .hero-verse-content {
  opacity: 0;
  transform: translateY(-8px);
}

.hero-verse-box.fade-in-prep .hero-verse-content {
  opacity: 0;
  transform: translateY(8px);
}

.arabic-verse {
  font-family: var(--font-arabic);
  font-size: 2.3rem;
  font-weight: 700;
  color: #2b2513;
  line-height: 1.45;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.75);
  letter-spacing: 0;
  text-align: left;
  align-self: flex-start;
}

.verse-translation {
  font-size: 1.15rem;
  color: #4a442d;
  font-weight: 500;
  font-style: italic;
  line-height: 1.5;
  text-align: left;
  align-self: flex-start;
}

.verse-surah {
  font-size: 0.86rem;
  color: var(--primary-gold-dark);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  align-self: flex-start;
}

.verse-dots-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  justify-content: flex-start;
  align-self: flex-start;
}

.verse-dot-btn {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(182, 159, 63, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.verse-dot-btn:hover {
  background: var(--primary-gold);
}

.verse-dot-btn.active {
  width: 26px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--primary-gold), var(--primary-gold-dark));
  box-shadow: 0 2px 8px rgba(182, 159, 63, 0.35);
}

.hero-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-primary {
  background-color: var(--primary-gold);
  color: #fff;
  box-shadow: 0 4px 14px rgba(182, 159, 63, 0.35);
}

.btn-primary:hover {
  background-color: var(--primary-gold-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--dark-brown);
  border: 2px solid var(--primary-gold);
}

.btn-outline:hover {
  background-color: var(--primary-gold);
  color: #fff;
}

.btn-gold-card {
  background: #a48c2c;
  color: #fff;
  padding: 8px 18px;
  font-size: 0.88rem;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-gold-card:hover {
  background: #8b741f;
  color: #fff;
}

/* ==========================================================================
   NOTIFICATIONS TICKER
   ========================================================================== */
.ticker-section {
  background-color: var(--ticker-dark);
  color: #ffffff;
  display: flex;
  align-items: stretch;
  height: 52px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
}

.ticker-label-wrap {
  background-color: var(--primary-gold);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 0.9rem;
  z-index: 10;
  flex-shrink: 0;
  position: relative;
}

.ticker-label-wrap::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 10px solid var(--primary-gold);
}

.ticker-marquee-wrap {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.ticker-marquee {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 40px;
  animation: marquee-scroll 28s linear infinite;
  padding-left: 20px;
}

.ticker-marquee:hover {
  animation-play-state: paused;
}

.ticker-item {
  color: #f7f2d3;
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.ticker-item:hover {
  color: #ffffff;
  text-decoration: underline;
}

.ticker-item::after {
  content: '|';
  color: rgba(255, 255, 255, 0.4);
  margin-left: 20px;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   WATERMARKED SECTION HEADINGS
   ========================================================================== */
.watermark-heading-wrap {
  position: relative;
  text-align: center;
  margin-bottom: 40px;
  padding-top: 15px;
}

.watermark-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-size: 4.8rem;
  font-weight: 900;
  color: rgba(182, 159, 63, 0.12);
  text-transform: uppercase;
  letter-spacing: 4px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.watermark-title {
  position: relative;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}

.section-subtitle {
  position: relative;
  font-size: 0.95rem;
  color: var(--muted-text);
  max-width: 650px;
  margin: 8px auto 0;
  z-index: 2;
}

/* ==========================================================================
   ABOUT JAMIA SECTION
   ========================================================================== */
.about-section {
  padding: 60px 0;
  background-color: var(--gold-bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
  align-items: center;
}

.about-visual-box {
  position: relative;
}

.about-main-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  border: 4px solid #fff;
}

.about-badge-overlay {
  position: absolute;
  bottom: -25px;
  right: -20px;
  width: 160px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.15));
}

.about-content-box .about-tag {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.about-main-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  margin-bottom: 20px;
}

.about-desc-paragraph {
  color: var(--dark-brown);
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 16px;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
}

/* ==========================================================================
   ANNOUNCEMENTS SECTION
   ========================================================================== */
.announcements-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.announcements-title-wrap {
  text-align: center;
  margin-bottom: 35px;
}

.announcements-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.announcements-title i {
  color: var(--primary-gold);
}

.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.announcement-card {
  display: flex;
  align-items: center;
  background: var(--gold-bg-light);
  border-left: 5px solid var(--primary-gold);
  border-radius: 8px;
  padding: 16px 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: all 0.25s;
}

.announcement-card:hover {
  transform: translateX(6px);
  background: #f5f0db;
  box-shadow: 0 6px 18px rgba(182, 159, 63, 0.15);
}

.announcement-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  width: 50px;
  flex-shrink: 0;
}

.announcement-title-text {
  flex-grow: 1;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark-text);
  padding: 0 15px;
}

.announcement-action-btn {
  background-color: var(--primary-gold);
  color: #fff;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.announcement-action-btn:hover {
  background-color: var(--primary-gold-dark);
  color: #fff;
}

/* ==========================================================================
   UPCOMING EVENTS SECTION
   ========================================================================== */
.events-section {
  padding: 60px 0;
  background-color: var(--gold-bg-light);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 30px;
}

.event-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-gold);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(182, 159, 63, 0.22);
}

.event-img-wrap {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.event-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  cursor: pointer;
  transition: transform 0.4s ease;
}

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

.event-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.event-date-badge {
  display: inline-block;
  background-color: var(--primary-gold);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
  align-self: flex-start;
}

.event-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark-brown);
  margin-bottom: 10px;
}

.event-card-desc {
  font-size: 0.9rem;
  color: var(--muted-text);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
}

/* ==========================================================================
   STATISTICS SECTION
   ========================================================================== */
.stats-section {
  background-color: var(--primary-gold);
  color: #ffffff;
  padding: 48px 0;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.stat-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.stat-box:hover .stat-icon-circle {
  background-color: #ffffff;
  color: var(--primary-gold);
  transform: scale(1.08);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #f7f2d3;
}

/* ==========================================================================
   OUR DEPARTMENTS SECTION
   ========================================================================== */
.departments-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.departments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.dept-card {
  background: var(--gold-bg-light);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.dept-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-gold);
  box-shadow: 0 12px 28px rgba(182, 159, 63, 0.2);
}

.dept-card-header {
  background: #ffffff;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  border-bottom: 1px solid var(--border-gold);
}

.dept-card-header img {
  max-height: 130px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s;
}

.dept-card:hover .dept-card-header img {
  transform: scale(1.08);
}

.dept-card-body {
  padding: 22px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.dept-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.dept-desc {
  font-size: 0.9rem;
  color: var(--muted-text);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
}

/* ==========================================================================
   GALLERY SECTION
   ========================================================================== */
.gallery-section {
  padding: 60px 0;
  background-color: var(--gold-bg-light);
}

.gallery-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  margin-top: 30px;
}

.gallery-tabs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-tab-btn {
  background: #ffffff;
  border: 1px solid var(--border-gold);
  color: var(--dark-brown);
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gallery-tab-btn:hover {
  background: var(--gold-bg-card);
  border-color: var(--primary-gold);
}

.gallery-tab-btn.active {
  background: var(--primary-gold);
  color: #ffffff;
  border-color: var(--primary-gold);
  box-shadow: 0 4px 12px rgba(182, 159, 63, 0.3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--card-shadow);
  border: 3px solid #ffffff;
  cursor: pointer;
  height: 240px;
}

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

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

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(182, 159, 63, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #fff;
  font-size: 1.8rem;
  pointer-events: none;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

/* ==========================================================================
   ACADEMIC CALENDAR WIDGET
   ========================================================================== */
.calendar-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.calendar-widget-grid {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 20px;
  background: var(--gold-bg-light);
  border: 2px solid var(--border-gold);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.cal-today-card {
  background: var(--primary-gold);
  color: #ffffff;
  border-radius: 12px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  box-shadow: 0 6px 18px rgba(182, 159, 63, 0.3);
}

.cal-today-label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.9;
}

.cal-today-date {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
  margin: 10px 0 4px;
}

.cal-today-month-year {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.cal-today-day {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.95;
  margin-top: 4px;
}

.cal-today-time-box {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 10px;
  margin-top: 20px;
}

.cal-today-time-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}

.cal-live-clock {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.clock-ampm {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.5px;
  display: inline-block;
  vertical-align: middle;
}

.cal-month-wrap {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-gold);
}

.cal-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.cal-month-nav-btn {
  background: var(--gold-bg-light);
  border: 1px solid var(--border-gold);
  color: var(--dark-brown);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cal-month-nav-btn:hover {
  background: var(--primary-gold);
  color: #fff;
}

.cal-current-month-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  letter-spacing: 0.5px;
}

.cal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px 4px;
  text-align: center;
}

.cal-table th {
  padding: 6px 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-gold-dark);
  text-align: center !important;
  text-align-last: center !important;
}

.cal-table td {
  height: 38px;
  min-width: 32px;
  padding: 4px 2px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dark-text);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: center !important;
  text-align-last: center !important;
  vertical-align: middle;
  box-sizing: border-box;
}

.cal-table td:hover:not(.empty-cell) {
  background: var(--gold-bg-light);
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.cal-table td.empty-cell {
  cursor: default;
  background: transparent !important;
  pointer-events: none;
}

.cal-table td.selected-cell:not(.today-date) {
  box-shadow: 0 0 0 2px var(--primary-gold);
}

.cal-table td.friday-date {
  background-color: #c4d79b;
  color: #1e4518;
  font-weight: 700;
}

.cal-table td.leave-date {
  background-color: #00b0f0;
  color: #ffffff;
  font-weight: 700;
}

.cal-table td.study-date {
  background-color: #b1a0c7;
  color: #2a1645;
  font-weight: 700;
}

.cal-table td.exam-date {
  background-color: #ffc000;
  color: #4a3800;
  font-weight: 700;
}

.cal-table td.musabaqa-date {
  background-color: #f298e5;
  color: #520546;
  font-weight: 700;
}

.cal-table td.parents-date {
  background-color: #ff3399;
  color: #ffffff;
  font-weight: 700;
}

.cal-table td.jamaath-date {
  background-color: #e26b0a;
  color: #ffffff;
  font-weight: 700;
}

.cal-table td.sanad-date {
  background-color: #20cd03;
  color: #ffffff;
  font-weight: 800;
}

.cal-table td.event-date {
  background-color: #ecdfad;
  color: #4a3d0e;
  font-weight: 700;
}

.cal-date-cell-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  width: 100%;
}

.cal-greg-num {
  font-size: 0.95rem;
  font-weight: 700;
  display: block;
}

.cal-hijri-num {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.82;
  display: block;
  margin-top: 1px;
}

.cal-table td.today-date {
  background: var(--primary-gold) !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(182, 159, 63, 0.45);
  border-radius: 8px;
  position: relative;
}

.cal-legend-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 0.75rem;
  font-weight: 600;
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-friday { background-color: #7ea456; }
.dot-leave { background-color: #00b0f0; }
.dot-study { background-color: #b1a0c7; }
.dot-exam { background-color: #ffc000; }
.dot-musabaqa { background-color: #f298e5; }
.dot-parents { background-color: #ff3399; }
.dot-jamaath { background-color: #e26b0a; }
.dot-sanad { background-color: #20cd03; }
.dot-event { background-color: #b69f3f; }

.cal-live-clock {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.clock-ampm {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 3px;
  display: inline-block;
  vertical-align: middle;
}

.cal-events-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cal-event-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border-gold);
  border-left: 5px solid var(--primary-gold);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}

.cal-event-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(182, 159, 63, 0.15);
}

.cal-event-date-box {
  background: var(--primary-gold);
  color: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: center;
  flex-shrink: 0;
}

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

.cal-event-date-month {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cal-event-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-brown);
  line-height: 1.3;
}

/* ==========================================================================
   ABOUT US PAGE SPECIFIC STYLES
   ========================================================================== */
.about-sections-wrap {
  padding: 60px 0;
  background-color: var(--white);
}

.about-row-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 70px;
  padding-bottom: 50px;
  border-bottom: 1px solid #eee;
}

.about-row-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.about-img-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 4px solid var(--gold-bg-light);
}

.about-img-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.about-img-frame:hover img {
  transform: scale(1.03);
}

.about-text-column h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark-brown);
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.about-text-column h3 span {
  color: var(--primary-gold);
}

.about-text-column p {
  color: var(--muted-text);
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 18px;
  text-align: justify;
  text-justify: inter-word;
}

.structure-box {
  background: var(--gold-bg-light);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  padding: 35px;
  margin: 50px 0;
  box-shadow: var(--card-shadow);
}

.structure-box h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  text-align: center;
  margin-bottom: 20px;
}

.structure-box p {
  color: var(--dark-brown);
  font-size: 1rem;
  line-height: 1.85;
  text-align: justify;
}

.vision-card-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--gold-bg-card);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--card-shadow);
}

/* ==========================================================================
   ACADEMIC PAGE SPECIFIC STYLES
   ========================================================================== */
.academic-sections-wrap {
  padding: 60px 0;
}

.faculty-feature-block {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 45px;
  align-items: center;
  margin-bottom: 60px;
  padding-bottom: 45px;
  border-bottom: 1px solid var(--border-gold);
}

.faculty-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark-brown);
  margin-bottom: 16px;
}

.faculty-title span {
  color: var(--primary-gold);
}

.faculty-desc {
  font-size: 0.98rem;
  color: var(--muted-text);
  line-height: 1.8;
  margin-bottom: 18px;
  text-align: justify;
  text-justify: inter-word;
}

.thakmila-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}

.thakmila-card {
  background: var(--gold-bg-light);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.thakmila-card-icon {
  font-size: 2rem;
  color: var(--primary-gold);
  margin-bottom: 10px;
}

.thakmila-card h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  margin-bottom: 8px;
}

.thakmila-card p {
  font-size: 0.88rem;
  color: var(--muted-text);
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
}

.faculty-grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.faculty-card-gold {
  background: var(--primary-gold);
  color: #ffffff;
  border-radius: 10px;
  padding: 24px 20px;
  box-shadow: 0 6px 18px rgba(182, 159, 63, 0.25);
  transition: all 0.3s;
}

.faculty-card-gold:hover {
  transform: translateY(-4px);
  background: var(--primary-gold-dark);
}

.faculty-card-gold i {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}

.faculty-card-gold h4 {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.faculty-card-gold p {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.6;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
}

/* ==========================================================================
   ADMISSIONS PORTAL & MALAYALAM FORMS
   ========================================================================== */
.admissions-wrap {
  padding: 60px 0;
  background-color: var(--gold-bg-light);
}

.institute-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 50px;
}

.institute-select-card {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--border-gold);
  border-radius: 20px;
  padding: 38px 24px 30px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(182, 159, 63, 0.1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2),
              background 0.45s ease,
              border-color 0.4s ease,
              box-shadow 0.45s ease,
              color 0.4s ease;
}

/* Glassmorphism shine sweep on hover/select */
.institute-select-card::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(
    45deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
  z-index: 2;
}

.institute-select-card:hover::before {
  transform: rotate(30deg) translateY(100%);
}

/* Hover state for unselected card */
.institute-select-card:hover:not(.active) {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary-gold);
  box-shadow: 0 16px 36px rgba(182, 159, 63, 0.24);
  background: #fffdf7;
}

.institute-select-card:hover:not(.active) .institute-icon-circle {
  transform: scale(1.07);
  box-shadow: 0 8px 22px rgba(182, 159, 63, 0.28);
}

/* ACTIVE STATE - Modern Theme Color Transformation */
.institute-select-card.active {
  background: linear-gradient(135deg, #caa946 0%, #b69f3f 50%, #947e24 100%);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 20px 42px rgba(158, 135, 46, 0.42), 
              0 0 0 3px #ffffff, 
              0 0 0 6px var(--primary-gold);
}

.institute-select-card.active::before {
  transform: rotate(30deg) translateY(100%);
}

.institute-select-card.active .institute-title {
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(38, 35, 21, 0.35);
  letter-spacing: 0.5px;
}

.institute-icon-circle {
  width: 115px;
  height: 115px;
  border-radius: 50%;
  border: 4px solid var(--primary-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(182, 159, 63, 0.15);
  transition: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
}

.institute-select-card.active .institute-icon-circle {
  border-color: #ffffff;
  background: #ffffff;
  transform: scale(1.1) rotate(4deg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28), 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.institute-icon-circle img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.institute-select-card.active .institute-icon-circle img {
  transform: scale(1.05);
}

.institute-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: color 0.35s ease, text-shadow 0.35s ease;
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

/* Modern Keyframe Pulse Animation upon click/selection */
@keyframes cardPopSelect {
  0% {
    transform: translateY(0) scale(0.96);
  }
  50% {
    transform: translateY(-14px) scale(1.06);
  }
  100% {
    transform: translateY(-10px) scale(1.03);
  }
}

.institute-select-card.card-selected-pop {
  animation: cardPopSelect 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Application Form Container */
.admission-form-card {
  background: #ffffff;
  border: 2px solid var(--border-gold);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--card-shadow);
  max-width: 960px;
  margin: 0 auto;
}

.form-header-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark-brown);
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-gold);
}

.form-section-subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 28px 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-gold);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Malayalam Form Controls */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-family: var(--font-malayalam);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-brown);
  margin-bottom: 6px;
}

.form-label.required::after {
  content: ' *';
  color: #dc3545;
}

.form-control {
  padding: 10px 14px;
  border: 1.5px solid #d4cca6;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #faf9f5;
}

.form-control:focus {
  border-color: var(--primary-gold);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(182, 159, 63, 0.18);
}

.radio-group-row {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 8px 0;
}

.radio-label {
  font-family: var(--font-malayalam);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-brown);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  accent-color: var(--primary-gold);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 15px 0 25px;
}

.upload-box {
  background: var(--gold-bg-light);
  border: 2px dashed var(--primary-gold);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.upload-box:hover {
  background: #f4efd7;
}

.upload-box .upload-label {
  font-family: var(--font-malayalam);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-brown);
  margin-bottom: 8px;
  display: block;
}

.upload-box input[type="file"] {
  font-size: 0.82rem;
  width: 100%;
}

.rules-box {
  background: #faf8f0;
  border: 1px solid var(--border-gold);
  border-left: 5px solid var(--primary-gold);
  border-radius: 8px;
  margin: 25px 0;
}

.rules-collapsible {
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.rules-collapsible:hover {
  box-shadow: 0 4px 18px rgba(182, 159, 63, 0.18);
}

.rules-toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  cursor: pointer;
  background: #fbf9f2;
  user-select: none;
  transition: background 0.25s ease;
  gap: 15px;
}

.rules-toggle-header:hover {
  background: #f5eed8;
}

.rules-toggle-header .rules-title {
  margin-bottom: 0;
  font-size: 1.08rem;
}

.rules-toggle-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rules-toggle-hint {
  font-family: var(--font-malayalam);
  font-size: 0.82rem;
  font-weight: 700;
  color: #7d6f43;
  background: rgba(182, 159, 63, 0.18);
  padding: 4px 12px;
  border-radius: 20px;
  transition: all 0.25s ease;
}

.rules-chevron-icon {
  font-size: 1.1rem;
  color: var(--primary-gold-dark);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth Slide-down / Drop-down Animation via Grid Template Rows */
.rules-content-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  opacity: 0;
}

.rules-content-inner {
  overflow: hidden;
  padding: 0 22px;
  transition: padding 0.35s ease;
}

/* Expanded State */
.rules-collapsible.active .rules-content-collapse {
  grid-template-rows: 1fr;
  opacity: 1;
}

.rules-collapsible.active .rules-content-inner {
  padding: 16px 22px 22px 26px;
  border-top: 1px dashed var(--border-gold);
}

.rules-collapsible.active .rules-chevron-icon {
  transform: rotate(180deg);
}

.rules-collapsible.active .rules-toggle-hint {
  background: var(--primary-gold);
  color: #ffffff;
}

.rules-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.rules-list {
  list-style: decimal;
  padding-left: 20px;
}

.rules-list li {
  font-family: var(--font-malayalam);
  font-size: 0.92rem;
  color: #4a442e;
  line-height: 1.7;
  margin-bottom: 8px;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
}

.declaration-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  margin-bottom: 28px;
}

.declaration-wrap input[type="checkbox"] {
  accent-color: var(--primary-gold);
  width: 20px;
  height: 20px;
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
}

.declaration-text {
  font-family: var(--font-malayalam);
  font-size: 0.95rem;
  color: var(--dark-brown);
  line-height: 1.6;
  font-weight: 600;
}

.form-submit-btn {
  width: auto;
  min-width: 190px;
  max-width: 250px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-gold);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 10px 22px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(159, 135, 46, 0.35);
}

.form-submit-btn:hover {
  background: var(--primary-gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(159, 135, 46, 0.45);
}

/* ==========================================================================
   MULTI-STEP ADMISSION WIZARD (8-SECTION PROGRESSION)
   ========================================================================== */
.admission-wizard-stepper {
  margin: 10px 0 35px;
  padding: 24px 22px 20px;
  background: linear-gradient(180deg, #fdfbf7 0%, #f6f1e3 100%);
  border: 1.5px solid var(--border-gold);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(182, 159, 63, 0.1);
  position: relative;
}

.wizard-progress-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: #e3dbc1;
  border-radius: 10px;
  margin-bottom: 22px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #b69f3f 0%, #003822 100%);
  border-radius: 10px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-steps-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  gap: 8px;
}

.wizard-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease;
  user-select: none;
}

.wizard-step-item .step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #d4cca6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #7d6f43;
  margin-bottom: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.wizard-step-item .step-circle .step-check {
  display: none;
  font-size: 0.9rem;
}

.wizard-step-item .step-label {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wizard-step-item .step-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #8c8266;
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: color 0.3s;
}

.wizard-step-item .step-sub {
  font-family: var(--font-malayalam);
  font-size: 0.72rem;
  color: #a49a7a;
  margin-top: 2px;
  transition: color 0.3s;
}

/* Active Step */
.wizard-step-item.active .step-circle {
  background: #003822;
  border-color: #b69f3f;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(182, 159, 63, 0.35);
  transform: scale(1.08);
}

.wizard-step-item.active .step-title {
  color: #262315;
  font-weight: 800;
}

.wizard-step-item.active .step-sub {
  color: #8c7322;
  font-weight: 700;
}

/* Completed Step */
.wizard-step-item.completed .step-circle {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
}

.wizard-step-item.completed .step-circle .step-num {
  display: none;
}

.wizard-step-item.completed .step-circle .step-check {
  display: inline-block;
}

.wizard-step-item.completed .step-title {
  color: #2e7d32;
  font-weight: 600;
}

.wizard-step-item.completed .step-sub {
  color: #558b2f;
}

.wizard-step-item:hover {
  transform: translateY(-2px);
}

/* Mobile Stepper Bar */
.wizard-mobile-bar {
  display: none;
}

@media (max-width: 860px) {
  .wizard-steps-container {
    display: none;
  }

  .wizard-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-step-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-step-badge {
    background: #003822;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-gold);
    white-space: nowrap;
  }

  .mobile-step-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--dark-brown);
    font-family: var(--font-malayalam), var(--font-body);
  }

  .mobile-step-percent {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--primary-gold-dark);
    background: rgba(182, 159, 63, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
  }
}

/* Step Panes Transition */
.admission-step-pane {
  display: block;
}

.admission-step-pane.step-fade-in {
  animation: stepFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Wizard Navigation Row */
.wizard-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1.5px dashed var(--border-gold);
  gap: 15px;
}

.wizard-nav-row.wizard-nav-single {
  justify-content: flex-end;
}

.btn-wizard-prev {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f4efd7;
  color: #4a442e;
  border: 1.5px solid #d4cca6;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-malayalam), var(--font-body);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-wizard-prev:hover {
  background: #eae2c5;
  color: #262315;
  border-color: #b69f3f;
  transform: translateX(-3px);
}

.btn-wizard-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #b69f3f 0%, #9e872e 100%);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.96rem;
  font-weight: 700;
  font-family: var(--font-malayalam), var(--font-body);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(182, 159, 63, 0.35);
}

.btn-wizard-next:hover {
  background: linear-gradient(135deg, #a38c31 0%, #89721e 100%);
  transform: translateX(3px);
  box-shadow: 0 6px 18px rgba(182, 159, 63, 0.45);
}

.btn-wizard-submit {
  min-width: 240px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
}

/* Field Validation Error Highlights */
.form-control.input-error,
select.input-error,
textarea.input-error {
  border-color: #dc3545 !important;
  background-color: #fff8f8 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
  animation: shakeField 0.35s ease-in-out;
}

.pdf-photo-upload-box.input-error,
.upload-box.input-error {
  border-color: #dc3545 !important;
  background-color: #fff8f8 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important;
  animation: shakeField 0.35s ease-in-out;
}

.declaration-card-box.input-error {
  border: 1.5px solid #dc3545 !important;
  background-color: #fff8f8 !important;
  animation: shakeField 0.35s ease-in-out;
}

@keyframes shakeField {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* RTL Arrow Flipping */
html[dir="rtl"] .btn-wizard-prev i,
body.arabic-mode .btn-wizard-prev i {
  transform: scaleX(-1);
}

html[dir="rtl"] .btn-wizard-next i,
body.arabic-mode .btn-wizard-next i {
  transform: scaleX(-1);
}

/* PDF Form Specific Components (Matching 4-page official document) */
.pdf-form-top-row {
  display: flex;
  gap: 25px;
  align-items: flex-start;
  margin-bottom: 20px;
}

@media (max-width: 650px) {
  .pdf-form-top-row {
    flex-direction: column-reverse;
    align-items: center;
  }
}

.pdf-photo-upload-box {
  width: 150px;
  height: 180px;
  flex-shrink: 0;
  background: var(--gold-bg-light);
  border: 2px dashed var(--primary-gold);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.pdf-photo-upload-box:hover {
  background: #f5eed4;
  border-color: var(--primary-gold-dark);
}

.pdf-photo-upload-box .photo-placeholder-icon {
  font-size: 2.4rem;
  color: var(--primary-gold);
  margin-bottom: 6px;
}

.pdf-photo-upload-box .photo-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dark-brown);
  text-transform: uppercase;
}

.pdf-photo-upload-box input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.pdf-photo-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: none;
}

/* Sibling Table */
.sibling-table-wrap {
  overflow-x: auto;
  margin: 12px 0 16px;
  border: 1.5px solid var(--border-gold);
  border-radius: 8px;
  background: #ffffff;
}

.sibling-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.sibling-table th {
  background: #f7f3e4;
  color: var(--dark-brown);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-gold);
}

.sibling-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee8cf;
}

.sibling-table input,
.sibling-table select {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.88rem;
  border: 1px solid #dcd3b5;
  border-radius: 4px;
  background: #faf8f2;
}

.sibling-table input:focus,
.sibling-table select:focus {
  border-color: var(--primary-gold);
  background: #fff;
  outline: none;
}

.btn-add-sibling {
  background: #fffdf7;
  border: 1.5px dashed var(--primary-gold);
  color: var(--primary-gold-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 15px;
}

.btn-add-sibling:hover {
  background: var(--gold-bg-light);
  border-color: var(--primary-gold-dark);
}

/* Checkboxes Grid for Talents, Health, Addictions */
.checkbox-tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.checkbox-tag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fdfbf7;
  border: 1.5px solid #e5dcbe;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.checkbox-tag-item:hover {
  border-color: var(--primary-gold);
  background: #fffdf5;
}

.checkbox-tag-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-gold);
  cursor: pointer;
}

.checkbox-tag-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-brown);
}

/* Dual Declaration Cards */
.declaration-card-box {
  background: #faf8f0;
  border: 1.5px solid var(--border-gold);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 24px;
}

.declaration-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.declaration-statement-text {
  font-family: var(--font-malayalam);
  font-size: 0.95rem;
  line-height: 1.8;
  color: #3f3925;
  margin-bottom: 16px;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
}

.declaration-meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--border-gold);
}

.admission-accordions {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-link-btn {
  background: var(--primary-gold);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
}

.accordion-link-btn:hover {
  background: var(--primary-gold-dark);
}

/* ==========================================================================
   EXAM RESULTS PAGE
   ========================================================================== */
.results-section-wrap {
  padding: 60px 0;
  background-color: var(--gold-bg-light);
}

.results-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 45px;
}

.result-category-card {
  background: #ffffff;
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-category-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-gold);
}

.result-category-card.featured {
  border: 2.5px solid var(--primary-gold);
  box-shadow: 0 8px 24px rgba(182, 159, 63, 0.28);
  background: #fffdf7;
}

.result-cat-icon-box {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-cat-icon-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.result-cat-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.result-cat-desc {
  font-size: 0.88rem;
  color: var(--muted-text);
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
}

.result-search-card {
  background: #ffffff;
  border: 2px solid var(--border-gold);
  border-radius: 16px;
  padding: 35px;
  box-shadow: var(--card-shadow);
  max-width: 800px;
  margin: 0 auto 40px;
}

.result-search-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  text-align: center;
  margin-bottom: 20px;
}

.result-form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.result-input {
  flex-grow: 1;
  padding: 12px 16px;
  border: 1.5px solid #d4cca6;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
}

.result-input:focus {
  border-color: var(--primary-gold);
}

.mark-sheet-box {
  background: #ffffff;
  border: 2px solid var(--primary-gold);
  border-radius: 12px;
  padding: 30px;
  margin-top: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  display: none;
}

.mark-sheet-header {
  text-align: center !important;
  border-bottom: 2px solid var(--primary-gold);
  padding-bottom: 18px;
  margin-bottom: 20px;
  width: 100%;
}

.mark-sheet-header p {
  text-align: center !important;
  text-align-last: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.mark-sheet-logo {
  max-height: 65px;
  margin: 0 auto 10px;
}

.student-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.marks-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.marks-table th,
.marks-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.marks-table th {
  background: var(--gold-bg-light);
  color: var(--dark-brown);
  font-weight: 700;
}

.status-badge-pass {
  background-color: #d1e7dd;
  color: #0f5132;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  display: inline-block;
}

/* ==========================================================================
   CONTACT US PAGE
   ========================================================================== */
.contact-sections-wrap {
  padding: 60px 0;
  background-color: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  margin-top: 30px;
}

.contact-info-card {
  background: var(--gold-bg-light);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--card-shadow);
}

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

.contact-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-detail h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-brown);
  margin-bottom: 4px;
}

.contact-detail p {
  color: var(--muted-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-form-card {
  background: #ffffff;
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--card-shadow);
}

.map-embed-box {
  margin-top: 50px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border-gold);
  box-shadow: var(--card-shadow);
  height: 380px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
  background-color: var(--primary-gold);
  color: #ffffff;
  padding: 50px 0 20px;
  border-top: 5px solid var(--primary-gold-dark);
}

.footer-top-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 35px;
}

.footer-logo-img {
  max-height: 70px;
  width: auto;
}

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

.footer-social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.25s;
}

.footer-social-icon:hover {
  background: #ffffff;
  color: var(--primary-gold);
  transform: translateY(-3px);
}

.footer-columns-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr;
  gap: 40px;
  margin-bottom: 35px;
}

.footer-col-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background-color: #ffffff;
}

.footer-contact-info p {
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.footer-links-list a {
  font-size: 0.92rem;
  color: #f7f2d3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links-list a:hover {
  color: #ffffff;
  text-decoration: underline;
  transform: translateX(4px);
}

/* Website Feedback Poll in Footer */
.footer-poll-box p {
  font-size: 0.92rem;
  margin-bottom: 12px;
  font-weight: 500;
}

.poll-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.poll-option-label {
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.poll-option-label input[type="radio"] {
  accent-color: #ffffff;
}

.poll-submit-btn {
  background: #ffffff;
  color: var(--primary-gold-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 18px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.poll-submit-btn:hover {
  background: var(--gold-bg-light);
  transform: translateY(-1px);
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 18px;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   FLOATING BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background-color: var(--primary-gold);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background-color: var(--primary-gold-dark);
  transform: translateY(-4px);
}

/* ==========================================================================
   MODALS (AUTH, LIGHTBOX, POPUPS)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  border: 2px solid var(--primary-gold);
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  background: var(--primary-gold);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  border: 3px solid var(--primary-gold);
}

.lightbox-close-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .calendar-widget-grid {
    grid-template-columns: 1fr;
  }
  .footer-columns-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary-gold);
    flex-direction: column;
    padding: 20px 0;
    gap: 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    display: none;
  }
  .nav-links.show {
    display: flex;
  }
  .nav-link {
    width: 100%;
    text-align: center;
    padding: 12px 0;
  }
  .about-grid,
  .about-row-block,
  .faculty-feature-block,
  .contact-grid,
  .vision-card-wrap {
    grid-template-columns: 1fr;
  }
  .watermark-bg-text {
    font-size: 2.8rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-layout {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .institute-select-grid,
  .results-categories-grid,
  .faculty-grid-cards,
  .thakmila-stat-cards {
    grid-template-columns: 1fr;
  }
  .footer-columns-grid {
    grid-template-columns: 1fr;
  }
  .footer-top-brand {
    flex-direction: column;
    gap: 20px;
  }
  .arabic-verse {
    font-size: 1.8rem;
  }
  .verse-translation {
    font-size: 1rem;
  }
  .hero-bg-overlay {
    background: linear-gradient(
      to bottom,
      rgba(245, 241, 230, 0.95) 0%,
      rgba(245, 241, 230, 0.90) 75%,
      rgba(245, 241, 230, 0.60) 100%
    );
  }
}

@media (max-width: 480px) {
  .top-bar-inner {
    flex-direction: column;
    gap: 8px;
  }
  .top-search-form {
    width: 100%;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .admission-form-card {
    padding: 20px 15px;
  }
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS (COMPLETELY DISABLED - INSTANT RENDERING)
   ========================================================================== */
.reveal-item,
.reveal-left,
.reveal-right,
.reveal-scale,
.watermark-heading-wrap.reveal-item,
.reveal-item.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed,
.watermark-heading-wrap.revealed {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

/* Ensure watermark background text retains exact centered alignment behind heading */
.watermark-bg-text {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -60%) !important;
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   PAGE ENTRANCE & NAVIGATION (STATIC & IMMEDIATE)
   ========================================================================== */
.quran-preloader,
.page-transition-bar {
  display: none !important;
}

/* Ensure body has NO full-page movement or exit animations */
body {
  animation: none !important;
  transform: none !important;
}

body.page-is-exiting {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Page Entrance & Navigation Animations Completely Removed (Static Instant Rendering) */
.watermark-heading-wrap,
.watermark-title,
.hero-verse-box,
.hero-logo-wrap,
.hero-actions,
.about-tag,
.about-main-title,
.announcements-title,
.section-title,
.section-subtitle,
.page-banner-title,
.page-banner-subtitle,
.about-text-column h3,
.faculty-feature-block h3,
.academic-card h3,
.results-hero-title,
.contact-title-wrap h2,
main h1,
main h2,
main h3,
main p {
  animation: none !important;
  opacity: 1 !important;
  transition: none !important;
}

/* Card, form and grid containers stay completely stable */
.about-sections-wrap .about-row-block:first-of-type,
.academic-sections-wrap .faculty-feature-block:first-of-type,
.admissions-wrap .institute-select-grid,
.results-section-wrap .results-categories-grid,
.contact-sections-wrap .contact-grid,
.admissions-wrap .admission-form-card {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
  transition: none !important;
}

/* ==========================================================================
   ARABIC MODE (RTL & MODERN CAIRO / TAJAWAL TYPOGRAPHY)
   ========================================================================== */
html[lang="ar"],
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

html[lang="ar"] body {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] .section-title,
html[lang="ar"] .form-header-title,
html[lang="ar"] .hero-title,
html[lang="ar"] .hero-verse-title,
html[lang="ar"] .about-col-title,
html[lang="ar"] .footer-title,
html[lang="ar"] .mark-sheet-title,
html[lang="ar"] .rules-title {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  letter-spacing: 0;
}

html[lang="ar"] .nav-inner {
  direction: rtl;
}

html[lang="ar"] .nav-links {
  direction: rtl;
}

html[lang="ar"] .nav-right-icons {
  right: auto;
  left: 20px;
}

html[lang="ar"] .top-bar-inner {
  direction: rtl;
}

html[lang="ar"] .top-search-form {
  direction: rtl;
}

html[lang="ar"] .top-search-input {
  text-align: right;
  padding-left: 36px;
  padding-right: 14px;
}

html[lang="ar"] .top-search-btn {
  right: auto;
  left: 4px;
}

html[lang="ar"] .hero-content {
  text-align: right;
  align-items: flex-start;
}

html[lang="ar"] .hero-verse-box {
  text-align: right;
  align-items: flex-start;
}

html[lang="ar"] .hero-actions {
  justify-content: flex-start;
  flex-direction: row;
  gap: 15px;
}

html[lang="ar"] .announcement-badge {
  margin-right: 0;
  margin-left: 12px;
}

html[lang="ar"] .announcement-card {
  text-align: right;
}

html[lang="ar"] .announcement-action-btn i,
html[lang="ar"] .btn i,
html[lang="ar"] .btn-gold-card i,
html[lang="ar"] .announcement-action-btn i {
  transform: rotate(180deg);
  margin-left: 0;
  margin-right: 6px;
}

html[lang="ar"] .rules-box {
  border-left: 1px solid var(--border-gold);
  border-right: 5px solid var(--primary-gold);
  text-align: right;
}

html[lang="ar"] .rules-list {
  padding-left: 0;
  padding-right: 25px;
  text-align: right;
}

html[lang="ar"] .rules-toggle-header {
  flex-direction: row-reverse;
}

html[lang="ar"] .cal-event-item {
  border-left: 1px solid var(--border-gold);
  border-right: 5px solid var(--primary-gold);
  direction: rtl;
  text-align: right;
}

html[lang="ar"] .cal-event-date-box {
  margin-right: 0;
  margin-left: 14px;
}

html[lang="ar"] .footer-col {
  text-align: right;
}

html[lang="ar"] .footer-links a i,
html[lang="ar"] .quick-links-list a i,
html[lang="ar"] .footer-links-list li a i {
  margin-right: 0;
  margin-left: 8px;
  transform: rotate(180deg);
}

html[lang="ar"] .form-label,
html[lang="ar"] .form-control,
html[lang="ar"] .form-section-subtitle,
html[lang="ar"] .declaration-card-title {
  text-align: right;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

html[lang="ar"] .declaration-statement-text,
html[lang="ar"] .declaration-text {
  text-align: justify;
  text-justify: inter-word;
  text-align-last: right;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

html[lang="ar"] .btn,
html[lang="ar"] .form-submit-btn,
html[lang="ar"] .lang-pill-btn {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  letter-spacing: 0;
}

html[lang="ar"] .ticker-wrap,
html[lang="ar"] .ticker-marquee-wrap {
  direction: rtl;
}

html[lang="ar"] .ticker-label-wrap {
  border-radius: 0 4px 4px 0;
}

html[lang="ar"] .ticker-label-wrap::after {
  right: auto;
  left: -10px;
  border-left: none;
  border-right: 10px solid var(--primary-gold);
}

html[lang="ar"] .mark-sheet-box {
  text-align: right;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

html[lang="ar"] .contact-info-item {
  flex-direction: row;
  text-align: right;
}

html[lang="ar"] .contact-icon-circle {
  margin-right: 0;
  margin-left: 16px;
}

html[lang="ar"] .pdf-form-top-row {
  flex-direction: row-reverse;
}

html[lang="ar"] .sibling-table th,
html[lang="ar"] .sibling-table td {
  text-align: right;
}

html[lang="ar"] .marks-table th,
html[lang="ar"] .marks-table td {
  text-align: right;
}

html[lang="ar"] .marks-table th:nth-child(2),
html[lang="ar"] .marks-table td:nth-child(2),
html[lang="ar"] .marks-table th:nth-child(3),
html[lang="ar"] .marks-table td:nth-child(3),
html[lang="ar"] .marks-table th:nth-child(4),
html[lang="ar"] .marks-table td:nth-child(4) {
  text-align: center;
}

html[lang="ar"] .student-meta-grid {
  text-align: right;
}

html[lang="ar"] .checkbox-tag-item {
  direction: rtl;
  text-align: right;
}

html[lang="ar"] .checkbox-tag-item input {
  margin-right: 0;
  margin-left: 8px;
}

html[lang="ar"] .declaration-wrap input[type="checkbox"] {
  margin-right: 0;
  margin-left: 10px;
}

html[lang="ar"] .gallery-tab-btn {
  text-align: right;
  flex-direction: row-reverse;
  justify-content: space-between;
}

html[lang="ar"] .gallery-tab-btn i {
  transform: rotate(180deg);
}

html[lang="ar"] .watermark-bg-text {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  letter-spacing: 2px;
}

html[lang="ar"] .watermark-title {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  letter-spacing: 1px;
}

html[lang="ar"] .cal-month-nav-btn i {
  transform: rotate(180deg);
}

/* Arabic mode sentence and paragraph justification */
html[lang="ar"] p,
html[lang="ar"] .about-desc-paragraph,
html[lang="ar"] .about-text-column p,
html[lang="ar"] .faculty-desc,
html[lang="ar"] .dept-desc,
html[lang="ar"] .event-card-desc,
html[lang="ar"] .rules-list li,
html[lang="ar"] .declaration-statement-text,
html[lang="ar"] .declaration-text,
html[lang="ar"] .result-cat-desc,
html[lang="ar"] .structure-box p,
html[lang="ar"] .thakmila-card p,
html[lang="ar"] .faculty-card-gold p {
  text-align: justify;
  text-justify: inter-word;
  text-align-last: right;
}

/* Accessibility & Semantic SEO Helper */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Examination Marksheet Header Alignment */
.mark-sheet-header,
.result-marksheet-sheet .mark-sheet-header {
  text-align: center !important;
  text-align-last: center !important;
  width: 100% !important;
}

.mark-sheet-header h2,
.mark-sheet-header p,
.result-marksheet-sheet .mark-sheet-header h2,
.result-marksheet-sheet .mark-sheet-header p,
html[lang="ar"] .mark-sheet-header p,
html[lang="ar"] .result-marksheet-sheet .mark-sheet-header p {
  text-align: center !important;
  text-align-last: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Completely Hide and Eliminate Netlify Injected Badge / HUD iframe */
iframe#nl-badge-frame,
iframe#nl-hud-frame,
iframe[title="Powered by Netlify"],
iframe[title="Netlify"],
iframe[srcdoc*="netlify"],
div#nl-mini,
.nl-bar,
.nl-mini {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
  z-index: -99999 !important;
}
