/* --- Color Palette & Variables --- */
:root {
    --sage-green: #8A9A86;
    --sage-light: #F4F6F4;
    --ocean-blue: #708090;
    --ocean-light: #EBF0F2;
    --earth-green: #14595D;
    --text-dark: #3A4138;
    --white: #FFFFFF;
    --black: #000000;
    
    /* Typography Variables */
    --font-artistic: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --header-logo-height: clamp(75px, 8vw, 100px);
    --header-padding-v: 0.75rem; /* Vertical padding */
    --header-height: calc(var(--header-logo-height) + (var(--header-padding-v) * 2));
}

/* --- Reset & Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: url('img/gradient.webp') no-repeat center center fixed;
    background-size: cover;
    line-height: 1.6;
    padding-top: var(--header-height); /* Dynamically offsets header */
}

/* Locks background scrolling AND prevents jumping to top */
body.modal-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
    touch-action: none;
}

/* Ensure modal content remains scrollable */
.modal-window {
    overflow-y: auto;
    touch-action: auto;
    -webkit-overflow-scrolling: touch;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Global Typography Consistency Upgrades --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-artistic);
}

input, textarea, button, select {
    font-family: var(--font-body);
}

/* --- Header Layout --- */
header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--header-padding-v) 2rem;
    display: flex;
    justify-content: center; 
}

.header-container {
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center; 
    width: 100%;
}

.logo a {
    display: block;
    cursor: pointer; 
}

.logo img {
    height: clamp(75px, 8vw, 100px); 
    width: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0; 
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    align-items: center;
}

nav li {
    display: flex;
    align-items: center;
}

nav li:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 20px; 
    background-color: var(--ocean-blue); 
    opacity: 0.55; 
    margin-left: 1.1rem; 
    pointer-events: none;
}

nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--earth-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    transition: color 0.3s ease;
    cursor: pointer;
}

nav a:hover {
    color: var(--sage-green);
}

.hamburger {
    display: none;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(44, 53, 41, 0.45), rgba(80, 95, 110, 0.35)), url('img/mournes.webp') no-repeat center center/cover;
    height: 50vh;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1.5rem;
    margin-top: 0; 
}

.hero h1 {
    font-family: var(--font-artistic);
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    color: var(--white);
    text-shadow: 0 2px 14px rgba(0,0,0,0.6);
    font-style: italic;
    max-width: 800px;
    white-space: normal;
}

/* --- Section Shared Styles --- */
section {
    padding: 3.5rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
    scroll-margin-top: 130px; 
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.6rem);
    color: var(--earth-green);
    margin-bottom: 2.5rem;
    position: relative;
    font-weight: 500;
}

.section-title:focus {
    outline: none;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--sage-green);
    margin: 0.6rem auto 0;
}

.welcome-logo {
    max-width: 100%;
    height: auto;
    max-height: 1.7em;
    vertical-align: bottom;
    display: inline-block;
    margin: 0 0.2em;
}

/* --- About Section --- */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-header-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.about-header-inline h3 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    color: var(--earth-green);
    font-style: italic;
    margin: 0;
    font-weight: 500;
}

.profile-pic-container {
    width: 120px; 
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.profile-pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-text p {
    max-width: 650px;       
    margin: 0 auto 1.2rem auto; 
    font-size: 1.05rem;
    color: var(--text-dark);
    text-align: left;    
}

/* --- Dynamic Layout Triggers & Segments --- */
.trigger-wrapper {
    text-align: center;
    margin-top: 1.5rem;
}

.custom-crisis-trigger {
    margin: -1rem auto 2.5rem auto;
}

.credential-segment {
    margin-bottom: 2rem;
}

.credential-segment:last-child {
    margin-bottom: 0;
}

.credential-segment h4 {
    font-family: var(--font-artistic);
    font-size: 1.4rem;
    color: var(--earth-green);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.credential-segment p {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    max-width: 100% !important;
}

.credential-segment ul {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}

.credential-segment li {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.credential-segment li:last-child {
    margin-bottom: 0;
}

.credential-segment li::before {
    content: "•";
    color: var(--sage-green);
    font-size: 1.3rem;
    position: absolute;
    left: 0;
    top: -2px;
}

.credential-link {
    color: var(--earth-green);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.credential-link:hover {
    color: var(--sage-green);
}

/* --- Services & Contact Banners --- */
.services {
    background-color: transparent;
    max-width: 100%;
}

.services-banner,
.contact-banner {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-width: 850px;
    width: 100%;
    margin: 0 auto 2rem auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    aspect-ratio: 16 / 7;
    min-height: 200px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* --- Services Banner --- */
.services-banner {
    background: linear-gradient(rgba(20, 30, 25, 0.1), rgba(20, 30, 25, 0.1)), 
                url('img/online-therapy-session-1.webp') no-repeat center center/cover !important;
    padding: 1.5rem 1.5rem 0.6rem 1.5rem;
    align-items: center;
    text-align: center;
}

.services-banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 750px;
    width: 100%;
}

.services-banner .services-title {
    color: var(--white);
    font-size: clamp(1.35rem, 4.5vw, 2.4rem) !important;
    margin-bottom: 0.1rem;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.services-banner .services-title::after {
    display: none;
}

.services-toggle-text {
    color: var(--white);
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.services-banner:hover .services-toggle-text {
    opacity: 1;
    transform: translateY(2px);
}

/* --- Contact Banner --- */
.contact-banner {
    background: linear-gradient(rgba(20, 30, 25, 0.1), rgba(20, 30, 25, 0.1)), 
                url('img/phone-call-2.webp') no-repeat center center/cover !important;
    padding: 1.5rem 3.5rem 1.5rem 1.5rem;
    align-items: flex-end;
    text-align: right;
}

.contact-banner-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    max-width: 750px;
    width: 100%;
}

.contact-banner .banner-title {
    color: var(--white);
    font-size: clamp(1.35rem, 4.5vw, 2.4rem) !important;
    margin-bottom: 0.2rem;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.contact-banner .banner-title::after {
    display: none;
}

.services-banner:hover,
.contact-banner:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

/* --- Services Grid & Cards --- */
.services-grid.is-hidden {
    display: none !important;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 850px;
    width: 100%;
    margin: 0 auto;
}

.service-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    display: block;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(20, 30, 25, 0.45));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: 12px;
}

.service-overlay h3 {
    color: var(--white);
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    margin: 0;
    line-height: 1.25;
}

.service-card-icon {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--earth-green);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-card-icon {
    background-color: var(--earth-green);
    color: var(--white);
    transform: scale(1.15) translate(1px, -1px);
}

/* --- Understanding Counselling Section --- */
#understanding-counselling {
    background-color: transparent;
    max-width: 1100px; 
}

.subtitle-text {
    max-width: 650px; 
    margin: -1rem auto 3rem auto;
    font-size: 1.15rem;
    color: var(--text-dark);
    line-height: 1.7;
    text-align: left; 
}

.side-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.side-list-item {
    background-color: var(--sage-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border-left: 4px solid var(--earth-green);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.side-list-item div {
    text-align: left;
}

.item-misconception {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--earth-green);
}

.item-reality {
    font-size: 1.05rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(140, 122, 107, 0.15);
}

.reality-label {
    font-family: var(--font-artistic);
    font-size: 1.15rem;
    color: var(--earth-green);
    font-style: italic;
    display: block;
    margin-bottom: 0.2rem;
}

.toggle-section-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
    background-color: var(--earth-green);
    color: var(--white);
    border: 2px solid var(--white);
    padding: 0.85rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-section-btn:hover {
    background-color: var(--white);
    color: var(--earth-green);
}

.toggle-section-btn .arrow-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.toggle-section-btn.crisis-btn:hover {
    background-color: var(--white);
    color: var(--earth-green);
    border-color: var(--earth-green);
}

/* --- Premium Modal Windows --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(58, 65, 56, 0.5);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-window {
    background-color: var(--white);
    border-radius: 12px;
    max-width: 850px;
    width: 90%;
    padding: 3.5rem 3rem 3rem 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--ocean-blue);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--earth-green);
}

.modal-window h3 {
    font-size: 2.2rem;
    color: var(--earth-green);
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
    text-align: center;
}

.modal-window p, .modal-window li {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    text-align: left; 
}

.modal-window ul {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.modal-window li {
    margin-bottom: 0.5rem;
}

.btn-modal-action {
    display: block; 
    max-width: 260px;
    background-color: var(--earth-green);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin: 0.5rem auto 0 auto;
    text-align: center;
}

.btn-modal-action:hover {
    background-color: #768572;
}

/* --- Contact Form Section --- */
.contact-body-text {
    color: var(--text-dark);
    max-width: 750px;
    margin: 0 auto 2.5rem auto;
    font-size: 1.15rem;
    line-height: 1.7;
    text-align: center;
}

.contact-intro-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    gap: 1.5rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 2rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--earth-green);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--sage-light);
}

.form-group input:required, 
.form-group textarea:required {
    border-left: 3px solid var(--earth-green);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--sage-green);
}

button.btn-submit {
    background-color: var(--earth-green);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
}

button.btn-submit:hover {
    background-color: #768572;
}

.textarea-group {
    display: flex;
    flex-direction: column;
}

.form-helper-text {
    font-size: 0.85rem;
    color: var(--ocean-blue); 
    font-style: italic;
    margin-top: 0.4rem;
    display: block;
}

/* --- Testimonials Section --- */
#testimonials {
    background-color: transparent;
    max-width: 900px; 
    margin: 0 auto;
    text-align: center;
    padding-bottom: 2rem;
}

.testimonials-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3.5rem; 
}

.testimonials-window {
    width: 100%;
    overflow: hidden; 
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.testimonials-track {
    display: flex;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); 
    will-change: transform;
}

.testimonial-card {
    flex: 0 0 100%; 
    width: 100%;
    background-color: var(--sage-light);
    padding: 2.5rem 2rem;
    border-top: 3px solid var(--earth-green);
    box-sizing: border-box;
}

.testimonial-text {
    font-family: var(--font-artistic);
    font-size: 1.25rem;
    color: var(--text-dark);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--earth-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--earth-green);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    z-index: 10;
}

.nav-btn:hover {
    background-color: var(--earth-green);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.prev-btn { left: 0; }
.next-btn { right: 0; }

#crisis-modal .modal-window {
    max-width: 600px;
    border-top: 4px solid var(--earth-green);
}

.crisis-modal-text {
    text-align: center !important;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* --- Footer Layout --- */
footer {
    background-color: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-dark);
    padding: 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.footer-logos {
    display: flex;         
    flex-wrap: nowrap;     
    justify-content: center; 
    align-items: center;
    gap: 2.5rem;           
    width: 100%;
}

.footer-logos img {
    height: 60px;          
    width: auto;
    display: block;
    object-fit: contain;
}

.footer-logos a[href*="counselling-directory"] img {
    height: 42px;
}

.footer-text {
    text-align: center;
}

footer a {
    color: var(--text-dark);
    text-decoration: underline;
    cursor: pointer;
}

footer a:hover {
    color: var(--sage-green);
}

/* --- Privacy Policy View --- */
#privacy-view {
    display: none;
    padding: 4rem 2rem;
    background-color: transparent;
    min-height: 100vh;
}

.privacy-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.privacy-container h1, .privacy-container h2 {
    color: var(--earth-green);
}

.privacy-container h1 {
    border-bottom: 2px solid var(--earth-green);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
}

.privacy-container h2 {
    color: var(--earth-green);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.privacy-container p, .privacy-container li {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.privacy-container ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn-back {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--ocean-blue);
    font-weight: 600;
    cursor: pointer;
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

.btn-back:hover {
    color: var(--sage-green);
}

#thanks-modal .modal-window {
    text-align: center;
    max-width: 500px;
}

#thanks-modal p {
    text-align: center;
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

/* --- Mobile Responsiveness Breakpoints --- */
@media (max-width: 1040px) {
    :root {
        --header-padding-v: 0.5rem; /* Automatically updates --header-height and body padding */
    }
    header {
        padding: var(--header-padding-v) 1.5rem;
    }

    /* Tighten general section padding & scroll offsets on mobile */
    section {
        padding: 2rem 1rem;
        scroll-margin-top: 100px;
    }

    .section-title {
        margin-bottom: 1.5rem;
    }

    .subtitle-text {
        margin: -0.5rem auto 1.75rem auto;
    }

    .about-header-inline {
        flex-direction: column-reverse; 
        gap: 1rem;
        margin-bottom: 1.25rem;
    }

    .custom-crisis-trigger {
        margin: -0.5rem auto 1.5rem auto;
    }

    .contact-body-text,
    .contact-intro-container {
        margin-bottom: 1.5rem;
    }

    header {
        padding: 0.5rem 1.5rem;
    }

    .header-container {
        position: relative;
    }

    .hamburger {
        background: none;
        border: none;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 18px;
        cursor: pointer;
        z-index: 2500;
        padding: 0;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--earth-green);
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    nav ul {
        display: none; 
        position: absolute;
        top: 100%;
        left: 0;          
        width: 100%;      
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        gap: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        padding: 0.5rem 0;
        z-index: 9999; 
    }

    nav ul.is-active {
        display: flex !important;
    }

    nav li {
        width: 100%;
        justify-content: center;
    }

    nav li:not(:last-child)::after {
        content: none;
    }

    nav a {
        display: block;
        padding: 1rem 0;
        width: 100%;
        text-align: center;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }

    .hamburger.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger.is-active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .services-banner,
    .contact-banner {
        aspect-ratio: 16 / 9;
        margin-bottom: 1.25rem;
    }

    .services-banner {
        padding: 1rem 1rem 0.5rem 1rem;
    }

    .contact-banner {
        padding: 1rem 1.5rem 1rem 1rem;
    }

    .modal-window {
        padding: 2.5rem 1.5rem;
        width: 92%;
    }
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        gap: 1rem;
    }

    .service-card {
        aspect-ratio: 16 / 6;
    }
}

@media (max-width: 600px) {
    section {
        padding: 1.75rem 0.85rem;
    }

    .section-title {
        margin-bottom: 1.25rem;
    }

    .testimonials-wrapper {
        padding: 0 1rem;
    }

    .nav-btn {
        display: none;
    }

    .footer-logos {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}

@media (min-width: 1040px) {
    .header-container {
        justify-content: center;
        gap: 4rem;
    }
}