/* Immaculate Heart Of Mary School – custom styles */

:root {
  --navy: #070322;
  --navy-header: #110c35;
  --navy-overlay: #130769;
  --green: #006f1d;
  --green-nav: #14751b;
  --gold: #e6c500;
  --gold-soft: #afa306;
  --body-text: #7a7a7a;
  --body-dark: #666666;
  --light-bg: #f8f8f8;
  --white: #ffffff;
  --header-title: "Stardos Stencil", Georgia, serif;
  --header-sub: "Taviraj", Georgia, serif;
  --nav-font: "Poppins", Arial, sans-serif;
  --body-font: Arial, Helvetica, sans-serif;
  --footer-heading: "Taviraj", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--body-text);
  background: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Page Loader ---------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy-header);
  background-image: url("../../assets/images/background-pattern.gif");
  background-size: contain;
  background-position: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(19, 7, 105, 0.55);
  pointer-events: none;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.loader-logo-wrapper {
  position: relative;
  width: 146px;
  height: 146px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3.5px solid rgba(230, 197, 0, 0.2);
  border-top-color: var(--gold);
  border-right-color: rgba(230, 197, 0, 0.85);
  box-shadow: 0 0 25px rgba(230, 197, 0, 0.25), inset 0 0 15px rgba(230, 197, 0, 0.1);
  animation: loader-spin 1.1s linear infinite;
  pointer-events: none;
}

.loader-logo {
  position: relative;
  z-index: 2;
  width: 95px;
  height: 95px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  animation: loader-pulse 2s ease-in-out infinite;
}

.loader-name {
  font-family: var(--header-title);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.loader-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.65;
  animation: particle-float 3s ease-in-out infinite;
}

.loader-particles span:nth-child(1) { top: 18%; left: 22%; animation-delay: 0s; }
.loader-particles span:nth-child(2) { top: 28%; right: 18%; animation-delay: 0.6s; width: 3px; height: 3px; }
.loader-particles span:nth-child(3) { bottom: 24%; left: 30%; animation-delay: 1.1s; }
.loader-particles span:nth-child(4) { bottom: 32%; right: 26%; animation-delay: 1.7s; width: 5px; height: 5px; }
.loader-particles span:nth-child(5) { top: 42%; left: 12%; animation-delay: 0.3s; }
.loader-particles span:nth-child(6) { top: 55%; right: 14%; animation-delay: 2s; }

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes loader-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes loader-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes particle-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-14px) scale(1.3); opacity: 0.9; }
}

/* ---------- Site Header ---------- */
.site-header {
  background-color: var(--navy-header);
  background-image: url("../../assets/images/background-pattern.gif");
  background-position: center center;
  background-size: contain;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(19, 7, 105, 0.36);
  pointer-events: none;
}

.site-header-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(90px, 140px) 1fr minmax(90px, 150px);
  align-items: center;
  gap: 0.75rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1rem 0.85rem;
  min-height: 150px;
}

.header-logo {
  width: 120px;
  max-width: 100%;
  justify-self: start;
  animation: soft-bob 2.4s ease-in-out infinite;
}

.header-titles {
  text-align: center;
  color: #fff;
  padding: 0 0.25rem;
}

.header-titles h1 {
  margin: 0;
  font-family: var(--header-title);
  font-weight: 900;
  font-size: clamp(1.35rem, 3.6vw, 3.05rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.header-titles p {
  margin: 0.15rem 0 0;
  font-family: var(--header-sub);
  font-weight: 700;
  font-size: clamp(0.85rem, 2vw, 1.8rem);
  line-height: 1.25;
}

.header-founder {
  width: 130px;
  max-width: 100%;
  justify-self: end;
  object-fit: contain;
  animation: soft-bob 2.4s ease-in-out infinite 0.4s;
}

@keyframes soft-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.header-fade-in {
  animation: header-fade 0.8s ease both;
}

@keyframes header-fade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Navigation ---------- */
.main-nav {
  background: var(--green);
  position: relative;
  z-index: 50;
}

.main-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  position: relative;
}

.nav-toggle {
  display: none;
  background: #000;
  color: #fff;
  border: none;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a,
.nav-menu > li > button.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 1.15rem;
  color: #fff;
  font-family: var(--nav-font);
  font-weight: 700;
  font-size: 0.95rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.25s ease;
  white-space:nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li > button.nav-link:hover,
.nav-menu > li:hover > a,
.nav-menu > li:hover > button.nav-link,
.nav-menu > li.active > a,
.nav-menu > li.active > button.nav-link {
  background: var(--navy-header);
}

.nav-menu .caret {
  font-size: 0.65rem;
  opacity: 0.95;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 60;
}

.nav-menu > li:hover > .dropdown,
.nav-menu > li.open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 0.55rem 1rem;
  color: #333;
  font-family: var(--nav-font);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown a:hover {
  background: var(--green);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(280px, 42vw, 560px);
  background: #110c35;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 48px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,24 C40,40 80,8 120,24 C160,40 200,8 240,24 C280,40 320,8 360,24 C400,40 440,8 480,24 C520,40 560,8 600,24 C640,40 680,8 720,24 C760,40 800,8 840,24 C880,40 920,8 960,24 C1000,40 1040,8 1080,24 C1120,40 1160,8 1200,24 L1200,48 L0,48 Z'/%3E%3C/svg%3E")
    center bottom / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 15;
}

/* ---------- Announcements ---------- */
.announcements {
  display: flex;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
}

.announcements-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--navy-header);
  color: #fff;
  font-family: var(--nav-font);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.1rem;
  white-space: nowrap;
}

.announcements-track {
  flex: 1;
  background: var(--green);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.announcements-marquee {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 0;
}

.announcements-marquee a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
}

.announcements-marquee i {
  color: var(--gold);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section {
  padding: 2.75rem 1rem;
}

.section-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--header-sub);
  color: var(--navy-header);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin: 0 0 0.85rem;
}

.section-text {
  color: #444;
  line-height: 1.7;
  font-size: 0.98rem;
  margin: 0 0 0.85rem;
}

.read-more {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: var(--navy-header);
}

.pattern-bg {
  background-color: #ffffff;
  background-image: none;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.5rem;
}

.founder-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
}

.founder-block img {
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}

.vision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.vision-card h3 {
  font-family: var(--header-sub);
  color: var(--navy-header);
  font-size: 1.25rem;
  margin: 0 0 0.65rem;
  font-weight: 700;
}

.vision-card p {
  margin: 0;
  color: #444;
  line-height: 1.65;
  font-size: 0.95rem;
}

.admissions-banner {
  text-align: center;
}

.admissions-banner img {
  margin: 0 auto 1rem;
  max-width: 720px;
  width: 100%;
}

.admissions-note {
  color: #333;
  font-weight: 600;
  font-size: 1rem;
}

.reg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  font-family: var(--nav-font);
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 2px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-green:hover {
  background: var(--navy-header);
}

.btn-navy {
  background: var(--navy-header);
  color: #fff;
}

.btn-navy:hover {
  background: var(--green);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.gallery-item {
  overflow: hidden;
  aspect-ratio: 352 / 304;
  background: #ddd;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.view-all {
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

.view-all:hover {
  color: var(--navy-header);
}

.founder-section {
  position: relative;
  background: center / cover no-repeat url("../../assets/images/school-building.jpg");
}

.founder-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
}

.founder-section .section-inner {
  position: relative;
  z-index: 1;
}

/* ---------- Contact page ---------- */
.contact-page {
  background: #fff;
  padding: 2.25rem 1rem 3rem;
  position: relative;
  z-index: 1;
  min-height: 50vh;
}

.contact-container {
  max-width: 835px;
  margin: 0 auto;
}

.contact-details {
  color: #666;
  font-size: 1rem;
  line-height: 1.85;
  font-family: Georgia, "Times New Roman", serif;
}

.contact-details strong {
  font-weight: 700;
  color: #555;
}

.contact-details a {
  color: #045cb4;
  text-decoration: underline;
}

.contact-details a:hover {
  color: var(--green);
}

.contact-map {
  margin-top: 1.75rem;
  width: 100%;
  height: 370px;
  border: 0;
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #070229;
  color: #fff;
  padding: 2.5rem 1rem 1.75rem;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem 1.5rem;
}

.footer-col h3 {
  font-family: var(--footer-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  display: inline-block;
  border-bottom: 2px solid var(--green);
  padding-bottom: 0.2rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li,
.footer-col p {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-contact li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.footer-contact i {
  color: var(--gold);
  margin-top: 0.2rem;
  width: 1rem;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.social-links a {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(230, 197, 0, 0.55);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: all 0.2s ease;
}

.social-links a:hover {
  background: var(--gold);
  color: #110c35;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(230, 197, 0, 0.35);
}

.visitor-title {
  font-size: 0.85rem !important;
  margin: 0.65rem 0 0.35rem !important;
  border: none !important;
  display: block !important;
  padding: 0 !important;
}

.visitor-counter {
  display: flex;
  gap: 3px;
  margin-bottom: 0.5rem;
  align-items: center;
}

.visitor-counter img {
  width: 20px;
  height: 27px;
  border-radius: 2px;
}

.map-card {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.3);
}

.footer-map {
  width: 100%;
  max-width: 100%;
  height: 195px;
  border: 0;
  display: block;
}

.copyright-bar {
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
}

.copyright-bar a {
  color: var(--gold);
  font-weight: 700;
}

.copyright-bar a:hover {
  text-decoration: underline;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 2px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.2s ease;
  z-index: 90;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--navy-header);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .site-header-inner {
    grid-template-columns: 90px 1fr 90px;
    min-height: 120px;
  }

  .header-logo,
  .header-founder {
    width: 88px;
  }

  .two-col,
  .vision-grid,
  .founder-block {
    grid-template-columns: 1fr;
  }

  .founder-block img {
    max-width: 180px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.45rem auto;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    background: var(--green);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu > li > a,
  .nav-menu > li > button.nav-link {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    background: #0d5a16;
  }

  .nav-menu > li.open > .dropdown {
    display: block;
  }

  .dropdown a {
    color: #fff;
    padding-left: 1.5rem;
  }

  .dropdown a:hover {
    background: var(--navy-header);
  }

  .announcements {
    flex-direction: column;
  }

  .announcements-label {
    justify-content: center;
  }

  .contact-map {
    height: 300px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-map {
    max-width: 100%;
    height: 210px;
  }
}

@media (max-width: 480px) {
  .site-header-inner {
    grid-template-columns: 70px 1fr 70px;
    gap: 0.35rem;
    padding: 0.5rem 0.6rem 0.65rem;
    min-height: 100px;
  }

  .header-logo,
  .header-founder {
    width: 68px;
  }

  .header-titles h1 {
    font-size: 1.05rem;
  }

  .header-titles p {
    font-size: 0.72rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .section {
    padding: 2rem 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .announcements-marquee {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
