/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Teko:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

/* CSS Variables for Theming */
:root {
  --bg-color: #F5EFE6;
  --text-color: #222222;
  --header-color: #C92C39;
  --accent-color: #E5A500;
  --accent-rgb: 229, 165, 0;
  --secondary-color: #2A3A5B;
  --white-color: #FFFFFF;
  --border-color: #222222;
}

/* Theme Variations */
body.theme-morning {
  --bg-color: #FFF8E7;
  --text-color: #2A3A5B;
  --header-color: #E5A500;
  --accent-color: #C92C39;
  --accent-rgb: 201, 44, 57;
}

body.theme-afternoon {
  --bg-color: #F5EFE6;
  --text-color: #222222;
  --header-color: #C92C39;
  --accent-color: #E5A500;
  --accent-rgb: 229, 165, 0;
}

body.theme-evening {
  --bg-color: #FADCB9;
  --text-color: #2A3A5B;
  --header-color: #C92C39;
  --accent-color: #E5A500;
  --accent-rgb: 229, 165, 0;
  --border-color: #2A3A5B;
}

body.theme-night {
  --bg-color: #2A3A5B;
  --text-color: #F5EFE6;
  --header-color: #F5EFE6;
  --accent-color: #E5A500;
  --white-color: #2A3A5B;
  --border-color: #F5EFE6;
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Lora', serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(248, 242, 233, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(242, 235, 216, 0.3) 0%, transparent 50%);
    color: var(--text-color);
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Teko', sans-serif;
    font-weight: 500;
    transition: color 0.5s ease;
}

h1 {
    color: var(--header-color);
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: var(--text-color);
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Main Container - Flexbox Layout */
main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    isolation: isolate; /* Prevent transform stacking issues */
}

/* Section General Styles */
section {
    position: relative;
    z-index: 1;
}

/* Dynamic hover effects for sections */
section:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

/* Navigation Styles */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    border-bottom: 3px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-odia {
    font-family: 'Teko', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--header-color);
    line-height: 1;
}

.logo-english {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    color: var(--text-color);
    font-style: italic;
    line-height: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--text-color);
    font-family: 'Teko', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: var(--accent-color);
    color: var(--white-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Page Content Layout */
.page-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.hero-section {
    background: linear-gradient(135deg, var(--bg-color) 0%, rgba(var(--accent-rgb), 0.1) 100%);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 3px solid var(--border-color);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--header-color);
}

.hero-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-style: italic;
}

.content-section {
    padding: 60px 20px;
    min-height: 50vh; /* Ensure minimum height */
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%; /* Ensure full width within max-width */
}

/* Homepage Navigation Cards */
.homepage-nav {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05) 0%, var(--bg-color) 100%);
}

.nav-cards-container h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--header-color);
}

.homepage-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-card {
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 0px var(--border-color);
    text-align: center;
}

.nav-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 8px 8px 15px rgba(0,0,0,0.2);
    background-color: var(--accent-color);
    color: var(--white-color);
}

.nav-card .card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.nav-card h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--header-color);
}

.nav-card:hover h3 {
    color: var(--white-color);
}

.nav-card h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-style: italic;
}

.nav-card:hover h4 {
    color: var(--white-color);
}

.nav-card p {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Homepage Welcome Section */
.welcome-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, var(--bg-color) 50%, rgba(var(--accent-rgb), 0.05) 100%);
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
    margin-top: 40px;
}

.welcome-text {
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 15px;
    padding: 35px;
    box-shadow: 5px 5px 0px var(--border-color);
    transition: all 0.3s ease;
}

.welcome-text:hover {
    transform: translateY(-3px);
    box-shadow: 8px 8px 15px rgba(0,0,0,0.1);
}

.welcome-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-color);
}

.welcome-text .odia-text {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-style: italic;
    background-color: rgba(var(--accent-rgb), 0.05);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    margin: 25px 0;
}

.quick-facts {
    background-color: rgba(var(--accent-rgb), 0.1);
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    border: 2px solid var(--accent-color);
}

.quick-facts h3 {
    font-size: 1.4rem;
    color: var(--header-color);
    margin-bottom: 15px;
    text-align: center;
}

.quick-facts ul {
    list-style: none;
    padding: 0;
}

.quick-facts li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.3);
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-facts li:last-child {
    border-bottom: none;
}

.welcome-highlights {
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 15px;
    padding: 35px;
    box-shadow: 5px 5px 0px var(--border-color);
    transition: all 0.3s ease;
}

.welcome-highlights:hover {
    transform: translateY(-3px);
    box-shadow: 8px 8px 15px rgba(0,0,0,0.1);
}

.welcome-highlights h3 {
    font-size: 1.6rem;
    color: var(--header-color);
    margin-bottom: 25px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
}

.welcome-highlights .highlight-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background-color: rgba(var(--accent-rgb), 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-color);
}

.welcome-highlights .highlight-item:hover {
    background-color: rgba(var(--accent-rgb), 0.15);
    transform: translateX(10px);
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
}

.welcome-highlights .highlight-item:last-child {
    margin-bottom: 0;
}

.welcome-highlights .highlight-icon {
    font-size: 2.5rem;
    min-width: 60px;
    text-align: center;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.welcome-highlights .highlight-item div h4 {
    font-size: 1.2rem;
    color: var(--header-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.welcome-highlights .highlight-item div p {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
}

.welcome-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--header-color);
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Responsive Design for Welcome Section */
@media (max-width: 968px) {
    .welcome-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .welcome-text,
    .welcome-highlights {
        padding: 25px;
    }
    
    .welcome-content h2 {
        font-size: 2rem;
    }
    
    .welcome-highlights .highlight-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .quick-facts li {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

/* Call-to-Action Buttons */
.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white-color);
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: 'Teko', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    box-shadow: 3px 3px 0px var(--border-color);
    transition: all 0.3s ease;
    margin: 5px;
}

.cta-button:hover {
    background-color: var(--header-color);
    transform: translateY(-2px);
    box-shadow: 5px 5px 10px rgba(0,0,0,0.2);
}

.cta-button.secondary {
    background-color: var(--white-color);
    color: var(--text-color);
}

.cta-button.secondary:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.action-buttons {
    text-align: center;
    margin-top: 25px;
}

/* Community Action Section */
.community-action {
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, var(--bg-color) 100%);
}

.action-card {
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 5px 5px 0px var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.action-card h3 {
    font-size: 2rem;
    color: var(--header-color);
    margin-bottom: 20px;
}

.action-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Community Page Lists */
.announcement-list,
.event-list,
.group-list,
.achievement-list,
.service-list {
    margin-top: 15px;
}

.announcement-item,
.group-item,
.service-item {
    padding: 15px;
    margin-bottom: 15px;
    background-color: rgba(var(--accent-rgb), 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.announcement-item:hover,
.group-item:hover,
.service-item:hover {
    background-color: rgba(var(--accent-rgb), 0.1);
    transform: translateX(5px);
}

.announcement-item:last-child,
.group-item:last-child,
.service-item:last-child {
    margin-bottom: 0;
}

.announcement-date {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.announcement-item h5,
.group-item h5,
.service-item h5 {
    font-size: 1.1rem;
    color: var(--header-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.event-list {
    margin-top: 15px;
}

.event-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: rgba(var(--accent-rgb), 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.event-item:hover {
    background-color: rgba(var(--accent-rgb), 0.1);
    transform: translateX(5px);
}

.event-item:last-child {
    margin-bottom: 0;
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    background-color: var(--accent-color);
    color: var(--white-color);
    border-radius: 8px;
    padding: 10px;
    flex-shrink: 0;
}

.event-date .day {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.event-date .month {
    font-size: 0.8rem;
    font-weight: 500;
}

.event-details {
    flex: 1;
}

.event-details h5 {
    font-size: 1.1rem;
    color: var(--header-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.event-details p {
    margin-bottom: 5px;
    line-height: 1.5;
}

.event-time {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-style: italic;
}

.group-contact,
.achievement-year {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-style: italic;
    margin-top: 8px;
    display: block;
}

.achievement-item {
    padding: 20px;
    margin-bottom: 15px;
    background-color: rgba(var(--accent-rgb), 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
    text-align: center;
}

.achievement-item:hover {
    background-color: rgba(var(--accent-rgb), 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.achievement-item:last-child {
    margin-bottom: 0;
}

.achievement-icon {
    font-size: 3rem;
    display: block;
    margin: 0 auto 15px auto;
}

.achievement-details {
    width: 100%;
}

.achievement-details h5 {
    font-size: 1.2rem;
    color: var(--header-color);
    margin: 0 0 10px 0;
    font-weight: 600;
    line-height: 1.3;
}

.achievement-details p {
    line-height: 1.5;
    margin: 0 0 12px 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.achievement-year {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    font-weight: 600;
}

.achievement-details p {
    line-height: 1.5;
    margin-bottom: 5px;
}

.service-item {
    padding: 20px;
    margin-bottom: 15px;
    background-color: rgba(var(--accent-rgb), 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
    text-align: center;
}

.service-item:hover {
    background-color: rgba(var(--accent-rgb), 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.service-item:last-child {
    margin-bottom: 0;
}

.service-icon {
    font-size: 2.5rem;
    display: block;
    margin: 0 auto 15px auto;
}

.service-details {
    width: 100%;
}

.service-details h5 {
    font-size: 1.2rem;
    color: var(--header-color);
    margin: 0 0 10px 0;
    font-weight: 600;
    line-height: 1.3;
}

.service-details p {
    line-height: 1.5;
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background-color: rgba(var(--accent-rgb), 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background-color: rgba(var(--accent-rgb), 0.2);
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--header-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.3;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: left 0.3s ease;
        border-right: 3px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .nav-menu li a {
        font-size: 1.3rem;
        padding: 15px 30px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content h2 {
        font-size: 1.2rem;
    }

    .nav-cards-container h2 {
        font-size: 2rem;
    }

    .homepage-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Exclude living-map from general section hover effects */
#living-map:hover {
    transform: none;
}

/* Floating animation for interactive elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 8px 8px 0px var(--accent-color); }
    50% { box-shadow: 8px 8px 20px var(--accent-color), 0 0 30px rgba(var(--accent-rgb), 0.3); }
}

/* Entrance Portal Section */
#entrance-portal {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-color) 0%, rgba(var(--accent-rgb), 0.05) 50%, var(--bg-color) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    border: 5px solid var(--border-color);
    margin: 10px;
    padding: 2rem;
    box-shadow: 8px 8px 0px var(--accent-color);
    transition: all 0.5s ease;
    animation: glow 3s ease-in-out infinite;
    overflow: hidden;
}

#entrance-portal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

#entrance-portal > * {
    position: relative;
    z-index: 1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#entrance-portal h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--header-color);
    text-shadow: 3px 3px 0px var(--accent-color), 6px 6px 10px rgba(0,0,0,0.1);
    font-weight: 700;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 3px 3px 0px var(--accent-color), 6px 6px 10px rgba(0,0,0,0.1); }
    100% { text-shadow: 3px 3px 0px var(--accent-color), 6px 6px 20px rgba(var(--accent-rgb), 0.4); }
}

#entrance-portal p {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    font-style: italic;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.entrance-description {
    font-size: 1.2rem !important;
    margin-top: 2rem;
    color: var(--text-color) !important;
    font-style: normal !important;
    line-height: 1.6;
    background-color: rgba(var(--accent-rgb), 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
    backdrop-filter: blur(10px);
}

#entrance-seal {
    width: 200px;
    height: 200px;
    background-color: var(--white-color);
    border: 4px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 6px 6px 0px var(--accent-color);
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.seal-content {
    text-align: center;
    line-height: 1.2;
}

.seal-odia {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--header-color);
    margin-bottom: 0.5rem;
}

.seal-english {
    display: block;
    font-size: 1rem;
    color: var(--text-color);
    font-family: 'Teko', sans-serif;
}

.entrance-description {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-color);
    font-style: normal;
    font-weight: 400;
}

/* Living Map Section - New Grid Layout */
#living-map {
    min-height: 100vh;
    background-color: transparent;
    padding: 3rem 2rem;
    border: 5px solid var(--border-color);
    margin: 10px;
    box-shadow: 8px 8px 0px var(--accent-color);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Landmark Ring Container - Relative Positioning */
.landmark-ring {
    position: relative;
    width: 600px;
    height: 600px;
    background-color: var(--white-color);
    border: 4px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 6px 6px 0px var(--accent-color);
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Village Square - Central Element - New Design */
#village-square {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 120px;
    background: linear-gradient(135deg, var(--header-color), var(--accent-color));
    border: 3px solid var(--border-color);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 0 0 3px var(--white-color);
    cursor: pointer;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

#village-square::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-color), var(--header-color), var(--accent-color));
    border-radius: 15px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

#village-square::after {
    content: '🏛️';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
    opacity: 0.3;
    z-index: 1;
}

#village-square:hover {
    transform: translate(-50%, -50%) translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25), 0 0 0 5px var(--white-color);
}

#village-square:active {
    transform: translate(-50%, -50%) translateY(-2px) scale(1.02);
}

#village-square h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

#village-square .square-subtitle {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.9);
    margin-top: 4px;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

@keyframes borderGlow {
    0%, 100% { 
        background: linear-gradient(45deg, var(--accent-color), var(--header-color), var(--accent-color));
        opacity: 0.8;
    }
    50% { 
        background: linear-gradient(45deg, var(--header-color), var(--accent-color), var(--header-color));
        opacity: 1;
    }
}

/* Landmark Buttons - Absolute Positioning with Pattachitra Style */
.landmark-ring button {
    position: absolute;
    width: 130px;
    height: 90px;
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Lora', serif;
    font-weight: 500;
    text-align: center;
    padding: 0.5rem;
    color: var(--text-color);
    box-shadow: 5px 5px 0px var(--accent-color);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.landmark-ring button:nth-child(odd) {
    animation-delay: 0.5s;
}

.landmark-ring button:nth-child(even) {
    animation-delay: 1s;
}

.landmark-ring button:hover {
    transform: translate(2px, 2px) scale(1.1);
    box-shadow: 3px 3px 15px var(--accent-color);
    background-color: rgba(248, 242, 233, 0.9);
    animation: pulse 0.6s ease-in-out infinite;
}

/* Circular Positioning using data-position attributes */
.landmark-ring button[data-position="north"] {
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
}

.landmark-ring button[data-position="northeast"] {
    top: 55px;
    right: -65px;
}

.landmark-ring button[data-position="east"] {
    top: 50%;
    right: -65px;
    transform: translateY(-50%);
}

.landmark-ring button[data-position="southeast"] {
    bottom: 55px;
    right: -65px;
}

.landmark-ring button[data-position="south"] {
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
}

.landmark-ring button[data-position="southwest"] {
    bottom: 55px;
    left: -65px;
}

.landmark-ring button[data-position="west"] {
    top: 50%;
    left: -65px;
    transform: translateY(-50%);
}

.landmark-ring button[data-position="northwest"] {
    top: 55px;
    left: -65px;
}

.map-title {
    font-family: 'Teko', sans-serif;
    font-size: 2.5rem;
    color: var(--header-color);
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0px var(--accent-color);
}

/* Village Grid Layout */
.village-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 600px;
    width: 100%;
    aspect-ratio: 1;
}

/* Landmark Cards */
.landmark-card {
    background: linear-gradient(135deg, var(--white-color), var(--bg-color));
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 4px 4px 0px var(--accent-color);
    font-family: 'Lora', serif;
    position: relative;
    overflow: hidden;
}

.landmark-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.landmark-card:hover::before {
    left: 100%;
}

.landmark-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 6px 6px 15px rgba(0,0,0,0.2);
    border-color: var(--header-color);
}

.landmark-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.landmark-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
}

/* Central Village Square */
.village-square-new {
    background: linear-gradient(135deg, var(--header-color), var(--accent-color));
    border: 4px solid var(--border-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.village-square-new::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(var(--accent-color), var(--header-color), var(--accent-color));
    animation: rotate 8s linear infinite;
    opacity: 0.3;
    z-index: 1;
}

.village-square-new:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.square-content {
    position: relative;
    z-index: 2;
    color: var(--white-color);
}

.square-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.square-content h3 {
    font-family: 'Teko', sans-serif;
    font-size: 1.3rem;
    margin: 0 0 0.25rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.square-content p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Story Weaver Section */
#story-weaver {
    min-height: 50vh;
    background-color: transparent;
    padding: 2rem;
    border: 5px solid var(--border-color);
    margin: 10px;
    box-shadow: 8px 8px 0px var(--accent-color);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.story-content h2,
.bulletin-content h2 {
    font-family: 'Teko', sans-serif;
    font-size: 2.5rem;
    color: var(--header-color);
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0px var(--accent-color);
}

.section-subtitle {
    text-align: center;
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.story-card {
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 5px 5px 0px var(--accent-color);
    transition: all 0.3s ease;
}

.story-card:hover {
    transform: translateY(-3px);
    box-shadow: 7px 7px 0px var(--accent-color);
}

.story-card h3 {
    font-family: 'Teko', sans-serif;
    font-size: 1.4rem;
    color: var(--header-color);
    margin-bottom: 0.5rem;
}

.story-meta {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 1rem;
}

.story-card p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.odia-text {
    background-color: rgba(229, 165, 0, 0.1);
    padding: 0.8rem;
    border-left: 4px solid var(--accent-color);
    font-style: italic;
    border-radius: 4px;
    margin-top: 0.5rem !important;
}

/* Community Bulletin Section */
#community-bulletin {
    min-height: 50vh;
    background-color: transparent;
    padding: 2rem;
    border: 5px solid var(--border-color);
    margin: 10px;
    box-shadow: 8px 8px 0px var(--accent-color);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.bulletin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.bulletin-board,
.upcoming-events,
.contact-info {
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 5px 5px 0px var(--accent-color);
    transition: all 0.3s ease;
}

.bulletin-board h3,
.upcoming-events h3,
.contact-info h3 {
    font-family: 'Teko', sans-serif;
    font-size: 1.4rem;
    color: var(--header-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.bulletin-list {
    list-style: none;
    padding: 0;
}

.bulletin-list li {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background-color: rgba(245, 239, 230, 0.3);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.date {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 500;
    display: block;
    margin-bottom: 0.3rem;
}

.event-card {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: rgba(201, 44, 57, 0.1);
    border-radius: 8px;
    border: 2px solid rgba(201, 44, 57, 0.2);
}

.event-card h4 {
    font-family: 'Teko', sans-serif;
    font-size: 1.2rem;
    color: var(--header-color);
    margin-bottom: 0.3rem;
}

.event-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.contact-list p {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--bg-color);
    padding: 2rem;
    text-align: center;
    margin: 10px;
    border: 5px solid var(--border-color);
    box-shadow: 8px 8px 0px var(--accent-color);
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.village-creed,
.village-motto,
.footer-info {
    padding: 1rem;
}

.village-creed h4,
.village-motto h4 {
    font-family: 'Teko', sans-serif;
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3);
}

footer .village-creed p,
footer .village-motto p,
footer .footer-info p {
    font-size: 0.95rem;
    font-family: 'Lora', serif;
    color: var(--bg-color);
    transition: color 0.5s ease;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.footer-info {
    grid-column: 1 / -1;
    text-align: center;
    border-top: 2px solid var(--accent-color);
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Sound Toggle Button */
#sound-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--accent-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 3px 3px 0px var(--header-color);
    transition: all 0.3s ease;
}

#sound-toggle:hover {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px var(--header-color);
}

/* Modal Styles */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9); /* Start slightly smaller */
  }
  to {
    opacity: 1;
    transform: scale(1); /* End at full size */
  }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(34, 34, 34, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 1rem;
}

.modal-content {
    background-color: var(--bg-color);
    border: 4px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 8px 8px 0px var(--accent-color);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 3px solid var(--border-color);
    background-color: var(--white-color);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.modal-title {
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--header-color);
    margin: 0;
    text-shadow: 1px 1px 0px var(--accent-color);
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.modal-close {
    background-color: var(--header-color);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    color: var(--white-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 3px 3px 0px var(--accent-color);
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px var(--accent-color);
    opacity: 0.8;
}

.modal-body {
    padding: 1.5rem;
}

.modal-description {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-style: italic;
    transition: color 0.5s ease;
}

.modal-facts-title {
    font-family: 'Teko', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    transition: color 0.5s ease, border-color 0.5s ease;
}

.modal-facts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-facts-list li {
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    transition: color 0.5s ease;
}

.modal-facts-list li:before {
    content: "▸";
    color: var(--header-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    transition: color 0.5s ease;
}

/* Photo Gallery Styles */
.modal-gallery-title {
    font-family: 'Teko', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    transition: color 0.5s ease, border-color 0.5s ease;
}

.modal-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 1rem;
    justify-content: space-between;
}

.modal-gallery-image {
    flex: 1;
    min-width: 150px;
    max-width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid var(--border-color);
    box-shadow: 4px 4px 0px var(--accent-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-gallery-image:hover {
    transform: translateY(-3px);
    box-shadow: 6px 6px 0px var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile responsive sound button */
    .top-sound-control {
        top: 15px;
        right: 15px;
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    #entrance-portal h1 {
        font-size: 2.5rem;
    }
    
    #entrance-portal p {
        font-size: 1.4rem;
    }
    
    .map-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .village-grid {
        max-width: 450px;
        gap: 1rem;
    }
    
    .landmark-card {
        padding: 0.8rem;
    }
    
    .landmark-icon {
        font-size: 1.5rem;
    }
    
    .landmark-name {
        font-size: 0.8rem;
    }
    
    .square-icon {
        font-size: 2rem;
    }
    
    .square-content h3 {
        font-size: 1.1rem;
    }
    
    .square-content p {
        font-size: 0.7rem;
    }
    
    .landmark-ring {
        width: 400px;
        height: 400px;
    }
    
    #village-square {
        width: 140px;
        height: 100px;
    }
    
    #village-square h2 {
        font-size: 1rem;
    }
    
    #village-square .square-subtitle {
        font-size: 0.6rem;
    }
    
    .landmark-ring button {
        width: 110px;
        height: 75px;
        font-size: 0.9rem;
    }
    
    #village-square {
        width: 120px;
        height: 120px;
    }
    
    #village-square h2 {
        font-size: 1rem;
    }
    
    /* Adjust positioning for smaller screens */
    .landmark-ring button[data-position="northeast"],
    .landmark-ring button[data-position="southeast"] {
        right: -55px;
    }
    
    .landmark-ring button[data-position="southwest"],
    .landmark-ring button[data-position="northwest"] {
        left: -55px;
    }
    
    /* Adjust borders and shadows for mobile */
    #entrance-portal,
    #living-map,
    #story-weaver,
    #community-bulletin,
    footer {
        border-width: 3px;
        box-shadow: 5px 5px 0px #E5A500;
        margin: 5px;
    }
}

@media (max-width: 480px) {
    /* Extra small screen sound button */
    .top-sound-control {
        top: 10px;
        right: 10px;
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    #entrance-portal h1 {
        font-size: 2rem;
        text-shadow: 1px 1px 0px #E5A500;
    }
    
    #entrance-portal p {
        font-size: 1.2rem;
    }
    
    .map-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .village-grid {
        max-width: 350px;
        gap: 0.8rem;
    }
    
    .landmark-card {
        padding: 0.6rem;
    }
    
    .landmark-icon {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }
    
    .landmark-name {
        font-size: 0.7rem;
    }
    
    .square-icon {
        font-size: 1.8rem;
    }
    
    .square-content h3 {
        font-size: 1rem;
    }
    
    .square-content p {
        font-size: 0.65rem;
    }
    
    .landmark-ring {
        width: 300px;
        height: 300px;
    }
    
    #village-square {
        width: 120px;
        height: 85px;
    }
    
    #village-square h2 {
        font-size: 0.9rem;
    }
    
    #village-square .square-subtitle {
        font-size: 0.55rem;
    }
    
    #village-square::after {
        font-size: 1rem;
        top: 6px;
        right: 6px;
    }
    
    .landmark-ring button {
        width: 90px;
        height: 65px;
        font-size: 0.8rem;
        border-width: 2px;
        box-shadow: 3px 3px 0px #E5A500;
    }
    
    .landmark-ring button:hover {
        transform: translate(1px, 1px);
        box-shadow: 2px 2px 0px #E5A500;
    }
    
    #village-square {
        width: 100px;
        height: 100px;
        border-width: 3px;
        box-shadow: 4px 4px 0px #E5A500;
    }
    
    #village-square h2 {
        font-size: 0.9rem;
    }
    
    #entrance-seal {
        width: 150px;
        height: 150px;
        border-width: 3px;
        box-shadow: 4px 4px 0px #E5A500;
    }
    
    /* Further adjust positioning for mobile */
    .landmark-ring button[data-position="northeast"],
    .landmark-ring button[data-position="southeast"] {
        right: -45px;
    }
    
    .landmark-ring button[data-position="southwest"],
    .landmark-ring button[data-position="northwest"] {
        left: -45px;
    }
    
    /* Mobile modal styles */
    .modal-content {
        margin: 0.5rem;
        max-height: 90vh;
        border-width: 3px;
        box-shadow: 5px 5px 0px #E5A500;
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom-width: 2px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        border-width: 2px;
        box-shadow: 2px 2px 0px #E5A500;
    }
    
    .modal-close:hover {
        box-shadow: 1px 1px 0px #E5A500;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-description {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .modal-facts-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .modal-facts-list li {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    /* Mobile gallery styles */
    .modal-gallery-title {
        font-size: 1.3rem;
        margin: 1rem 0 0.8rem 0;
    }
    
    .modal-gallery {
        gap: 8px;
        justify-content: center;
    }
    
    .modal-gallery-image {
        min-width: 120px;
        max-width: 140px;
        height: 100px;
        border-width: 2px;
        box-shadow: 3px 3px 0px #E5A500;
    }
    
    .modal-gallery-image:hover {
        transform: translateY(-2px);
        box-shadow: 4px 4px 0px var(--accent-color);
    }
    
    /* Mobile styles for new sections */
    .story-grid,
    .bulletin-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .story-content h2,
    .bulletin-content h2 {
        font-size: 2rem;
    }
    
    .story-card,
    .bulletin-board,
    .upcoming-events,
    .contact-info {
        padding: 1rem;
        border-width: 2px;
        box-shadow: 3px 3px 0px var(--accent-color);
    }
    
    .entrance-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .seal-odia {
        font-size: 1.5rem;
    }
    
    .seal-english {
        font-size: 0.9rem;
    }
    
    footer {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem;
    }
    
    .footer-info {
        grid-column: 1;
    }
}

/* For Scroll-to-Reveal Animations */
.reveal {
  position: relative;
  transform: translateY(50px);
  opacity: 0;
  transition: all 1.2s ease;
}

.reveal.active {
  transform: translateY(0px);
  opacity: 1;
}

/* Ensure content is visible by default on smaller screens or if JS fails */
@media (max-width: 768px) {
  .reveal {
    transform: translateY(0px);
    opacity: 1;
  }
}

/* Fallback for no-js scenarios */
.no-js .reveal {
  transform: translateY(0px);
  opacity: 1;
}

/* Community Page Styles */
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.community-card {
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 5px 5px 0px var(--border-color);
    transition: all 0.3s ease;
    opacity: 1; /* Ensure cards are visible by default */
    transform: translateY(0); /* Ensure cards are in position by default */
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 15px rgba(0,0,0,0.2);
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    gap: 8px;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.card-text {
    width: 100%;
}

.card-header h3 {
    font-size: 1.4rem;
    color: var(--header-color);
    margin: 0 0 5px 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.card-header h4 {
    font-size: 1rem;
    color: var(--secondary-color);
    font-style: italic;
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Stories Page Styles */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.story-card {
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 5px 5px 0px var(--border-color);
    transition: all 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 15px rgba(0,0,0,0.2);
}

.story-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
}

.story-title {
    font-size: 1.6rem;
    color: var(--header-color);
    margin-bottom: 5px;
}

.story-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-style: italic;
}

.story-content {
    line-height: 1.7;
    color: var(--text-color);
}

/* Contact Page Styles */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 5px 5px 0px var(--border-color);
    transition: all 0.3s ease;
    opacity: 1; /* Ensure cards are visible by default */
    transform: translateY(0); /* Ensure cards are in position by default */
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 15px rgba(0,0,0,0.2);
}

.contact-details {
    margin-top: 20px;
}

.contact-item {
    text-align: center;
    margin-bottom: 18px;
    padding: 15px;
    background-color: rgba(var(--accent-rgb), 0.03);
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-rgb), 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background-color: rgba(var(--accent-rgb), 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-label {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    display: block;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
}

.contact-value br {
    margin-bottom: 3px;
}

/* Contact Form Section */
.contact-form-section {
    margin-top: 50px;
    padding: 0 20px;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white-color);
    border: 3px solid var(--border-color);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 8px 8px 0px var(--border-color);
    text-align: center;
}

.form-container h3 {
    font-size: 1.8rem;
    color: var(--header-color);
    margin-bottom: 30px;
    font-weight: 600;
}

.contact-form {
    text-align: left;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--white-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.submit-button {
    width: 100%;
    padding: 15px 30px;
    background-color: var(--accent-color);
    color: var(--white-color);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Teko', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.submit-button:hover {
    background-color: var(--header-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.submit-button:active {
    transform: translateY(-1px);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    #entrance-portal {
        animation: none !important;
    }
    
    #entrance-portal::before {
        animation: none !important;
    }
}

/* ========================================
   ABOUT PAGE STYLES
======================================== */

/* About Page Hero */
.about-hero {
    height: 70vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="60" cy="40" r="1" fill="white" opacity="0.08"/><circle cx="80" cy="70" r="1" fill="white" opacity="0.12"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-content p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.95;
}

/* Village Stats */
.village-stats {
    padding: 4rem 0;
    background: white;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stat-box {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f3ff 100%);
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stat-box h3 {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-box p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.stat-box .odia-text {
    font-size: 1rem;
    color: #6b7280;
}

/* Content Sections */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-section {
    padding: 4rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.content-section:last-child {
    border-bottom: none;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.section-header h3 {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.header-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto;
    border-radius: 2px;
}

/* History Section */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.content-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1.5rem;
}

.timeline {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 2rem;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 60px;
    top: 60px;
    width: 2px;
    height: calc(100% + 2rem);
    background: #e5e7eb;
    z-index: 1;
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-year {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    height: fit-content;
    position: relative;
    z-index: 2;
}

.timeline-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: #6b7280;
    line-height: 1.6;
}

/* Geography Section */
.geography-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.geo-card {
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.geo-card:hover {
    border-color: #667eea;
}

.geo-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.geo-card p {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 0.3rem;
}

.geo-card .detail {
    font-size: 0.9rem;
    color: #6b7280;
}

.geography-description {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 2rem;
}

/* Culture Section */
.culture-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.culture-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1.5rem;
}

.traditions-list {
    display: grid;
    gap: 1.5rem;
}

.tradition-item {
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.tradition-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.tradition-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.tradition-item p {
    color: #6b7280;
    line-height: 1.6;
}

/* Community Section */
.community-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f3ff 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.feature-content p {
    color: #6b7280;
    line-height: 1.6;
}

/* Festivals Section */
.festivals-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.festival-season {
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    padding: 1.5rem;
}

.festival-season h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f3f4f6;
}

.festival-list {
    display: grid;
    gap: 0.8rem;
}

.festival-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: #f8f9ff;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.festival-item:hover {
    background: #f1f3ff;
}

.festival-name {
    font-weight: 600;
    color: #1f2937;
}

.festival-desc {
    font-size: 0.9rem;
    color: #6b7280;
    text-align: right;
}

/* Development Section */
.development-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.development-card {
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    padding: 2rem;
    transition: border-color 0.3s ease;
}

.development-card:hover {
    border-color: #667eea;
}

.development-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.development-card ul {
    list-style: none;
    padding: 0;
}

.development-card li {
    padding: 0.5rem 0;
    color: #6b7280;
    position: relative;
    padding-left: 1.5rem;
}

.development-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* About Page Responsive Design */
@media (max-width: 768px) {
    .about-hero {
        height: 60vh;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-box {
        padding: 1.5rem;
    }
    
    .stat-box h3 {
        font-size: 2rem;
    }
    
    .content-grid,
    .culture-showcase {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .timeline {
        padding: 1rem;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timeline-item::after {
        display: none;
    }
    
    .geography-grid,
    .community-features,
    .festivals-calendar,
    .development-areas {
        grid-template-columns: 1fr;
    }
    
    .festival-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .festival-desc {
        text-align: left;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .about-hero {
        height: 50vh;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    .content-wrapper {
        padding: 0 1rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
}

/* --- About Page Styles --- */
.about-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: var(--white-color);
    border: 3px solid var(--border-color);
    box-shadow: 5px 5px 0px var(--accent-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.about-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 3px solid var(--accent-color);
}

.about-header h1 {
    font-family: 'Teko', sans-serif;
    font-size: 3rem;
    color: var(--header-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.about-header .subtitle-odia {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.about-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    font-style: italic;
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(245, 239, 230, 0.3);
    border-left: 5px solid var(--accent-color);
    border-radius: 5px;
}

.about-section h2 {
    font-family: 'Teko', sans-serif;
    font-size: 2.2rem;
    color: var(--header-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    font-weight: 500;
}

.about-section h3 {
    font-family: 'Teko', sans-serif;
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 500;
}

.about-section p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1rem;
}

.temple-info, .education-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
    margin-top: 20px;
}

.village-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: var(--white-color);
    padding: 15px;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    font-weight: 500;
    color: var(--text-color);
}

.about-closing {
    background: linear-gradient(135deg, rgba(201, 44, 57, 0.1), rgba(229, 165, 0, 0.1));
    border: 3px solid var(--header-color);
    text-align: center;
}

.blessing {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--header-color);
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border-left: 5px solid var(--accent-color);
}

.card-icon svg {
    width: 48px;
    height: 48px;
    color: var(--header-color);
    transition: all 0.3s ease;
}

.nav-card:hover .card-icon svg {
    color: var(--accent-color);
    transform: scale(1.1);
}

.title-icon {
    width: 1em;
    height: 1em;
    margin-right: 10px;
    vertical-align: -0.15em;
    color: var(--accent-color);
}

/* Responsive styles for About page */
@media (max-width: 768px) {
    .about-container {
        margin: 20px;
        padding: 20px;
    }
    
    .about-header h1 {
        font-size: 2.2rem;
    }
    
    .about-header .subtitle-odia {
        font-size: 1.2rem;
    }
    
    .about-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .about-section h2 {
        font-size: 1.8rem;
    }
    
    .temple-info, .education-info {
        padding: 15px;
    }
    
    .village-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .about-header h1 {
        font-size: 1.8rem;
    }
    
    .about-section h2 {
        font-size: 1.5rem;
    }
    
    .about-intro {
        font-size: 1rem;
    }
}

