/*ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* VISIBILITY UTILITIES
   Component Separation Classes */
/* Desktop-only: visible on tablet+ (768px+), hidden on mobile */
.desktop-only {
    display: block;
}

/* Mobile-only: visible on mobile (<768px), hidden on tablet+ */
.mobile-only {
    display: none;
}

@media screen and (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    /* MOBILE-ONLY SECTION STYLING
       Completely isolated from desktop */
    .section-mobile {
        display: block;
        /* Changed from flex to block for float compatibility */
        padding: 2rem 5%;
    }

    .section-mobile .sectionhead {
        text-align: center;
        margin-bottom: 1rem;
    }



    /* GRID LAYOUT: Heading + Image | Text */
    .image-text-pair {
        display: grid;
        grid-template-columns: 0.8fr 1.2fr;
        /* Image gets more space (approx 60%) */
        align-items: center;
        /* Center vertically */
        gap: 1rem;
        /* Space between items */
    }

    .image-text-pair .sectionhead {
        grid-column: 1;
        grid-row: 1;
        text-align: left;
        margin-bottom: 0;
        /* Remove bottom margin for grid alignment */
    }

    .image-text-pair figure {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        margin: 0;
        /* Reset margins */
    }

    .image-text-pair .sectionsub {
        grid-column: 1 / -1;
        /* Span full width */
        grid-row: 2;
        margin-top: 1rem;
        text-align: left;
        margin-bottom: 0.25rem;
        /* Reduced bottom margin */
    }

    /* Clearfix after image-text-pair to prevent float bleed */
    .image-text-pair::after {
        content: "";
        display: table;
        clear: both;
    }

    .section-mobile form {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        margin-top: 0.5rem;
        gap: 0.5rem;
        /* Space between buttons */
    }

    .section-mobile form button {
        /* Fixed 50% width to match paired buttons */
        width: calc(50% - 0.25rem);
        flex: none;
        /* Disable flex grow/shrink */
        padding: 1.2em 0.5em;
        /* Increased padding (0.9 -> 1.2) */
        white-space: nowrap;
        /* Prevent text wrap inside button */
        min-width: 0;
        /* Allow shrinking */
    }

    /* QUOTE PILL */
    .quotes {
        margin: 2rem 5% !important;
        padding: 1.2rem 1.5rem !important;
        border-radius: 50px !important;
        text-align: center !important;
    }

    #thequote {
        font-size: 0.85rem !important;
        white-space: normal !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }

    #thequote br {
        display: none !important;
    }

    #auther {
        font-size: 0.9rem !important;
        align-self: center !important;
        text-align: center !important;
        margin-top: 0.8rem !important;
        white-space: normal !important;
    }

    /* FOOTER THEME - DESKTOP MATCH */
    .custom-footer {
        background-color: #000 !important;
        color: #fff !important;
    }

    .footer-header {
        color: #fff !important;
    }

    .column .heading {
        color: #92EEAF !important;
    }

    .col a {
        color: #ccc !important;
    }

    /* Location button for black bg */
    .location-button .b {
        background-color: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }

    /* Social Pills - match footer theme */
    .social-pills .pill {
        background-color: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }

    #copyright {
        background-color: #111 !important;
        color: #888 !important;
    }
}

/* BUTTONS (Mobile Defaults) */
.but,
.herobut,
.b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.8em 1.5em;
    margin-right: 0.5em;
    gap: 0.5rem;
}

.but {
    background: linear-gradient(90deg, #0C5C3E, #92EEAF);
    color: #ffffff;
    border: none;
}

.herobut {
    background-color: transparent;
    color: #0C5C3E;
    border: 2px solid #0C5C3E;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    color: #fff;
    border: 2px solid #fff;
    padding: 0.5em 1em;
    border-radius: 50px;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.but:hover,
.herobut:hover,
.pill:hover,
.b:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* LAYOUT CONTAINERS */
.content {
    width: 100%;
    padding: 0;
}

header .content {
    width: auto;
    margin: 0;
    padding: 0;
}

/* HEADER & NAV (Mobile) */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: relative;
    z-index: 100;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
    white-space: nowrap;
}

/* Hamburger Menu Icon */
.menu {
    display: block;
    width: 30px;
    height: 25px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    /* Above nav-menu */
}

.bar1,
.bar2,
.bar3 {
    width: 100%;
    height: 3px;
    background-color: #0C5C3E;
    /* Default darker green */
    position: absolute;
    transition: 0.4s ease;
    left: 0;
    border-radius: 2px;
}

.bar1 {
    top: 0;
}

.bar2 {
    top: 11px;
}

.bar3 {
    top: 22px;
}

/* Hamburger Animation */
.menu.change .bar1 {
    top: 11px;
    transform: rotate(-45deg);
    background-color: #fff;
}

.menu.change .bar2 {
    opacity: 0;
}

.menu.change .bar3 {
    top: 11px;
    transform: rotate(45deg);
    background-color: #fff;
}

/* Mobile Navigation Overlay */
.nav-menu {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(12, 92, 62, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.nav-menu.active {
    display: flex;
}

.nav-menu ul {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-menu a {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
    text-decoration: none;
    display: block;
    transition: color 0.3s;
}

.nav-menu a:hover,
#now {
    color: #92EEAF;
}

/* Body Lock */
body.menu-open {
    overflow: hidden;
}

/*SECTIONS (Default/Desktop Base) */
#hero,
#about,
#service,
#why {
    display: flex;
    flex-direction: row;
    padding: 2rem 5%;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

#about,
#why {
    flex-direction: row-reverse;
}

.txt,
figure {
    flex: 1;
}

/* MOBILE ONLY (max-width: 767px)
   Structural alignment - ISOLATED */
@media screen and (max-width: 767px) {

    #hero,
    #about,
    #service,
    #why {
        display: grid;
        grid-template-columns: 1fr 1fr;
        flex-direction: unset;
        /* Reset flex direction */
        gap: 1rem;
        align-items: start;
        /* Top align at container level */
    }

    /* Unwrap .txt to allow grid placement of children */
    #hero .txt,
    #about .txt,
    #service .txt,
    #why .txt {
        display: contents;
    }

    /* Heading: Full width, Row 1 */
    #hero .sectionhead,
    #about .sectionhead,
    #service .sectionhead,
    #why .sectionhead {
        grid-column: 1 / -1;
        order: 1;
        text-align: center;
    }

    /* Image: Left column, Row 2 */
    #hero figure,
    #about figure,
    #service figure,
    #why figure {
        grid-column: 1;
        order: 2;
        margin: 0;
        align-self: start;
        /* CRITICAL: Top edge alignment */
    }

    /* Paragraph: Right column, Row 2 - aligned with image top */
    #hero .sectionsub,
    #about .sectionsub,
    #service .sectionsub,
    #why .sectionsub {
        grid-column: 2;
        order: 2;
        margin: 0;
        align-self: start;
        /* CRITICAL: Top edge alignment */
        text-align: left;
    }

    /* Form/Buttons: Full width, Row 3 */
    #hero form,
    #about form,
    #service form,
    #why form {
        grid-column: 1 / -1;
        order: 3;
        width: 100%;
        text-align: center;
    }
}

.sectionhead {
    font-size: 2rem;
    font-weight: 700;
    color: #0C5C3E;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.sectionhead span {
    display: block;
    font-size: 0.8em;
    color: #808080;
    font-weight: 500;
}

.sectionsub {
    font-size: 1rem;
    color: #4A4A4A;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.txt form {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.but,
.herobut {
    width: 100%;
    /* Full width buttons on small mobile */
    max-width: 300px;
    margin-right: 0;
    margin-bottom: 0.5rem;
    text-align: center;
    justify-content: center;
}

/* BOXES / FEATURES */
#space {
    padding: 2rem 5%;
}

.boxes {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.box1,
.box2,
.box3 {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
    /* Box colors */
}

.box1:hover,
.box2:hover,
.box3:hover {
    transform: scale(1.1);
}

.box1 {
    background-color: #E5E5E5;
}

.box2 {
    background-color: #E6F2FF;
}

.box3 {
    background-color: #FFF3E0;
}

.boxes i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #0C5C3E;
}

.boxes p {
    font-size: 1rem;
    line-height: 1.5;
}

/* QUOTE & FOOTER */
.quotes {
    margin: 3rem 5%;
    padding: 1.5rem 4rem;
    background: linear-gradient(90deg, #3f7678, #92EEAF);
    border-radius: 100px;
    color: #fff;
    text-align: left;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#thequote {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    white-space: nowrap;
}

#auther {
    font-size: 1.3rem;
    font-weight: 400;
    align-self: flex-end;
    margin-top: 0.5rem;
    opacity: 0.95;
    white-space: pre;
}

/* Footer (Mobile) */
.custom-footer {
    background-color: #000;
    color: #fff;
    padding: 3rem 5%;
}

.footer-header {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #fff;
}

.footer-columns {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.column .heading {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #92EEAF;
}

.col li {
    list-style: none;
    margin-bottom: 0.8rem;
}

.col a {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.col a:hover {
    color: #0C5C3E;
}

.social-pills {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-pills i {
    font-size: 1.5rem;
}

.fa-facebook {
    color: #0866FF;
}

.fa-square-instagram {
    color: #FF0069;
}

.location-button .b {
    background-color: #000;
    border: 2px solid #fff;
    color: #fff;
    width: 100%;
}

#copyright {
    background-color: #111;
    color: #888;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}

/* TABLET RESPONSIVE (min-width: 600px) */
@media screen and (min-width: 600px) {

    /* Tablet grid layout from original design */
    #hero,
    #about,
    #service,
    #why {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "header image"
            "text text"
            "buttons buttons";
        align-items: center;
        gap: 2rem;
    }

    .sectionhead {
        grid-area: header;
        font-size: 2.5rem;
        margin: 0;
    }

    figure {
        grid-area: image;
        justify-self: end;
    }

    .sectionsub {
        grid-area: text;
        font-size: 1.1rem;
    }

    .txt form {
        grid-area: buttons;
    }

    .but,
    .herobut {
        width: auto;
        min-width: 160px;
    }

    /* Boxes as 2 columns */
    .boxes {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .box3 {
        grid-column: span 2;
    }

    .quotes {
        padding: 2rem 5rem;
    }
}


/* DESKTOP RESPONSIVE (min-width: 1024px) */
@media screen and (min-width: 1024px) {

    /* Header */
    header {
        padding: 2% 10%;
    }

    .menu {
        display: none;
    }

    /* Hide hamburger */

    .nav-menu {
        display: flex;
        /* Always visible */
        position: static;
        width: auto;
        height: auto;
        background: none;
        backdrop-filter: none;
        flex-direction: row;
    }

    .nav-menu ul {
        flex-direction: row;
        gap: 5vw;
    }

    .nav-menu a {
        font-size: 1.46vw;
        color: #333333;
        transition: transform 0.3s ease, color 0.3s ease;
    }

    .nav-menu a:hover,
    #now {
        color: #0C5C3E;
        transform: scale(1.1);
    }

    header h1 {
        font-size: 1.8vw;
    }

    /* Sections: Side-by-Side Flex */
    #hero,
    #about,
    #service,
    #why {
        display: flex;
        flex-direction: row;
        padding: 4vw 10%;
        text-align: left;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }

    /* Reverse logic for alternating layout */
    #about,
    #why {
        flex-direction: row-reverse;
    }

    /* Restore .txt wrapper for desktop */
    .txt {
        display: block;
        flex: 1;
    }

    figure {
        flex: 1;
    }

    /* Restore heading alignment */
    #hero .sectionhead,
    #about .sectionhead,
    #service .sectionhead,
    #why .sectionhead {
        text-align: left;
    }

    /* Text Styling Restore */
    .sectionhead {
        font-size: 4vw;
        /* large desktop headings */
        margin-bottom: 2vh;
    }

    .sectionhead span {
        font-size: 3vw;
        display: block;
        color: #808080;
    }

    .sectionsub {
        font-size: 1.2vw;
        margin-bottom: 3vh;
        max-width: 90%;
    }

    /* Buttons */
    .but,
    .herobut {
        font-size: 1vw;
        padding: 1.5vh 2.5vw;
        width: auto;
    }

    /* Boxes */
    #space {
        padding: 3% 10%;
    }

    .boxes {
        display: flex;
        flex-direction: row;
        gap: 2rem;
    }

    .box3 {
        grid-column: auto;
    }

    /* reset grid span */

    .boxes i {
        font-size: 3vw;
        margin-right: 0;
        margin-bottom: 1.5rem;
    }

    .box1,
    .box2,
    .box3 {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 3rem;
        height: 35vh;
    }

    .box1 i {
        margin-right: 0;
    }

    /* Quote */
    .quotes {
        flex-direction: column;
        padding: 2rem 6rem;
        margin: 4rem 10%;
        justify-content: center;
        align-items: flex-start;
        height: auto;
        border-radius: 100px;
    }

    #thequote {
        font-size: 3.5vw;
        text-align: left;
        margin: 0 0 1rem 0;
        width: 100%;
    }

    #auther {
        position: absolute;
        bottom: 1.5rem;
        right: 4rem;
        font-size: 1.6vw;
        width: auto;
    }

    /* Footer */
    .custom-footer {
        background-color: transparent;
        color: #000;
        padding: 3% 10%;
    }

    .footer-header {
        color: #0C5C3E;
        font-size: 1.8vw;
        text-align: center;
    }

    .footer-columns {
        flex-direction: row;
        justify-content: space-around;
    }

    .column .heading {
        color: #000;
        font-size: 1.2vw;
    }

    .col a {
        color: #333;
        font-size: 1.1vw;
    }

    .social-pills .pill {
        background: #fff;
        color: #0C5C3E;
        border: 2px solid #0C5C3E;
        padding: 0.5em 1.5em;
        /* Restore desktop padding */
    }

    .location-button .b {
        background: #fff;
        color: #0C5C3E;
        border: 2px solid #0C5C3E;
        width: auto;
        padding: 0.5em 1.5em;
    }

    #copyright {
        background-color: rgba(12, 92, 62, 0.8);
        color: #fff;
        margin-top: 2rem;
    }
}

/* Sticky WhatsApp Icon */
.sticky-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.sticky-whatsapp:hover {
    transform: scale(1.1);
}

.sticky-whatsapp img {
    width: 35px;
    height: 35px;
}

/* SCROLL ANIMATIONS */
picture {
    display: block;
    /* Ensure transform works */
}

.fade-in {
    opacity: 0 !important;
    transform: translateY(30px) !important;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out !important;
    will-change: opacity, transform;
    visibility: visible !important;
    /* Force visibility so can animate opacity */
}

.fade-in.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* TOOLTIPS (Merged) */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* Tooltip Arrow */
[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

[data-tooltip]:hover::before {
    opacity: 1;
}