/* ========================================
   IMPORTS & ROOT VARIABLES
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=Montserrat:wght@600;700&family=Lora&display=swap');

:root {
  --wine: #800020;
  --cream: #FFFDD0;
  --dark-gray: #333;
  --light-gray: #f4f4f4;
  --gold: #D4AF37;
  --teal: #26A69A;
  --font-size: 16px;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--dark-gray);
  background: #fff;
  font-size: var(--font-size);
  transition: background 0.3s ease, color 0.3s ease;
  scroll-padding-top: 90px;
}

body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--wine);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #333;
}

h3 {
  font-size: 1.6rem;
  margin: 1rem 0;
}

p {
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.section-title {
  text-align: center;
  padding: 20px 0;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--wine);
  margin: 10px auto;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
  background: linear-gradient(90deg, var(--wine), var(--gold));
  color: var(--cream);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: padding 0.3s ease;
}

.header.scrolled {
  padding: 10px 0;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Styling */
.logo img {
  height: 60px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* Navigation Links */
.navbar {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin: 0 10px;
}

.nav-menu .nav-link {
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  padding: 10px 15px;
  transition: background 0.3s ease;
}

/* Desktop: Teal background for nav links */
@media (min-width: 769px) {
  .nav-menu .nav-link {
    font-size: 1.1rem;
    background: var(--teal);
    border-radius: 5px;
  }

  .nav-menu .nav-link:hover {
    background: #21968E;
  }

  .nav-menu .nav-link[aria-current="page"] {
    background: #1a7f74;
  }
}

/* Dropdown Menu (Desktop) */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 160px;
  z-index: 1000;
  padding: 8px 0;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu .nav-link {
  display: block;
  padding: 10px 16px;
  color: #333;
  font-size: 0.95rem;
}

.dropdown-menu .nav-link:hover {
  background: #f7931e;
  color: white;
  border-radius: 4px;
}

/* Mobile Navigation (≤ 768px) */
@media (max-width: 768px) {
  .header {
    background: var(--wine);
    padding: 12px 0;
  }

  .header .container {
    flex-direction: row;
    align-items: center;
    padding: 0 10px;
  }

  .logo img {
    height: 45px; /* Smaller logo */
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    background: white;
    padding: 10px 0;
    margin: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: calc(100% - 20px);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5000;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu.active li {
    margin: 4px 0;
  }

  .nav-menu.active .nav-link {
    display: block;
    padding: 10px 18px;
    background: var(--teal);
    border-radius: 6px;
    color: white;
    font-size: 0.8rem; /* Smaller text */
  }

  /* Hamburger Menu */
  .hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
  }

  .hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--cream);
    margin: 4px 0;
    border-radius: 2px;
    transition: 0.3s;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Mobile Dropdown */
  .dropdown {
    width: 100%;
  }

  .dropdown .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    background: var(--teal);
    border-radius: 6px;
    color: white;
    font-size: 1rem; /* Smaller font */
  }

  .dropdown-menu {
    display: none;
    position: static;
    background: #f0f0f0;
    margin-top: 5px;
    border-radius: 6px;
    overflow: hidden;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown-menu .nav-link {
    display: block;
    padding: 10px 40px;
    color: #333;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
    font-size: 0.95rem; /* Even smaller */
  }

  .dropdown-menu .nav-link:hover {
    background: #e0e0e0;
    color: var(--wine);
  }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(128, 0, 32, 0.6), rgba(128, 0, 32, 0.6)),
    url('https://media.istockphoto.com/id/92011518/photo/old-religious-building.jpg?s=612x612&w=0&k=20&c=1OCqH4dQlyyAg0GIzNAflf8IMtNXGy_a6VNCRZ5rj1M=') center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--cream);
  margin-bottom: 50px;
}

.hero-text {
  color: yellow;
  font-size: 1.8rem;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 20px;
  line-height: 1.4;
  backdrop-filter: blur(50px);
}

.hero-text span {
  color: var(--cream);
  font-weight: bold;
}

/* ========================================
   QUOTE BANNER
   ======================================== */
.quote-banner {
  background: var(--wine);
  color: var(--cream);
  padding: 15px;
  text-align: center;
  font-style: italic;
}

.quote-btn {
  margin-left: 15px;
  background: var(--cream);
  color: var(--wine);
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

/* ========================================
   SEARCH BAR
   ======================================== */
.search-bar-container {
  text-align: center;
  padding: 20px 0;
  background: var(--light-gray);
}

.search-bar-container form {
  display: inline-flex;
}

.search-bar-container input {
  padding: 10px;
  width: 250px;
  border: 1px solid #ddd;
  border-radius: 6px 0 0 6px;
  outline: none;
}

.search-bar-container button {
  padding: 10px 15px;
  background: var(--wine);
  color: var(--cream);
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

.search-bar-container button:hover {
  background: #a00030;
}

/* ========================================
   CAROUSEL SECTION
   ======================================== */
.carousel-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  min-height: 500px;
  aspect-ratio: 16 / 9;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: flex-end;
  will-change: opacity;
}

.slide-caption {
  width: 100%;
  color: var(--cream);
  padding: 20px;
  text-align: center;
  font-size: 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  margin-bottom: 30px;
  backdrop-filter: blur(2px);
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: var(--cream);
  border: none;
  font-size: 2rem;
  padding: 0 15px;
  cursor: pointer;
  z-index: 10;
  height: 60px;
  display: flex;
  align-items: center;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  z-index: 10;
}

.carousel-indicator {
  display: inline-block;
  width: 15px;
  height: 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
  border: 2px solid #b71c1c;
}

.carousel-indicator.active {
  background: var(--cream);
}

/* ========================================
   LIVE STREAM SECTION
   ======================================== */
.live-stream {
  padding: 40px 20px;
  background: var(--light-gray);
  text-align: center;
}

.stream-embed {
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}

.countdown {
  margin: 15px 0;
  font-size: 1.1rem;
}

.notify-section {
  margin-top: 20px;
  text-align: center;
}

.notify-section h4 {
  margin-bottom: 10px;
}

.notify-section p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.notify-section input {
  padding: 10px;
  width: 250px;
  max-width: 90%;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin: 10px 0;
}

.notify-section button {
  padding: 10px 20px;
  background: #f7931e;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.notify-section button:hover {
  background: #e07e0c;
}

#notifyMsg {
  margin-top: 10px;
  font-size: 0.9rem;
  height: 20px;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
  padding: 60px 0;
  background: var(--light-gray);
}

.about-content {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin: 0 auto;
}

.motto-section {
  margin: 25px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.motto-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.anthem-box {
  background: var(--cream);
  border: 2px solid var(--wine);
  padding: 20px;
  border-radius: 10px;
  margin: 25px 0;
  text-align: center;
}

.anthem-box h3 {
  margin-bottom: 15px;
  color: var(--wine);
}

.anthem-text {
  font-family: 'Lora', serif;
  white-space: pre-line;
  line-height: 1.8;
  text-align: center;
  font-size: 1.1rem;
}

.audio-player {
  margin-top: 15px;
}

.audio-player h4 {
  margin-bottom: 10px;
}

.audio-player button {
  padding: 10px 20px;
  background: #f7931e;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.audio-player button:hover {
  background: #e07e0c;
}

.prayer-feed {
  margin-top: 25px;
  padding: 15px;
  background: #f0f8ff;
  border-left: 4px solid var(--wine);
}

/* ========================================
   TIMELINE SECTION
   ======================================== */
.timeline {
  padding: 60px 0;
  background: #f9f9f9;
}

#timeline-container {
  max-width: 800px;
  margin: 30px auto;
  text-align: center;
}

.loading-spinner {
  font-style: italic;
  color: #666;
}

/* ========================================
   ACADEMICS SECTION
   ======================================== */
.academics {
  padding: 60px 0;
  background: var(--cream);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.card i {
  color: var(--wine);
  margin-bottom: 10px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.project-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* ========================================
   CODE CORNER SECTION
   ======================================== */
.code-corner {
  padding: 60px 0;
  background: var(--light-gray);
}

.blog-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

/* ========================================
   BADGES SECTION
   ======================================== */
.badges-section {
  padding: 60px 0;
  background: var(--cream);
  text-align: center;
}

.badges-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.badge-item {
  text-align: center;
}

.badge-item img {
  width: 60px;
  height: 60px;
}

.badge-item p {
  margin: 5px 0;
  font-weight: bold;
  color: var(--wine);
}

/* ========================================
   PARENT PORTAL SECTION
   ======================================== */
.parent-portal {
  padding: 60px 0;
  background: #f0f0f0;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.portal-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #333;
  position: relative;
  overflow: hidden;
  border: 1px solid #eee;
}

.portal-card i {
  color: var(--wine);
  font-size: 2rem;
  margin-bottom: 10px;
}

.portal-card span {
  font-weight: 600;
  color: var(--wine);
  margin-bottom: 5px;
  display: block;
}

.portal-card small {
  font-size: 0.85rem;
  color: #555;
}

.portal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  background: var(--cream);
  color: var(--wine);
}

.portal-card:hover i,
.portal-card:hover span {
  color: var(--wine);
}

.portal-card::after {
  content: "↓";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.9rem;
  opacity: 0;
  color: var(--wine);
}

.portal-card:hover::after {
  opacity: 1;
}

/* ========================================
   ADMISSIONS SECTION
   ======================================== */
.admissions {
  padding: 60px 0;
  background: var(--light-gray);
}

.download-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--cream);
  color: var(--wine);
  border: 2px solid var(--wine);
  border-radius: 6px;
  margin-top: 20px;
}

.download-btn:hover {
  background: var(--wine);
  color: var(--cream);
}

/* ========================================
   EVENTS SECTION
   ======================================== */
.events {
  padding: 60px 0;
  background: #f9f9f9;
}

.event-list {
  margin-top: 20px;
}

.event-card {
  padding: 15px;
  margin-bottom: 10px;
  border-left: 4px solid var(--wine);
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ========================================
   SHARE BUTTONS
   ======================================== */
.share-buttons {
  margin: 30px 0;
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.share-buttons strong {
  display: block;
  margin-bottom: 15px;
  color: #333;
  font-size: 1.1rem;
}

.share-buttons button {
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 10%;
  margin: 5px;
  cursor: pointer;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.share-buttons .fab {
  color: inherit;
}

.share-buttons button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.share-buttons .btn-facebook {
  color: #1877f2;
}

.share-buttons .btn-twitter {
  color: #1da1f2;
}

.share-buttons .btn-whatsapp {
  color: #25d366;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
  padding: 60px 0;
  background: var(--cream);
}

.contact-flex {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contact-info p {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info a {
  color: #0066cc;
}

.contact-form {
  flex: 1;
  min-width: 300px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--wine);
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--wine);
  color: var(--cream);
  text-align: center;
  padding: 30px 20px;
}

.accessibility-toggle {
  margin-top: 15px;
}

.accessibility-toggle button {
  background: var(--cream);
  color: var(--wine);
  border: none;
  padding: 5px 10px;
  margin: 0 5px;
  border-radius: 5px;
  cursor: pointer;
}

/* ========================================
   BACK-TO-TOP BUTTON
   ======================================== */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: var(--wine);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  display: none;
}

#backToTop.show {
  display: flex;
}

#backToTop:hover {
  background: var(--cream);
  color: var(--wine);
  transform: translateY(-3px);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .header,
  .footer,
  .accessibility-toggle,
  .cta-button,
  .share-buttons,
  #backToTop {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .container {
    max-width: 100%;
    padding: 20px;
  }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-text {
    font-size: 1.6rem;
  }

  .carousel-section {
    min-height: 400px;
  }

  .portal-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}
#typed-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  line-height: 1.4;
  white-space: pre-wrap; /* Preserves spaces and line breaks */
  min-height: 1.2em; /* Prevents layout shift */
}

#typed-text .highlight {
  color: #f7931e; /* Gold-orange accent */
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Optional: Add blinking cursor */
#typed-text::after {
  content: '|';
  margin-left: 4px;
  animation: blink 1s step-end infinite;
  opacity: 1;
  color: #f7931e;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}