/* css/style.css */
/* Complete Stylesheet - Varthe Panjurli Dharma Chaavadi */
/* Incorporates fixed/centered menu, fixed CTA button, transparent internal header */
/* Version: Cleaned-up */

/* === Define Local Font Files === */
@font-face {
  font-family: "Noto Sans Kannada";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/NotoSansKannada-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans Kannada";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/NotoSansKannada-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans Kannada";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/NotoSansKannada-Bold.woff2") format("woff2");
}
/* ============================ */

/* === Base Setup === */
html,
body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}
body {
  font-family: "Noto Sans Kannada", sans-serif;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1,
h2,
h3,
strong,
b {
  font-weight: 700;
}

/* === Backgrounds per Page Type === */
body:not(.internal-page) {
  background-image: url("../images/bg.jpg");
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #f0f0f0;
}
body.internal-page {
  background-color: #ffffff; /* Fallback color if image fails */
  background-image: url("../images/bg-internal.png"); /* Your internal page background */
  background-repeat: repeat; /* Tile the image (change to 'no-repeat' if needed) */
  background-position: top left; /* Start tiling from top left (or 'center center') */
  background-size: auto; /* Use image's original size for tiling (change to 'cover' if 'no-repeat') */
  background-attachment: scroll; /* Background scrolls with page (change to 'fixed' if needed) */
}
/* ============================ */

/* === Initial View & Logo Animation (Homepage Only) === */
#initial-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #920a22;
  z-index: 999; /* Below initial logo */
  opacity: 1;
  transition: opacity 0.6s ease-out;
}
#initial-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  z-index: 1001; /* Highest for intro */
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  text-decoration: none;
}
#initial-logo a {
  display: block;
  text-decoration: none;
  width: 100%;
  height: 100%;
}
#initial-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(255, 0, 0, 0.9))
    drop-shadow(0 0 15px rgba(255, 0, 0, 0.6))
    drop-shadow(0 0 25px rgba(255, 0, 0, 0.4));
  transition: filter 0.6s ease-out;
}
/* ============================ */

/* === Navigation Placeholder (Homepage before scroll) === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 998; /* Below initial logo and menu */
  height: 120px;
  opacity: 0;
  pointer-events: none;
}
.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 100%;
}
#navbar-logo-placeholder {
  width: 100px;
  height: 100px;
  position: relative;
}

/* === Transparent Header for Internal Pages (Holds Logo) === */
.site-header-internal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 990; /* Below floating menu and CTA button */
  /* background-color: #ffffff; */ /* REMOVED - Make header transparent */
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); */ /* REMOVED */
  height: 100px; /* Adjusted height */
  padding: 0 20px;
  box-sizing: border-box;
  pointer-events: none; /* Make container non-interactive */
}
.internal-header-container {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align logo to the left */
}
.internal-logo-link {
  display: block;
  height: 80px; /* Adjust size as needed */
  width: 80px;
  flex-shrink: 0;
  margin-top: 10px; /* Adjust vertical position */
  pointer-events: auto; /* Make logo clickable */
  position: relative; /* Ensure it's interactable */
  z-index: 1001; /* Above transparent header */
}
.internal-logo-link img {
  display: block;
  width: 120%;
  height: 120%;
  object-fit: contain;
}

/* === Floating Menu Bar (Default: Fixed, Centered, Red) === */
.floating-menu {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000; /* High z-index */
  background-color: #920a22; /* Red background */
  padding: 10px 25px;
  border-radius: 35px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  opacity: 1; /* Default visible */
  pointer-events: auto; /* Default interactive */
  transition: opacity 0.3s ease-in-out 0.1s; /* Fade transition */

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

/* Hide floating menu only on homepage before scroll */
body:not(.internal-page):not(.scrolled) .floating-menu {
  opacity: 0;
  pointer-events: none;
}

/* Hamburger Menu Button */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  z-index: 1000; /* Above menu links */
}
.hamburger-menu .hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff; /* White lines on red background */
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Links Container (Desktop) */
.menu-links-container {
  display: flex;
  gap: 30px;
  align-items: center;
}

.floating-menu .menu-links-container a {
  text-decoration: none;
  color: #ffffff; /* White text on red background */
  font-weight: 700;
  font-size: 1.05em;
  padding: 5px 0;
  position: relative;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.floating-menu .menu-links-container a:hover {
  color: #ffffff;
  opacity: 0.85;
}

.floating-menu .menu-links-container a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff; /* White underline */
  transition: width 0.3s ease;
}

.floating-menu .menu-links-container a:hover::after {
  width: 100%;
}

/* --- Submenu Styling (Desktop & Mobile Base) --- */
.menu-item-with-submenu {
  position: relative;
}
.submenu-indicator {
  font-size: 0.7em;
  margin-left: 5px;
  display: inline-block;
  transition: transform 0.3s ease;
  color: #ffffff; /* White indicator */
}
.menu-item-with-submenu:hover .submenu-indicator {
  transform: rotate(180deg); /* Desktop hover effect */
}
.submenu {
  /* display: none; */ /* Handled by JS/hover/click */
  position: absolute;
  top: calc(100% + 10px); /* Position below parent */
  left: 0;
  min-width: 180px;
  background-color: #f9e37a; /* Yellow background */
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 10px 15px;
  list-style: none;
  margin: 0;
  z-index: 1100; /* Above menu bar */
  opacity: 0; /* Hidden by default */
  visibility: hidden;
  transform-origin: top center;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  transform: translateY(-10px); /* Start slightly up */
}
/* Desktop submenu display on hover */
.menu-item-with-submenu:hover > .submenu {
  display: block; /* Needed if JS doesn't handle desktop */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu li {
  margin: 0;
}
/* Submenu link styling - Simplified Selector */
.floating-menu .submenu li a {
  display: block;
  padding: 8px 10px;
  color: #920a22; /* Red text on yellow background */
  text-decoration: none;
  white-space: nowrap;
  font-weight: 400;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  border-radius: 4px;
}
/* Submenu link hover styling - Simplified Selector */
.floating-menu .submenu li a:hover {
  background-color: rgba(146, 10, 34, 0.1); /* Faint red bg on hover */
  color: #920a22;
  opacity: 1; /* Ensure full opacity */
}
.floating-menu .submenu li a::after {
  /* Submenu items don't need main underline */
  display: none;
}

/* --- Internal Page Specific Adjustments --- */
/* Rule block body.internal-page .floating-menu REMOVED as redundant */

/* === Main Content Area === */
.content {
  padding-top: 150px; /* Default padding top */
  padding-left: 20px;
  padding-right: 20px;
  text-align: center;
  padding-bottom: 50px;
  flex-grow: 1;
  opacity: 1;
  transition: opacity 0.5s ease-in-out 0.2s;
  background-color: transparent; /* Transparent by default */
  border-radius: 5px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
  box-sizing: border-box;
}

/* Homepage content hidden initially */
body:not(.internal-page):not(.scrolled) .content {
  opacity: 0;
}
/* Adjust content padding for internal pages due to fixed menu/header */
body.internal-page .content {
  padding-top: 100px; /* Reduced padding top */
  opacity: 1;
}

@keyframes slideDownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px); /* Start 50px above final position */
    visibility: visible; /* Make visible when animation starts */
  }
  to {
    opacity: 1;
    transform: translateY(0); /* End at normal position */
  }
}

/* Top Image (deity.png) Styling */
.content-top-image {
  display: block;
  margin: 20px auto 30px auto;
  max-width: 90%;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.95))
    /* Inner brighter glow */ drop-shadow(0 0 30px rgba(255, 255, 255, 0.7))
    /* Medium glow */ drop-shadow(0 0 50px rgba(255, 255, 255, 0.5)); /* Outer softer glow */
  opacity: 0; /* Start invisible */
  visibility: hidden; /* Start hidden */
  transform: translateY(-50px); /* Start 50px above */
  /* Add transition for potential fallback or smoother non-animated appearance */
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0s linear 0.5s;
}

body:not(.internal-page).scrolled .content-top-image {
  /* Apply the animation */
  animation: slideDownFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s
    forwards;
  /* animation-name | duration | timing-function | delay | fill-mode */

  /* Override initial state for animation */
  opacity: 1; /* Set by animation, but good for clarity */
  transform: translateY(0); /* Set by animation */
  visibility: visible; /* Set by animation */
}

.content h1 {
  margin-top: 0;
  color: #333;
  font-size: 2.5em;
  margin-bottom: 15px;
  text-align: center;
}
.content p {
  color: #555;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 20px auto;
}

/* About Page Specific */
.about-content section {
  margin-bottom: 40px;
  text-align: justify;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.about-content section p {
  background-color: transparent; /* Ensure text background is transparent */
  padding: 0;
}
.about-content h1,
h2 {
  text-align: center; /* Center headings */
  color: #920a22;
  margin-top: 40px;
  margin-bottom: 30px;
}

.about-content {
  text-align: left; /* Align text left for contact details/form */
  max-width: 1100px; /* Max width for contact content */
  margin: 0 auto;
}

/* ============================ */

/* === Fixed Contact CTA Button === */
.cta-contact-button {
  position: fixed;
  top: 50px; /* Align with floating menu */
  transform: translateY(-50%); /* Vertically center button */
  right: 30px;
  z-index: 1001; /* Below menu (1000) but above most content */

  background-color: #920a22;
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  transition: opacity 0.4s ease-in-out, background-color 0.3s ease,
    transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 1;
  pointer-events: auto;
}
/* Hide CTA button on homepage BEFORE scroll animation */
body:not(.internal-page):not(.scrolled) .cta-contact-button {
  opacity: 0;
  pointer-events: none;
  /* transform: translateX(15px) translateY(-50%); */ /* Optional slide */
}
.cta-contact-button:hover {
  background-color: #7a081c;
  transform: translateY(calc(-50% - 3px)) scale(1.05); /* Hover lift + scale */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* === Footer Styles === */
.site-footer {
  margin-top: 60px;
  position: relative;
  height: 120px;
  background-color: transparent;
  background-image: url("../images/footer.png");
  background-repeat: repeat-x;
  background-position: bottom center;
  background-size: auto 100%;
  overflow: hidden;
  z-index: 10;
}
.footer-content {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;
  z-index: 12;
  background-color: rgba(146, 10, 34, 0.85);
  padding: 8px 15px;
  border-radius: 5px;
  box-sizing: border-box;
}
.footer-text-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.footer-content .copyright,
.footer-content .developed-by {
  color: #ffffff;
  font-size: 0.9em;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
  flex-basis: auto;
}
.footer-content .copyright {
  opacity: 0.9;
  text-align: left;
}
.footer-content .developed-by {
  font-style: italic;
  opacity: 0.7;
  text-align: right;
}
.footer-content .developed-by a {
  color: #ffffff;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}
.footer-content .developed-by a:hover {
  opacity: 0.8;
}
/* ============================ */

/* === Responsive Styles for Mobile === */
@media (max-width: 768px) {
  /* Logo/Header */
  .site-header-internal {
    height: 80px; /* Slightly smaller header */
    padding: 0 15px;
  }
  .internal-logo-link {
    height: 60px; /* Smaller logo */
    width: 60px;
    margin-top: 10px;
  }

  /* Floating Menu Adjustments */
  .floating-menu {
    padding: 8px 15px; /* Slightly smaller padding */
    width: calc(100% - 80px); /* Adjust width to avoid hitting CTA */
    max-width: 400px; /* Max width */
  }
  .hamburger-menu {
    display: block; /* Show hamburger */
  }

  .menu-links-container {
    display: none; /* Hide desktop links */
    /* Mobile dropdown base - positioned relative to floating menu */
    position: absolute;
    top: calc(100% + 5px); /* Below the menu bar */
    left: 50%;
    transform: translateX(-50%);
    width: 250px; /* Fixed width dropdown */
    max-width: calc(100vw - 40px); /* Ensure it fits screen */
    background-color: #920a22; /* Red background */
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 1100; /* Above menu bar */
  }
  .menu-links-container.mobile-menu-open {
    display: flex; /* Show dropdown */
  }

  /* Links inside Mobile Dropdown */
  .floating-menu .menu-links-container a,
  .floating-menu .menu-links-container .menu-item-with-submenu > a {
    padding: 15px 20px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff; /* White text */
  }
  .floating-menu .menu-links-container a:last-child,
  .floating-menu .menu-links-container .menu-item-with-submenu:last-child > a,
  .floating-menu
    .menu-links-container
    .menu-item-with-submenu:last-child
    > .submenu {
    border-bottom: none;
  }
  .floating-menu .menu-links-container a::after {
    display: none; /* No underlines on mobile dropdown items */
  }
  .floating-menu .menu-links-container .submenu-indicator {
    color: #ffffff; /* White indicator */
  }

  /* Submenu Styling (Mobile) */
  .menu-item-with-submenu {
    width: 100%;
  }
  .submenu-indicator {
    float: none; /* Ensure no float */
    transition: transform 0.3s ease;
  }
  .has-submenu.submenu-active .submenu-indicator {
    transform: rotate(180deg);
  }
  .submenu {
    position: static; /* Static position within dropdown */
    display: none; /* Hidden until toggled */
    width: 100%;
    background-color: #f9e37a; /* Yellow background */
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    opacity: 1; /* Ensure visible when display: block */
    visibility: visible;
    transform: none;
    border-bottom: 1px solid rgba(146, 10, 34, 0.15); /* Reddish border */
  }
  .submenu.submenu-open {
    display: block; /* Show when active */
  }
  /* Submenu links */
  .floating-menu .submenu li a {
    /* Selector already simplified */
    padding: 12px 20px 12px 35px; /* Indent submenu items */
    font-weight: 400;
    border-bottom: 1px solid rgba(146, 10, 34, 0.1);
    color: #920a22; /* Red text on yellow bg */
  }
  .floating-menu .submenu li:last-child a {
    border-bottom: none;
  }
  .floating-menu .submenu li a:hover {
    /* Selector already simplified */
    background-color: rgba(146, 10, 34, 0.05); /* Faint red hover */
    color: #920a22;
    opacity: 1;
  }

  /* Content Adjustments */
  body.internal-page .content {
    padding-top: 80px; /* Adjust if header height changed */
  }
  body:not(.internal-page) .content {
    padding-top: 100px; /* Keep homepage padding */
  }
  .content h1 {
    font-size: 2em;
  }
  .about-content section {
    padding: 0 10px;
  }

  /* CTA Button Adjustments */
  .cta-contact-button {
    right: 15px; /* Closer to edge */
    padding: 10px 15px; /* Smaller padding */
    font-size: 0.85em; /* Slightly smaller text */
  }

  /* Footer Adjustments */
  .site-footer {
    height: 100px;
    background-size: auto 100%;
  }
  .footer-content {
    width: 95%;
    bottom: 5px;
    padding: 6px 10px;
  }
  .footer-text-line {
    justify-content: center;
    text-align: center;
  }
  .footer-content .copyright,
  .footer-content .developed-by {
    text-align: center;
    width: 100%;
    flex-basis: 100%;
    font-size: 0.8em;
  }
  .footer-content .developed-by {
    margin-top: 5px;
  }
} /* === End of @media query === */

/* === Styles Applied When Scrolled (Homepage Only) === */
/* Controls visibility of initial elements and appearance of menu/content */
body:not(.internal-page).scrolled #initial-view {
  opacity: 0;
  pointer-events: none;
}
body:not(.internal-page).scrolled #initial-logo {
  width: 100px; /* Small logo size */
  height: 100px;
  transform: translate(0, 0); /* Reset transform */
  z-index: 1001; /* Keep high during transition? Maybe lower like 995 */
}
body:not(.internal-page).scrolled #initial-logo img {
  filter: none; /* Remove glow */
}
body:not(.internal-page).scrolled .content {
  opacity: 1; /* Show content */
}
/* ============================ */

/* === Invitation Section Styles (DEBUGGING BACKGROUND) === */
.invitation-section {
  /* Keeping LIME background for testing - CHANGE BACK to #920a22 when ready */
  background: url("../images/bg-invitation.png") /* Your verified path */ repeat
    top left #920a22; /* <-- TEMPORARY DEBUG COLOR */

  background-blend-mode: normal;
  /* Restore vertical padding, remove horizontal */
  padding: 60px 0;
  /* Add margin for the GAP between section and border divs */
  margin: 5px 0; /* 10px top/bottom margin creates the gap */
  border-radius: 0;
  /* box-shadow: none; */ /* Keep shadow removed or add back if desired */
  box-sizing: border-box;
}

.section-border {
  width: 100%;
  height: 32px; /* Height of the border row - ADJUST AS NEEDED */
  background-image: url("../images/border1.png"); /* Your border image */
  background-repeat: repeat-x;
  background-position: center center;
  background-size: auto 100%; /* Stretch pattern vertically to fill height */
  background-color: transparent; /* No background color behind pattern */
}

.border-bottom {
  /* Specific class for the bottom border div */
  transform: scaleY(-1); /* Flip it vertically */
}

/* --- Styles for .invitation-images and .invitation-img remain unchanged --- */
.invitation-images {
  max-width: 1100px;
  /* Change margin back - gap is handled by section margin now */
  margin: 0 auto; /* Center horizontally, no extra top/bottom margin */
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
}

.invitation-img {
  display: block;
  max-width: 45%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  border: 3px solid #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.invitation-img:hover {
  transform: scale(1.03) translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* --- Responsive adjustments remain unchanged --- */
@media (max-width: 768px) {
  .section-border {
    height: 20px; /* Slightly smaller border */
  }
  .invitation-section {
    padding: 40px 0; /* Adjust padding */
    margin: 8px 0; /* Adjust gap */
  }
  .invitation-images {
    gap: 25px;
    justify-content: center;
    padding: 0 15px;
    /* margin: 0 auto; */ /* Stays same */
  }
  .invitation-img {
    max-width: 80%;
  }
}

@media (max-width: 480px) {
  .invitation-section {
    padding: 30px 0; /* Adjust padding */
    margin: 6px 0; /* Adjust gap */
  }
  .invitation-images {
    padding: 0 10px;
  }
  .invitation-img {
    max-width: 95%;
  }
}

/* === Contact Page Styles === */

/* Adjust overall content padding if needed */
.contact-content {
  text-align: left; /* Align text left for contact details/form */
  max-width: 1100px; /* Max width for contact content */
  margin: 0 auto;
}

.contact-content h1,
.contact-content h2 {
  text-align: center; /* Center headings */
  color: #920a22;
  margin-top: 40px;
  margin-bottom: 30px;
}

/* --- Contact Info Cards --- */
.contact-info-cards {
  display: flex;
  flex-wrap: wrap; /* Allow cards to wrap */
  justify-content: space-between; /* Distribute space */
  gap: 30px; /* Space between cards */
  margin-bottom: 50px;
}

.contact-card {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
  flex: 1; /* Allow cards to grow */
  min-width: 420px; /* Minimum width before wrapping */
  box-sizing: border-box;
  /* transition: transform 0.3s ease, box-shadow 0.3s ease; */
}

/* Optional hover effect for cards */
/*
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}
*/

.contact-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  font-size: 1.4em;
}

/* Optional Icon Styling */
/*
.contact-icon {
  font-size: 2.5em;
  color: #920a22;
  margin-bottom: 15px;
  display: block;
}
*/

.contact-card p {
  color: #555;
  line-height: 1.7;
  margin-bottom: 0; /* Remove bottom margin from paragraph */
}

.contact-card a {
  color: #920a22;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-card a:hover {
  color: #7a081c;
  text-decoration: underline;
}

/* --- Map Section --- */
.contact-map {
  margin-bottom: 50px;
}

.map-container {
  position: relative;
  padding-bottom: 50%; /* Aspect ratio (height/width * 100) - adjust as needed */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Contact Form Section --- */
.contact-form-section {
  background-color: #f9f9f9; /* Light background for form area */
  padding: 40px;
  border-radius: 8px;
  margin-bottom: 40px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.contact-form {
  max-width: 700px; /* Limit form width */
  margin: 0 auto; /* Center form */
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box; /* Include padding and border in width */
  transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
  border-color: #920a22;
  outline: none;
}

.form-group textarea {
  resize: vertical; /* Allow vertical resize */
  min-height: 80px;
}

.form-group .required {
  color: #cc0000; /* Red asterisk */
  margin-left: 4px;
  font-weight: bold;
}

.form-submit {
  text-align: center;
  margin-top: 30px;
}

.submit-button {
  background-color: #920a22;
  color: #ffffff;
  padding: 12px 35px;
  border: none;
  border-radius: 25px; /* Match CTA button style */
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-button:hover {
  background-color: #7a081c;
  transform: scale(1.03);
}

.contact-form-section p small {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: #666;
}

/* Responsive Adjustments for Contact Page */
@media (max-width: 992px) {
  .contact-card {
    min-width: calc(50% - 15px); /* Two cards per row on medium screens */
    margin-bottom: 30px; /* Add margin between rows */
  }
  .contact-info-cards {
    justify-content: center; /* Center cards when 2 per row */
  }
}

@media (max-width: 768px) {
  .contact-content h1 {
    font-size: 2em; /* Adjust heading size */
  }
  .contact-card {
    min-width: 90%; /* One card per row on smaller screens */
    margin-bottom: 25px;
  }
  .contact-info-cards {
    gap: 25px;
  }
  .contact-form-section {
    padding: 25px;
  }
}

/* ============================ */

/* === History Page Inline Image Styles === */

.inline-history-img {
  float: right; /* Float image to the right */
  max-width: 200px; /* Max width of image, adjust as needed */
  /* width: 35%; */ /* Alternative: use percentage width */
  height: auto; /* Maintain aspect ratio */
  margin-left: 15px; /* Space between text (left) and image */
  margin-bottom: 10px; /* Space below image if text wraps under */
  margin-top: 5px; /* Small space above image */
  border-radius: 5px; /* Optional rounded corners */
  border: 1px solid #e0e0e0; /* Optional light border */
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.07); /* Optional subtle shadow */
}

/* Clearfix for paragraphs containing floated images */
.paragraph-with-image::after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
  .inline-history-img {
    float: none; /* Disable float */
    display: block; /* Make image block level */
    margin: 15px auto; /* Center image with margin */
    max-width: 80%; /* Allow image to be larger */
    /* width: 80%; */ /* Alternative */
  }
}

/* === Account Page Styles === */

.account-content h1 {
  margin-top: 40px;
  text-align: center;
  color: #920a22;
  margin-bottom: 30px;
}

.table-container {
  overflow-x: auto; /* Add horizontal scroll on small screens if needed */
  padding: 5px; /* Prevent shadow clipping */
}

.account-table {
  width: 100%;
  max-width: 800px; /* Adjust max width as needed */
  margin: 20px auto; /* Center table */
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px; /* Optional: rounded corners for the table */
  overflow: hidden; /* Needed for border-radius on table */
}

.account-table th, /* Use th for labels if preferred semantically */
.account-table td {
  border: 1px solid #e0e0e0;
  padding: 15px; /* Increased padding */
  text-align: left;
  vertical-align: middle; /* Align content vertically */
  font-size: 1.05em; /* Slightly larger text */
  color: #333;
  line-height: 1.6;
}

/* Style for label cells (first cell in most rows) */
.account-table tbody tr td:first-child:not([colspan]) {
  font-weight: 700; /* Bolder labels */
  width: 40%; /* Fixed width for label column */
  color: #555;
  background-color: #f9f9f9; /* Subtle background for labels */
}

/* Style for value cells (second cell in most rows) */
.account-table tbody tr td:nth-child(2) {
  color: #111; /* Darker value text */
  word-break: break-word; /* Help long values wrap */
}

/* QR Code Cell Specific Styles */
.qr-code-cell {
  text-align: center;
  padding: 25px 15px; /* More padding */
  background-color: #fdfdfd; /* Slightly different background */
}

.qr-code-cell p {
  margin-bottom: 15px;
  font-weight: bold;
  color: #444;
}

.qr-code-image {
  display: block; /* Center using margin auto */
  margin: 0 auto;
  max-width: 240px; /* Adjust QR code size */
  height: auto;
  border: 1px solid #eee;
  padding: 5px; /* Small padding around QR */
  background-color: #fff;
}

/* Contact Info Header Cell */
.contact-header-cell {
  background-color: #f0f0f0; /* Header row background */
  text-align: center;
  font-weight: bold;
  color: #333;
  border-top: 2px solid #ccc; /* Separator line */
  border-bottom: 2px solid #ccc;
}

.account-table a {
  color: #920a22;
  text-decoration: none;
}
.account-table a:hover {
  text-decoration: underline;
  color: #7a081c;
}

/* Responsive Table Handling (Optional: Stack on small screens) */
/* For now, horizontal scroll is enabled via .table-container if needed */
/* If stacking is preferred:
@media (max-width: 600px) {
  .account-table thead { display: none; } // Hide headers if using thead
  .account-table tr { display: block; margin-bottom: 15px; border-bottom: 2px solid #ddd; }
  .account-table td { display: block; text-align: right; border: none; border-bottom: 1px dotted #ccc; position: relative; padding-left: 50%; }
  .account-table td:before { position: absolute; top: 12px; left: 15px; width: 45%; padding-right: 10px; white-space: nowrap; content: attr(data-label); text-align: left; font-weight: bold; } // Requires adding data-label attribute to HTML td elements
  .account-table tbody tr td:first-child { background-color: inherit; width: auto; font-weight: normal; } // Reset first-child styles
  .account-table td[colspan="2"] { text-align: center; padding-left: 15px; } // Adjust colspan cells
  .account-table td[colspan="2"]:before { display: none; } // Hide label for colspan
  .qr-code-image { max-width: 180px; }
  .contact-header-cell { text-align: center; padding-left: 15px; }
  .contact-header-cell:before { display: none; }
}
*/

/* ============================ */

/* === Donation Page Styles === */

.donation-content h1 {
  text-align: center;
  margin-top: 40px;
  color: #920a22;
  margin-bottom: 15px;
}
.donation-content p {
  max-width: 800px; /* Match content width */
  margin-left: auto;
  margin-right: auto;
  color: #555;
  line-height: 1.6;
}

.table-container {
  overflow-x: auto; /* Enable horizontal scroll on small screens */
  margin-top: 30px;
  padding: 1px; /* Prevent shadow clipping */
}

.donation-table {
  width: 100%;
  min-width: 500px; /* Minimum width before scrollbar appears */
  margin: 0 auto; /* Centered within container */
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden; /* For border-radius */
}

.donation-table th {
  background-color: #920a22; /* Primary red header */
  color: #ffffff;
  font-weight: 700;
  padding: 12px 15px;
  text-align: center;
  border-bottom: 2px solid #7a081c; /* Darker red border */
  white-space: nowrap;
}

.donation-table tbody td {
  padding: 10px 15px;
  border-bottom: 1px solid #eee; /* Light line between rows */
  color: #333;
  vertical-align: middle;
  line-height: 1.5;
  text-align: left;
}

/* Align Serial Number and Amount */
.donation-table th:first-child,
.donation-table tbody td:first-child {
  /* Serial No Column */
  text-align: center;
  width: 80px; /* Fixed width for S.No */
}

.donation-table th:last-child,
.donation-table tbody td:last-child {
  /* Amount Column */
  text-align: right;
  width: 150px; /* Fixed width for Amount */
  font-weight: 500;
}

/* Alternate row styling */
.donation-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.donation-table tbody tr:hover {
  background-color: #f0f0f0; /* Subtle hover effect */
}

/* Footer row styling */
.donation-table tfoot td {
  padding: 15px;
  text-align: center;
  font-style: italic;
  color: #555;
  background-color: #f5f5f5;
  border-top: 2px solid #ddd; /* Separator line */
}

.donation-table tfoot a {
  color: #920a22;
  font-weight: 500;
  text-decoration: none;
}
.donation-table tfoot a:hover {
  text-decoration: underline;
}

/* Responsive adjustments for Donation Table */
@media (max-width: 600px) {
  /* Target smaller screens */
  .donation-table {
    /* min-width: 500px; */ /* REMOVE or comment out min-width */
    display: table; /* Ensure table layout is still attempted */
    width: 100%; /* Try to use full width */
  }

  .donation-table th,
  .donation-table tbody td {
    padding: 8px 6px; /* Reduce padding */
    font-size: 0.9em; /* Reduce font size */
    line-height: 1.4; /* Adjust line height */
    vertical-align: top; /* Align top might look better when wrapping */
  }

  /* Allow columns to resize - remove fixed widths */
  .donation-table th:first-child,       /* S.No Header */
  .donation-table tbody td:first-child,  /* S.No Data */
  .donation-table th:last-child,        /* Amount Header */
  .donation-table tbody td:last-child {
    /* Amount Data */
    width: auto; /* Let browser determine width */
    text-align: left; /* Left-align S.No & Amount on mobile */
  }

  .donation-table th {
    white-space: normal; /* Allow headers to wrap if needed */
  }

  .donation-table tfoot td {
    font-size: 0.9em;
    padding: 10px;
  }
}

/* Responsive adjustments for Donation Table */
@media (max-width: 600px) {
  /* Target smaller screens */
  .donation-table {
    /* min-width: 500px; */ /* REMOVE or comment out min-width */
    display: table; /* Ensure table layout is still attempted */
    width: 100%; /* Try to use full width */
  }

  .donation-table th,
  .donation-table tbody td {
    padding: 8px 6px; /* Reduce padding */
    font-size: 0.8em; /* Reduce font size */
    line-height: 1.4; /* Adjust line height */
    vertical-align: top; /* Align top might look better when wrapping */
  }

  /* Allow columns to resize - remove fixed widths */
  .donation-table th:first-child,       /* S.No Header */
  .donation-table tbody td:first-child,  /* S.No Data */
  .donation-table th:last-child,        /* Amount Header */
  .donation-table tbody td:last-child {
    /* Amount Data */
    width: auto; /* Let browser determine width */
    text-align: left; /* Left-align S.No & Amount on mobile */
  }

  .donation-table th {
    white-space: normal; /* Allow headers to wrap if needed */
  }

  .donation-table tfoot td {
    font-size: 0.9em;
    padding: 10px;
  }
}
/* ============================ */

/* === Gallery Page Styles === */

.gallery-content h1,
.gallery-content .event-title {
  text-align: center;
  color: #920a22;
  margin-bottom: 15px;
}

.gallery-content h1 {
  margin-top: 40px;
  margin-bottom: 40px;
}

.gallery-event {
  margin-bottom: 50px; /* Space between event sections */
}

.event-title {
  font-size: 1.8em;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee; /* Separator line below title */
  display: inline-block; /* Allow border to fit content */
  position: relative; /* For centering with transform */
  left: 50%;
  transform: translateX(-50%);
}

.image-grid {
  display: grid;
  /* Responsive columns: min 180px, max 1fr */
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px; /* Gap between grid items */
}

.gallery-item {
  display: block;
  border-radius: 8px;
  overflow: hidden; /* Ensure image scaling doesn't break radius */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff; /* Background for image area */
  line-height: 0; /* Prevent extra space below image */
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  /* aspect-ratio: 1 / 1; */ /* Optional: Uncomment for square thumbnails */
  /* object-fit: cover; */ /* Optional: Use with aspect-ratio */
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.gallery-item:hover img {
  transform: scale(1.05); /* Slight zoom on image hover */
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
  .event-title {
    font-size: 1.6em;
  }
  .image-grid {
    gap: 15px;
    /* Adjust minmax if needed for smaller screens */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 480px) {
  .event-title {
    font-size: 1.4em;
  }
  .image-grid {
    gap: 10px;
    /* Adjust minmax if needed for very small screens */
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* ============================ */

/* Optional: Style Captcha Area */
.captcha-group label {
  display: flex; /* Align items nicely */
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping */
}
.captcha-group span {
  margin-right: 5px; /* Space around numbers/symbols */
  font-weight: bold;
  font-size: 1.1em;
}
.captcha-input {
  width: 80px !important; /* Make captcha input smaller */
  padding: 10px 10px !important;
  margin-left: 5px;
  vertical-align: middle;
}
#captcha-answer {
  /* Keep hidden field hidden */
  display: none;
}
#form-status {
  min-height: 1.5em; /* Reserve space for message */
}

/* === Program Schedule Section Styles === */
.program-schedule-section {
  background-color: transparent; /* Light background for contrast */
  padding: 50px 0; /* Vertical padding, no horizontal */
  margin: 0; /* Reset margin, sits between other sections */
  box-sizing: border-box;
}

.schedule-content-wrapper {
  max-width: 1100px; /* Max width of content */
  margin: 0 auto; /* Center the wrapper */
  padding: 0 20px; /* Padding inside wrapper */
  box-sizing: border-box;
}

.program-schedule-section .section-title {
  text-align: center;
  color: #920a22; /* Use site's primary color */
  font-size: 2.2em; /* Adjust size */
  margin-bottom: 40px;
  /* Optional: Add border or other styling */
}

.schedule-container {
  display: flex; /* Use flexbox to layout days */
  flex-wrap: wrap; /* Allow days to wrap on smaller screens */
  justify-content: center; /* Center days if they wrap */
  gap: 30px; /* Gap between day columns/rows */
}

.schedule-day {
  background-color: #ffffff;
  padding: 25px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  /* flex-basis: calc(50% - 15px); */ /* Uncomment for two columns side-by-side */
  flex-basis: 100%; /* Default to stacked full width */
  max-width: 550px; /* Max width for readability when stacked */
  box-sizing: border-box;
  margin-bottom: 20px; /* Add space when stacked */
}

/* Optional: Enable side-by-side layout on larger screens */
@media (min-width: 992px) {
  .schedule-day {
    flex-basis: calc(50% - 15px); /* 2 columns, accounting for 30px gap */
    margin-bottom: 0;
  }
}

.schedule-day h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5em;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  text-align: center;
}

.schedule-day ul {
  list-style: none; /* Remove default bullets */
  padding-left: 0;
  margin: 0;
}

.schedule-day li {
  padding: 10px 0;
  margin-bottom: 5px;
  border-bottom: 1px dotted #e0e0e0; /* Dotted line between items */
  line-height: 1.6;
  color: #444;
  font-size: 1.05em;
}

.schedule-day li:last-child {
  border-bottom: none; /* Remove border from last item */
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Example: Style time differently (if formatted like 'Time - Event') */
/*
.schedule-day li::before {
    content: attr(data-time); // Requires adding data-time attribute to li
    display: inline-block;
    width: 80px; // Adjust width
    font-weight: bold;
    color: #920a22;
    margin-right: 10px;
}
*/

/* Responsive adjustments */
@media (max-width: 768px) {
  .program-schedule-section .section-title {
    font-size: 1.8em;
  }
  .schedule-day {
    padding: 20px;
  }
}

/* ==================================== */
/* === Live Stream Popup Styles === */
#live-popup {
  position: fixed;
  top: 50%;
  right: 0;
  width: 300px;
  max-width: 90vw;
  background-color: #ffffff;
  border-radius: 10px 0 0 10px;
  box-shadow: -6px 0px 20px rgba(0, 0, 0, 0.25);
  z-index: 1500;
  box-sizing: border-box;

  /* Add max-height and prepare for inner scroll */
  max-height: 90vh; /* Limit height to 90% of viewport height */
  overflow: hidden;

  /* Initial state (Off-screen & hidden) */
  transform: translate(100%, -50%);
  visibility: hidden;
  opacity: 0;

  /* Transitions (remain the same) */
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.5s ease-out, visibility 0s linear 0.7s;
}

#live-popup.visible {
  /* Visible state (remains the same) */
  transform: translate(0, -50%);
  visibility: visible;
  opacity: 1;
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.5s ease-out 0.1s, visibility 0s linear 0s;
}

.close-popup {
  /* Styles remain the same */
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 2.5em;
  font-weight: 300;
  color: #777;
  cursor: pointer;
  line-height: 0.8;
  padding: 5px;
  z-index: 1501;
}
.close-popup:hover {
  color: #000;
}

.popup-content {
  padding: 25px;
  padding-top: 45px; /* Keep space for close button */
}

.popup-poster {
  display: block;
  /* Change width to max-width */
  max-width: 100%; /* Allow image to shrink horizontally if needed */
  height: auto; /* Maintain aspect ratio */
  /* ADD max-height constraint relative to viewport */
  max-height: 55vh; /* Max 55% of viewport height - ADJUST AS NEEDED */
  object-fit: contain; /* Ensure entire image fits within bounds without distortion */
  margin: 0 auto 20px auto; /* Center image horizontally, keep bottom margin */
  border-radius: 5px;
}

.popup-links {
  /* Styles remain the same */
  text-align: center;
}

.popup-links p {
  color: #333;
}

.popup-link {
  display: inline-block;
  margin: 8px 5px;
  padding: 10px 25px;
  background-color: #920a22; /* Use site's primary color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.95em;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.popup-link:hover {
  background-color: #7a081c; /* Darker shade */
  color: #fff;
  transform: scale(1.03);
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  #live-popup {
    width: 90vw; /* Use viewport width */
    max-width: none; /* Remove fixed max-width */
    max-height: 95vh; /* Can allow slightly more height on mobile */
  }
  .popup-content {
    padding: 15px;
    padding-top: 40px;
  }

  .popup-poster {
    max-height: 60vh; /* Allow slightly more relative height on mobile */
  }

  .popup-link {
    display: block; /* Stack links vertically */
    margin: 10px auto;
    padding: 12px 20px;
    font-size: 1em;
  }
  .close-popup {
    font-size: 2.2em;
    top: 5px;
    right: 8px;
  }
}
/* ============================ */
