* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: #00000000;
}

:root {
    --color-primary: #9B5024;
    --color-primary-dark: #7A3F1C;
    --color-primary-light: #C37B51;
    --color-secondary: #D1A569;
    --color-accent: #E6B325;
    --color-bg: #FFFBF7;
    --color-bg-alt: #F8F3EE;
    --color-text: #2D2114;
    --color-text-light: #6B5E52;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-error: #D63031;
    --color-success: #00B894;

    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Nunito', sans-serif;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s ease;

    --container-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover,
a:focus {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

/* Page Loader */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    user-select: none;
    overflow: hidden;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.loader-container img {
    height: 200px;
    animation: spinner 4s linear infinite;
    transform-origin: center center;
}

.loader-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-container p {
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

/* Header & Navigation */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.nav-container.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
    padding: 0 1.5rem 0 0.3rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    width: 4rem;
    height: 4rem;
}

.logo span {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.hamburger {
    width: 30px;
    height: 24px;
    position: relative;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--color-text);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: var(--transition);
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 10px;
}

.hamburger span:nth-child(3) {
    top: 20px;
}

.menu-toggle.active .hamburger span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.menu-toggle.active .hamburger span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.btn-header {
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-header:hover {
    background-color: var(--color-primary-dark);
}

.btn-header::after {
    display: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://visuddhayathana.com/uploads/1.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 5rem;
}

.hero-content {
    max-width: 700px;
    padding: 0 1.5rem;
}

.hero h1 {
    color: var(--color-white);
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    color: var(--color-white);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: var(--color-primary-light);
    color: var(--color-white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-text {
    background-color: transparent;
    color: var(--color-primary);
    padding: 0;
    position: relative;
    font-weight: 600;
}

.btn-text:hover {
    color: var(--color-primary-dark);
}

.btn-text .arrow {
    transition: var(--transition);
}

.btn-text:hover .arrow {
    margin-left: 0.25rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.section-underline {
    width: 60px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 0 auto 2rem;
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* About Section */
.about {
    background-color: var(--color-bg-alt);
}

.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

/* Programs Section */
.program-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.program-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.program-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(155, 80, 36, 0.1);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.program-card h3 {
    margin-bottom: 1rem;
}

.program-card p {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

/* Events Section */
.events {
    background-color: var(--color-bg-alt);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.event-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.event-date {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 100px;
}

.event-date .day {
    font-size: 1.75rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.event-date .month {
    font-size: 1rem;
    text-transform: uppercase;
}

.event-details {
    flex: 1;
}

.event-details h3 {
    margin-bottom: 0.5rem;
}

.event-time,
.event-location {
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.icon {
    margin-right: 0.5rem;
}

.event-description {
    margin-top: 0.5rem;
}

.center-button {
    text-align: center;
    margin-top: 1.5rem;
}

/* Teachings/Blog Section */
.teachings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.teaching-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.teaching-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.teaching-image {
    height: 200px;
    overflow: hidden;
}

.teaching-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.teaching-card:hover .teaching-image img {
    transform: scale(1.05);
}

.teaching-content {
    padding: 1.5rem;
}

.teaching-category {
    display: inline-block;
    background-color: rgba(155, 80, 36, 0.1);
    color: var(--color-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.teaching-content h3 {
    margin-bottom: 0.75rem;
}

.teaching-content p {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

.teaching-footer {
    display: flex;
    justify-content: space-between;
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Library Section */
.library-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.library-category {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.library-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.library-category h3 {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.library-category p {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

.library-hours {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.library-hours h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.hours-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 2rem;
}

.day {
    font-weight: 600;
}

.time {
    color: var(--color-text-light);
}

/* Booking Section */
.booking {
    background-color: var(--color-bg-alt);
}

.booking-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input:not([type="radio"]),
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    resize: none;
}

input:not([type="radio"]):focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(155, 80, 36, 0.2);
}

input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212, 103, 39, 0.726);
    border-radius: 50%;
    background-color: #fff;
    position: relative;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}
input[type="radio"]::before {
content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(212, 103, 39, 0.726);
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
}
input[type="radio"]:checked::before {
    transform: scale(1);
}

.form-checkbox {
    display: flex;
    align-items: center;
}

.form-checkbox input {
    width: auto;
    margin-right: 0.75rem;
}

.form-checkbox label {
    margin-bottom: 0;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-method {
    display: flex;
    margin-bottom: 2rem;
}

.contact-icon {
    background-color: rgba(155, 80, 36, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-right: 1rem;
}

.contact-details h3 {
    margin-bottom: 0.5rem;
}

.temple-hours {
    margin-top: 2rem;
}

.contact-form-container {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.contact-form-container h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Newsletter Section */
.newsletter {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 4rem 0;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h2 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
}

.newsletter-form button {
    background-color: var(--color-accent);
    color: var(--color-text);
}

.newsletter-form button:hover {
    background-color: var(--color-secondary);
}

/* Footer */
footer {
    background-color: #2D2114;
    color: #f8f3ee;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 2.5rem;
    height: 2.5rem;
    margin-right: 0.75rem;
    border-radius: 50%;
}

.footer-logo span {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-white);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--color-primary);
}

.footer-section h3 {
    color: var(--color-white);
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #f8f3ee;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.footer-legal a {
    color: #f8f3ee;
    opacity: 0.6;
    font-size: 0.9rem;
}

.footer-legal a:hover {
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .about-content {
        flex-direction: column;
        gap: 2rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 1000px){
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 5rem;
        left: -100%;
        width: 100%;
        height: calc(100vh - 5rem);
        flex-direction: column;
        background-color: var(--color-white);
        padding: 2rem;
        transition: var(--transition);
        z-index: 1000;
        gap: 1.5rem;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.75rem;
    }

    .hero p {
        font-size: 1.25rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .event-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .event-date {
        margin: 0 auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }

    section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    section {
        padding: 3rem 0;
    }
}

.text-center {
    text-align: center;
}

.mt-5rem {
    margin-top: 5rem;
}
.mt-20px {
    margin-top: 20px;
}

.w-100 {
    width: 100%;
}

.card {
    max-width: 500px;
}

.otp-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}
.otp-inputs > input {
    width: 45px;
    height: 45px;
    text-align: center;
    font-size: 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}
.otp-inputs > input:focus {
    border-color: #4CAF50;
}

.resend-link {
    color: #4CAF50;
    cursor: pointer;
    text-decoration: underline;
}

/* Display Inline */
.d-flex {
    display: flex;
}
.d-inline {
    display: inline-flex;
}

/* Justify Content */
.jc-space-around {
    justify-content: space-around;
}

/* Align Items */
.ai-center {
    align-items: center;
}

/*Gap*/
.gap-05em {
    gap: 0.5em;
}