/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    /* Add top padding equal to the fixed header height so content doesn't sit under the header */
    padding-top: var(--header-height);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo .logo {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #2d5016;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #4a7c59;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #2d5016;
    margin: 3px 0;
    transition: 0.3s;
}
/* Ensure media and icons don’t overflow on narrow screens */
img, svg {
    max-width: 100%;
    height: auto;
}

/* =========================
   Hero (rewritten, consolidated)
   ========================= */

/* Centralized sizing variables — adjust these to change logo size across breakpoints */
:root {
    /* New: header height variable used to offset page top and anchor scrolling */
    --header-height: 80px;

    --hero-logo-width-desktop: clamp(156px, 28.6vw, 234px);
    --hero-logo-width-tablet:  clamp(130px, 46.8vw, 182px);
    --hero-logo-width-mobile:  clamp(120px, 42vw, 180px);

    /* New: logo plate padding variables */
    --hero-logo-pad-desktop: clamp(8px, 1.2vw, 14px);
    --hero-logo-pad-tablet:  clamp(8px, 2vw, 16px);
    --hero-logo-pad-mobile:  clamp(8px, 3vw, 18px);

    /* New: equal side column width = logo image + left/right padding */
    --hero-side-desktop: calc(var(--hero-logo-width-desktop) + calc(var(--hero-logo-pad-desktop) * 2));
    --hero-side-tablet:  calc(var(--hero-logo-width-tablet)  + calc(var(--hero-logo-pad-tablet)  * 2));
    --hero-side-mobile:  calc(var(--hero-logo-width-mobile)  + calc(var(--hero-logo-pad-mobile)  * 2));
}

/* New: ensure anchor navigation (Home/Services/About/Contact) scrolls with space for the fixed header */
html {
    scroll-padding-top: var(--header-height);
    -webkit-text-size-adjust: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo .logo {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #2d5016;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #4a7c59;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #2d5016;
    margin: 3px 0;
    transition: 0.3s;
}

/* Base hero section */
.hero {
    position: relative;
    overflow: hidden;
    /* Restore border background photo */
    background: url("./border_background_photo.png") center/cover no-repeat;
    background-color: #2d5016; /* fallback color behind image */
}

.hero-container {
    width: 100%;
    margin: 0 auto;
    padding: clamp(16px, 2vw, 24px);
}

.hero-layout {
    display: grid;
    /* Equal left/right columns so center content stays perfectly centered */
    grid-template-columns: minmax(var(--hero-side-desktop), max-content) 1fr minmax(var(--hero-side-desktop), max-content);
    align-items: center;
    justify-items: center;
    column-gap: clamp(12px, 3vw, 24px);
}

/* Logo block — stays left on desktop */
.hero-logo {
    grid-column: 1;
    justify-self: start;
    align-self: center;
    /* white background plate behind logo for visibility */
    background-color: #ffffff;
    padding: var(--hero-logo-pad-desktop);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Logo image sizing — controlled via variables above */
.hero-logo-img {
    display: block;
    width: var(--hero-logo-width-desktop);
    height: auto;
}

/* Content (kept centered) */
.hero-content {
    grid-column: 2;
    justify-self: center;
    align-self: center;
    color: #fff; /* make all hero text white by default */
}

/* Optional right spacer to keep the content visually centered in the grid */
.hero-spacer {
    grid-column: 3;
}

/* Tablet: stack, center the logo above content */
@media (max-width: 900px) {
    .hero-layout {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        justify-items: center;
        row-gap: clamp(10px, 4vw, 18px);
    }
    /* Mobile/tablet: ensure the banner fills width and has enough height */
    .hero {
        background: url("./border_background_photo.png") center/cover no-repeat;
        background-color: #2d5016;
        min-height: clamp(340px, 60vh, 700px);
        overflow: visible;
    }
    .hero-logo {
        grid-column: 1;
        justify-self: center;
        margin-bottom: clamp(8px, 2vw, 12px);
        background-color: #ffffff;
        padding: var(--hero-logo-pad-tablet);
        border-radius: 10px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }
    .hero-logo-img {
        width: var(--hero-logo-width-tablet);
    }
    .hero-content {
        grid-column: 1;
    }
    .hero-spacer {
        display: none;
    }
}

/* Mobile: same as tablet with slightly smaller width variable if needed */
/* Mobile: final overrides — FIXED (no nested @media) */
@media (max-width: 600px) {
    :root { --header-height: 100px; } /* increase offset under fixed header */
    body { overflow-x: auto; }        /* avoid hiding the right side if something overflows */
    html { -webkit-text-size-adjust: 100%; }

    .hero {
        background: url("./border_background_photo.png") center top/contain no-repeat;
        background-color: #2d5016;
        min-height: clamp(440px, 72vh, 820px);
        overflow: visible;
    }

    .hero-logo-img {
        width: var(--hero-logo-width-mobile);
    }

    .hero-title {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        font-size: clamp(1.8rem, 6.5vw, 2.4rem);
        line-height: 1.15;
    }

    .hero-subtitle {
        white-space: normal;
        font-size: clamp(1rem, 4.5vw, 1.25rem);
    }
}

/* =========================
   End Hero (rewritten)
   ========================= */

.hero-content {
    position: static !important;
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 10 !important;
}

/* Force white hero banner wording (title, subtitle, badge) without affecting logo */
html body .hero .hero-container .hero-layout .hero-content,
html body .hero .hero-container .hero-layout .hero-content .hero-title,
html body .hero .hero-container .hero-layout .hero-content .hero-subtitle,
html body .hero .hero-container .hero-layout .hero-content .site-badge,
html body .hero .hero-container .hero-layout .hero-content .veteran-badge {
    color: #ffffff !important;
}
.hero-title {
    /* allow wrapping (desktop will keep it on one or two lines naturally) */
    white-space: normal;
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 1rem !important;
    text-align: center !important;
    width: 100% !important;
    font-weight: 700;
    line-height: 1.2;
    color: #fff; /* white title for readability */
}

.hero-subtitle {
    font-size: 1.25rem;
    text-align: center !important;
    margin-bottom: 2rem !important;
    width: 100% !important;
    opacity: 0.9;
    color: #fff; /* white subtitle for readability */
}

.hero-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #fff;
    color: #2d5016;
    border-color: #fff;
}

.btn-primary:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #2d5016;
}

.btn-full {
    width: 100%;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: #2d5016;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Make the card a positioning context for the clickable overlay */
    position: relative;
}
/* Service visibility toggle */
.services-grid .service-card.is-hidden {
    display: none !important;
}
/* Clickable overlay — ensure it sits above card content */
.services-grid .service-card .card-link {
    position: absolute;
    inset: 0;
    display: block;
    border-radius: inherit;
    text-indent: -9999px;
    z-index: 3;
    cursor: pointer;
}
.services-grid .service-card .card-link:focus-visible {
    outline: 3px solid #2d5016;
    outline-offset: 4px;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: #2d5016;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-title {
    font-size: 1.5rem;
    color: #2d5016;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-description {
    color: #666;
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #2d5016;
    font-weight: 500;
}

.feature i {
    color: #4a7c59;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background: #f8f9fa;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.faq-question {
    padding: 1.5rem;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question h3 {
    color: #2d5016;
    font-weight: 600;
    margin: 0;
}

.faq-question i {
    color: #2d5016;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: #2d5016;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.5rem;
}

.contact-details h3 {
    color: #2d5016;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-details p {
    color: #666;
    line-height: 1.6;
}

.contact-details a {
    color: #2d5016;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* Form Styles */
.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2d5016;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #2d5016;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo .logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-logo p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links ul li a:hover {
    opacity: 1;
}

.footer-contact a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

.footer-contact a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
    text-align: center;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 250px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.faq-item,
.contact-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* Services Section (ensure the section is styled even when using class 'services-section') */
.services-section {
    padding: 80px 0;
    background: #f8f9fa;
}
/* Services Grid and Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}
.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* positioning context for overlay link */
}
/* Clickable overlay — ensure it sits above card content */
.services-grid .service-card .card-link {
    position: absolute;
    inset: 0;
    display: block;
    border-radius: inherit;
    text-indent: -9999px;
    z-index: 3;
    cursor: pointer;
}
.services-grid .service-card .card-link:focus-visible {
    outline: 3px solid #2d5016;
    outline-offset: 4px;
}

/* Service visibility toggle */
.services-grid .service-card.is-hidden {
    display: none !important;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: #2d5016;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-title {
    font-size: 1.5rem;
    color: #2d5016;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-description {
    color: #666;
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #2d5016;
    font-weight: 500;
}

.feature i {
    color: #4a7c59;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background: #f8f9fa;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.faq-question {
    padding: 1.5rem;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question h3 {
    color: #2d5016;
    font-weight: 600;
    margin: 0;
}

.faq-question i {
    color: #2d5016;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: #2d5016;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.5rem;
}

.contact-details h3 {
    color: #2d5016;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-details p {
    color: #666;
    line-height: 1.6;
}

.contact-details a {
    color: #2d5016;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* Form Styles */
.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2d5016;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #2d5016;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo .logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-logo p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links ul li a:hover {
    opacity: 1;
}

.footer-contact a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

.footer-contact a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
    text-align: center;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 250px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.faq-item,
.contact-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* Photo Gallery */
.photo-gallery {
    margin-top: 24px;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gallery-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
/* Login/Admin toolbar visibility */
.gallery-login,
.gallery-admin,
.gallery-admin-add {
    display: none; /* toggled via JS */
    gap: 8px;
    align-items: center;
}
.gallery-toolbar .btn {
    white-space: nowrap;
}
/* When authenticated, we display admin sections as flex via innerHTML; JS toggles login visibility */
.gallery-admin,
.gallery-admin-add {
    display: flex;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    border: 1px solid #d9e2da;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #b3261e;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal {
    background: #fff;
    border-radius: 10px;
    width: 520px;
    max-width: 92vw;
    box-shadow: 0 8px 28px rgba(0,0,0,0.3);
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e0e6e2;
}
.modal-header h3 {
    margin: 0;
}
.modal-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.modal-body {
    padding: 16px;
}
.modal-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}
.modal-row {
    display: flex;
    gap: 10px;
    margin: 10px 0 14px;
}
.modal-row input {
    flex: 1;
}
.modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}
.modal-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.modal-divider {
    border: 0;
    border-top: 1px solid #e0e6e2;
    margin: 14px 0;
}
    // Support bulk uploads via photos[] and single upload via photo
    $uploaded = [];
    $errors = [];

    if (isset($_FILES['photos'])) {
        // Bulk uploads
        $names = $_FILES['photos']['name'];
        $tmps = $_FILES['photos']['tmp_name'];
        $errs = $_FILES['photos']['error'];

        if (is_array($names)) {
            foreach ($names as $idx => $origName) {
                $err = isset($errs[$idx]) ? $errs[$idx] : UPLOAD_ERR_OK;
                $tmp = isset($tmps[$idx]) ? $tmps[$idx] : null;

                if ($err !== UPLOAD_ERR_OK || !$tmp) {
                    $errors[] = ['name' => $origName, 'error' => 'Upload error'];
                    continue;
                }

                $name = sanitize_filename($origName);
                if (!$name) {
                    $errors[] = ['name' => $origName, 'error' => 'Unsupported file type'];
                    continue;
                }

                $target = $serviceDir . '/' . $name;
                if (!move_uploaded_file($tmp, $target)) {
                    $errors[] = ['name' => $origName, 'error' => 'Failed to save file'];
                    continue;
                }

                $uploaded[] = [
                    'name' => $name,
                    'url'  => '/gallery/' . $service . '/' . rawurlencode($name),
                ];
            }

            echo json_encode(['ok' => true, 'service' => $service, 'uploaded' => $uploaded, 'errors' => $errors]);
            break;
        }
    }

    if (isset($_FILES['photo'])) {
        // Single upload fallback
        $tmp = $_FILES['photo']['tmp_name'];
        $name = sanitize_filename($_FILES['photo']['name']);
        if (!$name) {
            http_response_code(400);
            echo json_encode(['error' => 'Unsupported file type']);
            exit;
        }

        $target = $serviceDir . '/' . $name;
        if (!move_uploaded_file($tmp, $target)) {
            http_response_code(500);
            echo json_encode(['error' => 'Failed to save file']);
            exit;
        }

        echo json_encode(['ok' => true, 'name' => $name, 'url' => '/gallery/' . $service . '/' . rawurlencode($name)]);
        break;
    }

    http_response_code(400);
    echo json_encode(['error' => 'Missing files. Use "photos[]" for bulk or "photo" for single upload.']);
    break;
// ... existing code ...var uploadSelectedBtn = container.querySelector('.gallery-upload-selected-btn');
var fileInput = container.querySelector('.gallery-file');
var logoutBtn = container.querySelector('.gallery-logout-gallery-btn');
var statusEl = container.querySelector('.upload-status');

if (uploadSelectedBtn) {
    uploadSelectedBtn.addEventListener('click', function () {
        if (!fileInput || !fileInput.files || fileInput.files.length === 0) {
            alert('Choose one or more images to upload');
            return;
        }
        if (statusEl) statusEl.textContent = 'Uploading ' + fileInput.files.length + ' file(s)...';
        uploadBulk(service, fileInput.files)
            .then(function (res) {
                if (res && res.ok) {
                    var uploadedCount = (res.uploaded && res.uploaded.length) || 0;
                    var errorCount = (res.errors && res.errors.length) || 0;
                    if (statusEl) statusEl.textContent = 'Uploaded: ' + uploadedCount + (errorCount ? (', Errors: ' + errorCount) : '');
                    initServiceGallery();
                } else {
                    alert('Upload failed: ' + (res && res.error ? res.error : 'Unknown error'));
                    if (statusEl) statusEl.textContent = '';
                }
            })
            .catch(function () {
                alert('Upload failed');
                if (statusEl) statusEl.textContent = '';
            });
    });
}
if (logoutBtn) {
    logoutBtn.addEventListener('click', function () {
        logout().then(function () {
            initServiceGallery();
        });
    });
}
// ... existing code ...
/* Status text for upload operations */
.upload-status {
    font-size: 13px;
    color: #2d5016;
}