/* Variables for easy theme changes */
:root {
    --primary-color: #FF7F50; /* Light Orange Pastel */
    --secondary-color: #FFDAB9; /* Lighter Orange */
    --accent-color: #87CEEB; /* A soft blue for contrast if needed */
    --text-color: #333;
    --light-text-color: #666;
    --background-color: #FFF;
    --light-bg-color: #F8F8F8;
    --border-color: #EEE;
    --card-bg: #FFF;
    --shadow-light: 0 4px 8px rgba(0,0,0,0.05);
    --border-radius: 8px;
    --max-width: 1200px;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-bg-color);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 600;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #FFF;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn:hover {
    background-color: darken(var(--primary-color), 10%); /* Pseudo-code, use a lighter shade */
    background-color: #ff916a; /* A slightly darker shade of primary-color */
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--light-text-color);
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1em;
}

/* Header */
.header {
    background-color: var(--background-color);
    padding: 20px 0;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.8em;
    margin: 0;
    color: var(--text-color);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    list-style: none;
    display: flex;
}

.nav-list li {
    margin-left: 30px;
}

.nav-list a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary-color);
    text-decoration: none;
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 60vh; /* Adjust as needed */
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-item.active {
    opacity: 1;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-caption {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.5);
    color: #FFF;
    padding: 20px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 80%;
}

.slider-caption h2 {
    color: #FFF;
    margin-bottom: 10px;
    font-size: 2.2em;
}

.slider-caption p {
    font-size: 1.1em;
}

.slider-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--text-color);
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.slider-nav button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.slider-nav .prev {
    left: 20px;
}

.slider-nav .next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dots .dot.active {
    background-color: var(--primary-color);
}


/* About Us Section */
.about-us p {
    max-width: 800px;
    margin: 0 auto 20px;
    text-align: center;
    font-size: 1.1em;
    color: var(--light-text-color);
}

/* Activity Section */
.activity-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center;
}

.activity-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.activity-card .card-media {
    width: 100%;
    height: 100%; /* Fixed height for consistency */
    overflow: hidden;
}

.activity-card .card-media img,
.activity-card .card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-card h3 {
    font-size: 1.6em;
    margin: 20px 20px 5px;
    color: var(--primary-color);
}

.activity-card h4 {
    font-size: 1.1em;
    color: var(--light-text-color);
    margin: 0 20px 15px;
    font-weight: 400;
}

.activity-card p {
    font-size: 0.95em;
    color: var(--light-text-color);
    margin: 0 20px 20px;
    flex-grow: 1; /* Allows paragraph to take available space */
}

.activity-card .btn {
    margin: 0 20px 20px;
    align-self: flex-start; /* Align button to start */
}

/* Donation Section */
.donation-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start; /* Align content to the top */
}

.donation-schemes {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.donation-schemes h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
}

.donation-schemes ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.donation-schemes li {
    font-size: 1.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: var(--light-text-color);
}

.donation-schemes li i {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 1.4em;
    width: 30px; /* Fixed width for consistent alignment */
    text-align: center;
}

.donor-thumbnails {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.donor-thumbnails h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
}

.donor-scroll-wrapper {
    height: 400px; /* Fixed height for the scroll area */
    overflow-y: auto;
    padding-right: 10px; /* Space for scrollbar */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Custom scrollbar for donor-scroll-wrapper */
.donor-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
}

.donor-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--light-bg-color);
    border-radius: 10px;
}

.donor-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.donor-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--light-bg-color);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
/* Offerings Section */
.offering-cards-grid {
    /* Use CSS Grid for responsive layout */
    display: grid;
    /* Auto-fit and minimum size ensures responsiveness */
    /* The minimum width for each card is set smaller than activity cards (e.g., 150px) */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px; /* Space between cards */
    padding: 20px 0;
}

.offering-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
    border: 1px solid var(--border-color); /* Soft border */
}

.offering-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    text-decoration: none; /* Remove underline on hover */
}

.offering-card img {
    width: 80px; /* Small image size, roughly 50% of Activity card size (200px height, so 100px width for a square) */
    height: 80px;
    object-fit: cover;
    border-radius: 50%; /* Make images circular */
    margin-bottom: 10px;
    border: 3px solid var(--primary-color); /* Pastel orange ring */
}

.offering-card h3 {
    font-size: 1.1em;
    color: var(--primary-color);
    margin: 0 0 5px;
}

.offering-card p {
    font-size: 0.9em;
    color: var(--light-text-color);
    line-height: 1.2;
    margin: 0;
}
/* --- Modern Feedback Form Styling --- */

.feedback-form {
    background-color: var(--card-bg); /* Use white background */
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light); /* Soft lift effect */
    border: 1px solid var(--border-color); /* Subtle outline */
}

.feedback-form h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
}

.feedback-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feedback-form input[type="text"],
.feedback-form input[type="tel"],
.feedback-form input[type="email"],
.feedback-form textarea {
    padding: 14px 15px; /* Increase padding for a modern, spacious feel */
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Slightly larger border radius for softness */
    font-size: 1em;
    background-color: #FAFAFA; /* Very light gray background for input fields */
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
    border-color: var(--primary-color); /* Primary color border on focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 127, 80, 0.2); /* Soft, subtle outer glow */
    background-color: var(--card-bg); /* White background on focus */
}

.feedback-form textarea {
    resize: vertical;
    min-height: 100px; /* Ensure sufficient space for feedback text */
}

/* Captcha Layout */
.captcha {
    display: flex;
    align-items: center;
    gap: 15px; /* Increased gap */
    flex-wrap: wrap;
    padding: 5px 0;
}

.captcha p {
    font-size: 0.95em;
    color: var(--text-color);
    margin: 0;
}

#captcha-display {
    /* Style for the displayed captcha code: make it look like a badge */
    background-color: var(--secondary-color); /* Lighter pastel shade */
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 3px; /* Wider spacing enhances readability and style */
    font-family: monospace; /* Monospace font looks cleaner for codes */
}

#captcha-input {
    flex-grow: 1;
    max-width: 180px; /* Give the input more space */
}

/* Submit Button Style (using .btn-secondary from previous definition) */
.feedback-form .btn-secondary {
    align-self: flex-end; /* Align button to the right/end */
    margin-top: 10px;
    background-color: var(--primary-color); /* Using primary color for a prominent CTA */
    color: #FFF;
}

.feedback-form .btn-secondary:hover {
    background-color: #ff916a;
}

/* Ensure the Footer Grid looks good on large screens */
.footer-social-feedback {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Dedicated space for form */
    gap: 50px;
    width: 100%;
    /* Added alignment to make the two columns visually balanced */
    align-items: flex-start;
}

/* Floating Buttons (FABs) */
.floating-buttons {
    position: fixed;
    /* Place them on the bottom right corner */
    bottom: 20px;
    right: 20px;
    z-index: 1000; /* Ensure they are above everything else */
    display: flex;
    flex-direction: column; /* Stack them vertically */
    gap: 15px; /* Space between the two buttons */
}

.float-donate,
.float-scroll-top {
    /* Base Button Styling */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
}

/* Specific styling for the Donate button (prominent color) */
.float-donate {
    background-color: var(--primary-color); /* Light Orange Pastel */
    color: #FFF;
    order: 1; /* This makes the Donate button appear on top */
}

/* Specific styling for the Scroll to Top button */
.float-scroll-top {
    background-color: var(--light-text-color); /* Gray/soft secondary color */
    color: #FFF;
    order: 2; /* This makes the Scroll to Top button appear below */
    display: none; /* Initially hidden, shown with JS (as planned) */
}

.float-donate i,
.float-scroll-top i {
    font-size: 1.2em;
    margin-bottom: 2px;
}

.float-donate:hover,
.float-scroll-top:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* Floating Buttons (FABs) */
.floating-buttons {
    position: fixed;
    /* Place them on the bottom right corner */
    bottom: 20px;
    right: 20px;
    z-index: 1000; /* Ensure they are above everything else */
    display: flex;
    flex-direction: column; /* Stack them vertically */
    gap: 15px; /* Space between the two buttons */
}

.float-donate,
.float-scroll-top {
    /* Base Button Styling */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
}

/* Specific styling for the Donate button (prominent color) */
.float-donate {
    background-color: var(--primary-color); /* Light Orange Pastel */
    color: #FFF;
    order: 1; /* This makes the Donate button appear on top */
}

/* Specific styling for the Scroll to Top button */
.float-scroll-top {
    background-color: var(--light-text-color); /* Gray/soft secondary color */
    color: #FFF;
    order: 2; /* This makes the Scroll to Top button appear below */
    display: none; /* Initially hidden, shown with JS (as planned) */
}

.float-donate i,
.float-scroll-top i {
    font-size: 1.2em;
    margin-bottom: 2px;
}

.float-donate:hover,
.float-scroll-top:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
} 
/* ========================================= */
/* --- MOBILE RESPONSIVENESS (Max Width 768px) --- */
/* ========================================= */

@media (max-width: 768px) {
    
    /* Global Adjustments */
    .section-padding {
        padding: 40px 0; /* Reduce vertical padding on mobile */
    }
    h2 {
        font-size: 1.5em; /* Shrink main headings */
    }
    h2 {
        font-size: 1.2em; /* Shrink main headings */
    }

    /* --- 1. Header and Mobile Navigation --- */
    .header .container {
        padding: 10px 15px;
    }

    .logo h1 {
        font-size: .8em; /* Shrink logo text */
    }

    .hamburger-menu {
        display: flex; /* Show the hamburger icon on mobile */
        z-index: 1001; /* Above the navigation list */
    }

    .nav-list {
        /* Initially hide the menu */
        display: none;
        flex-direction: column;
        position: absolute;
        top: 0;
        right: 0;
        width: 70%; /* Menu takes up 70% of screen width */
        height: 100vh; /* Full screen height */
        background-color: var(--background-color);
        box-shadow: -4px 0 10px rgba(0,0,0,0.1);
        padding-top: 80px; /* Space below the header area */
        z-index: 1000;
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%); /* Start off-screen */
    }

    .nav-list.active {
        display: flex; /* Show menu when active */
        transform: translateX(0); /* Slide in */
    }

    .nav-list li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-list a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1em;
        font-weight: 600;
    }

    /* Hamburger Menu Animation (Optional: adds polish) */
    .hamburger-menu.open .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.open .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger-menu.open .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* --- 2. Hero Slider Caption --- */
    .hero-slider {
        height: 50vh; /* Reduce slider height on smaller screens */
    }

    .slider-caption {
        bottom: 10%;
        padding: 15px 20px;
        max-width: 90%;
    }

    .slider-caption h2 {
        font-size: 1.5em;
    }

    .slider-caption p {
        font-size: 0.9em;
    }

    .slider-nav button {
        padding: 10px 5px;
        font-size: 1.2em;
        opacity: 0.8; /* Make buttons less intrusive */
    }

    /* --- 3. Activity Cards --- */
    /* The existing 'grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))' handles this well, 
       but we can ensure a simpler column layout is prioritized. */
    .activity-cards-grid {
        grid-template-columns: 1fr; /* Force single column on tiny screens */
        gap: 20px;
    }

    /* --- 4. Donation & Contact Grids --- */
    .donation-content-grid,
    .contact-grid {
        grid-template-columns: 1fr; /* Stack columns vertically */
        gap: 30px;
    }

    /* Donation Schemes (Full width) */
    .donation-schemes,
    .donor-thumbnails,
    .contact-item {
        padding: 5px; /* Reduce padding */ 
    }
    
    .donor-scroll-wrapper {
        height: 300px; /* Reduce donor list height */ 
    }
	.donation-schemes img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

    /* Contact Details Re-arrangement (Fixing misplaced Address) */
    .contact-grid .contact-item:nth-child(1) {
        /* Ensure the map/payment info is at the top */
        order: 1;
    }
    .contact-grid .contact-item:nth-child(2) {
        /* Ensure the address/contact info is next */
        order: 2;
    }
    
    /* Fix for the mis-nested address details in HTML structure */
    .contact-item.address-details {
        /* This rule addresses the structural issue in the HTML by ensuring the address details are visually separate */
        background-color: var(--card-bg);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-light);
        padding: 20px;
        text-align: center;
    }
    
    /* --- 5. Offerings Grid --- */
    .offering-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Allow 2-3 small columns */
        gap: 15px;
    }

    .offering-card img {
        width: 60px; 
        height: 60px;
    }

    /* --- 6. Footer Layout --- */
    .footer-social-feedback {
        grid-template-columns: 1fr; /* Stack social and feedback vertically */
        gap: 30px;
    }
    
    .feedback-form {
        order: 1; /* Keep feedback form above social links on mobile */
    }

    .social-links {
        order: 2; 
        text-align: center;
    }

    .feedback-form .btn-secondary {
        align-self: stretch; /* Make the submit button full width on mobile */
    }

    /* --- 7. Floating Buttons --- */
    .floating-buttons {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }

    .float-donate,
    .float-scroll-top {
        width: 50px;
        height: 50px;
        font-size: 0.7em;
    }
}
/* calendar part */
.calendar-widget {
    padding: 15px;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 days a week */
    gap: 5px;
    text-align: center;
}

.day-header, .date-cell {
    padding: 5px 0;
    font-size: 0.85em;
}

.day-header {
    font-weight: bold;
    color: #555;
}

.date-cell {
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    user-select: none;
}

.date-cell:hover {
    background-color: #f0f0f0;
}

/* Style for dates with events */
.date-cell.has-event {
    background-color: #e0f7fa; /* Light cyan */
    color: #00838f; /* Dark cyan */
    font-weight: bold;
}

.event-icon {
    /* Simple dot or small marker for the event */
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: red;
    border-radius: 50%;
}

.media-slider {
    /* Basic slider styling */
    width: 100%;
    height: 200px; /* Example fixed height */
    background-color: #333;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}
h4 .event-text-title {
    /* Use the custom property for the color */
    color: var(--primary-color);
    
    /* Other existing styles */
    font-size: 1.1em;
    font-weight: bold;
    margin: 0 0 5px 0;
}
 
.event-details-display {
    /* Use the custom property for the color */
    color: var(--light-text-color);
    
    /* Other existing styles */
    font-size: 0.75em; 
    margin: 0 0 5px 0;
}
/* Table */
/* Responsive Table Container */
    .table-container {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    table {
      width: 100%;
      /*min-width: 640px;  Forces horizontal scroll on small screens */
      border-collapse: collapse;
      background-color: white;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    thead {
      background-color: #f9fafb;
      position: sticky;
      top: 0;
      z-index: 10;
    }

    th, td {
      padding: 8px 14px; 
      text-align: left;
      font-size: 14px;
      line-height: 1.2;
    }

    th {
      font-weight: 600;
      color: #374151;
      background-color: #f3f4f6;
      border-bottom: 1px solid #d1d5db;
    }

    /* Rounded top corners */
    th:first-child {
      border-top-left-radius: 12px;
    }
    th:last-child {
      border-top-right-radius: 12px;
    }

    /* Specific column alignments and widths */
    th:nth-child(1), td:nth-child(1) { width: 60px; }     /* S.no */
    th:nth-child(3), td:nth-child(3) { 
      text-align: right; 
      width: auto; 
    }                                                    /* Area/Qty */
    th:nth-child(4), td:nth-child(4) { 
      text-align: right; 
      width: auto; 
    }                                                    /* Amount */

    tbody tr {
      transition: background-color 0.2s;
    }

    tbody tr:hover {
      background-color: #f8fafc;
    }

    tbody td {
      color: #4b5563;
      border-bottom: 1px solid #e5e7eb;
    }

    /* Footer styling */
    tfoot td { 
      background-color: #f1f5f9;
      color: #1f2937;
      border-top: 2px solid #94a3b8;
    }

    /* Optional: Add subtle stripe effect */
    tbody tr:nth-child(even) {
      background-color: #fafafa;
    }
    /* Summary & Subtotal Rows - This is the magic fix */
    .summary-row {
      background-color: #f8fafc !important;
      font-weight: 600;
      color: #1f2937;
    }

    .summary-row td {
      padding: 16px 24px;
      font-size: 15px;
    }

    .subtotal {
      background-color: #f1f5f9 !important; 
      font-size: 15px;
    }

    .grand-total {
      background-color: inherit !important; 
      font-size: 16px;
      color: var(--light-text-color);
      border-top: 3px double var(-border-color);
    }

    .summary-label {
      text-align: left !important;
      padding-left: 24px !important; 
    }

    .summary-amount {
      text-align: right !important;
      font-weight: 600;
    }

    /* Hover effect only on data rows */
    tbody tr:not(.summary-row):hover {
      background-color: #f8fafc;
    }

    /* Mobile improvements */
    @media (max-width: 640px) {
      th, td {
       /* padding: 12px 16px;*/
        font-size: 10px;
      }
      .summary-label {
        padding-left: 16px !important;
      }
    }
    /* MODAL */
    /* Modal Overlay */
  .modal-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 9999; align-items: center; justify-content: center;
    padding: 20px; animation: fadeIn 0.3s ease;
  }
  .modal-overlay.active { display: flex; }

  /* Modal Box */
  .modal {
    background: white; width: 100%; max-width: 520px;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    animation: slideUp 0.4s ease;
  }
.modal-header {
  background: var(--primary-color);     /* your orange */
  color: white;
  padding: 20px 24px;
  border-radius: 16px 16px 0 0;
  
  /* Flexbox = perfect responsive alignment */
  display: flex;
  justify-content: space-between;   /* title left, button right */
  align-items: center;
  position: relative;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

/* Your close button – uses your id="closebtn" */
#closebtn {
  background: none;
  border: none;
  color: white;
  font-size: 34px;
  font-weight: 300;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
  line-height: 1;
}

#closebtn:hover {
  background: rgba(255, 255, 255, 0.2);
}

#closebtn:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}
  .close-modal { background:none; border:none; font-size:28px; cursor:pointer; color:white; }

  .modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; }
  .form-group { margin-bottom: 18px; }
  label { display:block; margin-bottom:6px; font-weight:600; color:#374151; }
  select, input, textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #d1d5db;
    border-radius: 8px; font-size: 15px;
  }
  select:focus, input:focus, textarea:focus { outline:none; border-color:var(--primary-color); }

  .selected-scheme-display {
    background:#f3f4f6; padding:14px; border-radius:8px;
    font-weight:600; color:#1f2937; margin-top:8px;
  }

  .sqft-counter { display:none; align-items:center; gap:12px; margin-top:12px; }
  .sqft-counter.active { display:flex; }
  .counter-btn {
    width:40px; height:40px; border:1px solid #d1d5db;
    background:#fff; font-size:20px; border-radius:8px; cursor:pointer;
  }

  .file-upload {
    border:2px dashed #cbd5e1; border-radius:8px; padding:20px;
    text-align:center; cursor:pointer; transition:0.2s;
  }
  .file-upload:hover { border-color:var(--primary-color); }

  .btn-primary {
    background:var(--primary-color); color:white; border:none;
    padding:14px 28px; border-radius:8px; font-size:16px; cursor:pointer;
    margin-top:20px; font-weight:600;
  }
  .btn-primary:disabled { opacity:0.6; cursor:not-allowed; }

  .thankyou { display:none; text-align:center; padding:40px 20px; }
  .thankyou.active { display:block; }
  .thankyou h2 { color:var(--primary-color); margin-bottom:16px; }

  @keyframes fadeIn { from{opacity:0} to{opacity:1} }
  @keyframes slideUp { from{transform:translateY(50px)} to{transform:translateY(0)} }

.qr-code {
  display: flex;
  justify-content: center;
}
.qr-code img {
  width: 48%;
}
.qr-code2 {
  display: flex;
  justify-content: center;
}
div.qr-code2 img {
  width: 20%;
}
.threesteps {
  display: flex;
  justify-content: center;
}
.threesteps img {
  width: 60%;
}

.threesteps2 {
  display: flex;
  justify-content: center;
}
div.threesteps2 img {
  width: 40%;
}
.register-donation {
  display: flex;
  justify-content: center;
}
.register-donation button {
  width: 100%;
}

.more-info {
  display: flex;
  justify-content: center;
  text-align:center;
}
.more-info a {
  width: 100%;
}

/* refined form */
.form-group { margin-bottom: 20px; }
  label { display: block; margin-bottom: 8px; color: #555; font-weight: 500; }
  input, textarea {
    width: 100%; padding: 14px; border: 1px solid #ddd; border-radius: 10px;
    font-size: 16px; background: var(--gray); transition: all 0.2s;
  }
  input:focus, textarea:focus { outline: none; border-color: var(--primary); background: white; }
  textarea { height: 110px; resize: vertical; }

  .captcha-box {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  }
  .captcha-display {
    background: var(--light); color: var(--primary); font-weight: bold;
    padding: 10px 16px; border-radius: 8px; font-size: 18px; letter-spacing: 2px;
  }
  #captchaInput { flex: 1; min-width: 180px; }

  .btn-submit {
    background: var(--primary); color: white; border: none; padding: 14px 32px;
    font-size: 16px; font-weight: 600; border-radius: 50px; cursor: pointer;
    float: right; margin-top: 20px; transition: 0.3s;
  }
  .btn-submit:hover { background: #f4511e; transform: translateY(-2px); }
  .btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

  .message { margin-top: 20px; padding: 12px; border-radius: 8px; text-align: center; font-weight: 500; }
  .success { background: #e8f5e9; color: #2e7d32; }
  .error { background: #ffebee; color: #c62828; }
  
/* Container for the two items */
.location-payment {
  display: flex;
  flex-wrap: wrap;       /* allows wrapping if space is tight */
  gap: 20px;             /* gap between the two columns */
}

/* Each child takes 50% width on larger screens */
.location-payment > div {
  flex: 1 1 calc(50% - 20px); /* subtract gap so they fit nicely */
  box-sizing: border-box;
}

/* Make iframe and image responsive */
.google-map iframe,
.contact-item img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 6px;    /* optional styling */
}

/* On smaller screens, stack vertically */
@media (max-width: 768px) {
  .location-payment {
    flex-direction: column;
  }
  .location-payment > div {
    flex: 1 1 100%;
  }
}
