/* ===============================
   THEME VARIABLES
================================= */
:root {
    --primary-blue: #004b87;    /* Deep Blue from logo */
    --accent-orange: #ff6b00;   /* Bright Orange from logo */
    --text-dark: #222;
    --text-light: #ffffff;
    --nav-height: 80px;   /* navbar height */
}



/* ===============================
   COMMON STYLES
================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    color: var(--text-dark);
    background-color: var(--text-light);    
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Buttons - Global */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-orange);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    background: var(--primary-blue);
    color: white;
}

section {
    padding: 80px 0;
}

section, header {
    scroll-margin-top: var(--nav-height);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    color: var(--text-dark);
    position: relative;
}

.section-child{
    text-align: center;
    margin-bottom: 50px;
    font-size: 24px;
    color: var(--text-dark);
    position: relative;
}

.section-child:after,
.section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--accent-orange);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}


header {
    background: transparent;
    /* background: #111; */
    /* padding: 50px; */
    position: relative;
    z-index: 1000;
    width: 100%;
    transition: all 0.3s ease;
}
/*     
    
     */
nav {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1001;
    transition: all 0.3s ease;
    background: transparent;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.9);
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.logo {
    display: inline-block;
    height: 60px;
}

.logo img {
    height: 100%;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

.small-logo {
    height: 40px !important;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: rgb(0, 158, 214);
    /* color: white; */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-orange);
}


.menu-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: rgb(0, 158, 214);
    /* color: white; */
    cursor: pointer;
}

/* Dropdown */
.nav-links .dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    list-style: none;
    padding: 10px 0;
    min-width: 250px;
    border-radius: 5px;
    z-index: 1000;
}

.dropdown-menu li {
    padding: 5px 20px;
}

.dropdown-menu a {
    color: white;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    color: var(--accent-orange);
}


.dropdown:hover .dropdown-menu {
    display: block;
}


.hero {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: white;
    overflow: hidden;
    margin-top: 0;
    padding-top: 80px;  /* Prevent navbar cut */
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide.active {
    opacity: 1;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6); /* dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;   
}

.hero-content h1 {
    font-size: 60px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}


.announcement-banner {
    width: 100%;
    background: #ffeb3b; /* Yellow */
    color: #000;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5; /* keeps text snug */
    padding: 4px 0;   /* thinner strip */
    margin: 0;        /* remove gaps */
    overflow: hidden;
    position: relative;
    z-index: 1100; /* stays above hero */
}

.announcement-text {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%; /* start outside */
    animation: scroll-left 18s linear infinite;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    text-align: justify;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-video {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.about-video iframe,
.about-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.event-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-10px);
}

.event-image {
    height: auto; /* adjust as per your design */
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #f9f9f9; /* fallback bg */
}

.event-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* keeps proportions */
    transition: transform 0.5s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.1);
}

.event-info {
    padding: 20px;
}

.event-info h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.event-info p {
    margin-bottom: 15px;
    color: #777;
}


.event-info h3 {
    margin-bottom: 10px;
    color: var(--primary-blue);
    font-size: 22px;
}

.event-info .tagline {
    font-size: 16px;
    font-style: italic;
    margin-bottom: 15px;
    color: #444;
}

.event-features {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: left;
}

.event-features li {
    margin: 5px 0;
    padding-left: 25px;
    position: relative;
    font-size: 14px;
    color: #555;
}

.event-features li::before {
    content: "✔";
    color: var(--accent-orange);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.countdown-section {
    background: linear-gradient(rgba(0, 75, 135, 0.85), rgba(0, 43, 54, 0.85)), 
                url('assets/images/countdown-bg.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    color: white;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.countdown-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 30px 20px;
    border-radius: 10px;
    min-width: 120px;
    backdrop-filter: blur(5px);
}

.countdown-box h3 {
    font-size: 50px;
    margin-bottom: 10px;
}

.countdown-box p {
    font-size: 16px;
}


.gallery-wrapper{
  position: relative;
  overflow: hidden;      /* hide off-screen slides */  
}

.gallery-container{
  display: flex;         /* horizontal track */
  align-items: stretch;
  gap: 16px;             /* spacing between slides */
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.gallery-item{
  flex: 0 0 auto;        /* width set from JS for 3-up / 1-up */
  height: 250px;
  border-radius: 10px;
  overflow: hidden;
}

.gallery-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* nav buttons */
.gallery-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 22px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  z-index: 2;
  user-select: none;
}
.gallery-btn:hover{ background: rgba(0,0,0,0.75); }
.gallery-btn.prev{ left: 8px; }
.gallery-btn.next{ right: 8px; }
.gallery-item:hover img {
  transform: scale(1.1);
}


.gallery-grid {
    display: grid;
    /* grid-template-columns: repeat(3, 1fr); /* 3 columns */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    justify-items: center;
    margin-top: 20px;
}

.gallery-grid-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8%;
    cursor: pointer;
    transition: transform 0.3s;
    border: 2px solid var(--accent-orange);
}

.gallery-grid-item img:hover {
    transform: scale(1.05);
}

/* Lightbox Overlay */
.lightbox {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0; 
    top: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center; 
    align-items: center;
}

/* Lightbox Image */
.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

/* Close Button */
.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Prev/Next Buttons */
.lightbox .prev,
.lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }

.lightbox .prev:hover,
.lightbox .next:hover {
    color: #1E90FF; /* highlight on hover */
}


.register-section {
    background: var(--primary-blue);
    color: white;
    text-align: center;
}

.register-section .btn {
    margin-top: 30px;
    background: var(--accent-orange);
}

.register-section .btn:hover {
    background: var(--primary-blue);
    color: white;
}


footer {
    background: #111;
    color: white;
    padding: 50px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 20px;
    position: relative;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background: var(--accent-orange);
    bottom: -10px;
    left: 0;
}

.footer-column p {
    margin-bottom: 15px;
    color: #bbb;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-orange);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #bbb;
}

/* ===============================
   POPUP STYLES (Udupi Theme) - Mobile Optimized
================================= */
.popup-overlay {
  position: fixed; /* fixed for desktop and modern mobile */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
  padding: 15px; /* prevent content touching edges on small screens */
  box-sizing: border-box;
  overflow-y: auto; /* scroll if content is taller than screen */
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

/* Popup Box */
.popup-content {
  background: #fff;
  color: var(--text-dark);
  width: 90%;               /* slightly wider for mobile */
  max-width: 900px;          /* desktop max width */
  max-height: 90vh;          /* prevent full-screen overflow */
  padding: 25px 30px;        /* reduced padding for smaller screens */
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  position: relative;
  text-align: left;
  overflow-y: auto;
  border-top: 5px solid var(--accent-orange);
  animation: fadeIn 0.3s ease;
}

/* Title */
.popup-content h2 {
  color: var(--primary-blue);
  margin-bottom: 20px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
}

/* Terms Scrollable Box */
.terms-text {
  max-height: 60vh;
  overflow-y: auto;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  padding: 15px 20px 15px 15px; /* adjust padding */
  border-radius: 6px;
  background: #fdfdfd;
  line-height: 1.7;
  font-size: 14px;
  color: #333;
}

.terms-text h3 {
  margin-top: 20px;
  color: var(--primary-blue);
  font-weight: 600;
}

.terms-text ul {
  margin: 10px 0 10px 25px;
  list-style: disc;
}

.terms-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.terms-text th,
.terms-text td {
  border: 1px solid #ccc;
  padding: 8px 10px;
  text-align: left;
}

.terms-text th {
  background: #f5f5f5;
  font-weight: 600;
}

/* Agree Section */
.agree-section {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

/* Buttons */
.popup-buttons {
  text-align: center;
}

.popup-buttons .btn {
  min-width: 100px;
  padding: 8px 20px;
}

.cancel-btn {
  background: #555;
  margin-left: 10px;
}

.cancel-btn:hover {
  background: #333;
}

/* Custom Scrollbar for Terms */
.terms-text::-webkit-scrollbar {
  width: 6px;
}
.terms-text::-webkit-scrollbar-thumb {
  background: var(--primary-blue);
  border-radius: 3px;
}

/* Smooth popup fade-in */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ===============================
   Mobile Safari Fix
================================= */
@supports (-webkit-overflow-scrolling: touch) {
  .popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
  }
}

/* ===============================
   RESPONSIVE
================================= */


@media (max-width: 768px) {
    .hero h1 {
        font-size: 40px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .countdown-container {
        flex-wrap: wrap;
    }
    
    .gallery-item{ flex: 0 0 100%; }
    
    .gallery-btn.prev {
        left: 10px; /* bring inside on small screens */
    }

    .gallery-btn.next {
        right: 10px;
    }

    /*Mobile styles hamburger menu*/
    .nav-links {
        display: none; /* hidden by default */
        flex-direction: column;
        background: rgba(0,0,0,0.95);
        position: absolute;
        top: 70px; /* below navbar */
        right: 0;
        width: 250px;
        border-radius: 5px;
        padding: 15px 0;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .nav-links.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    /* Dropdown inside mobile */
    .dropdown-menu {
        position: static;
        background: none;
        padding: 0;
        border-radius: 0;
        text-align: center;
    }

    .dropdown:hover .dropdown-menu {
        display: none; /* disable hover on mobile */
    }

    .dropdown.open .dropdown-menu {
        display: block; /* show only when clicked */
    }
}
