/* Universal Box-Sizing and Smooth Scroll */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* --- Body and Global Styles --- */
body {
    font-family: 'Barlow', sans-serif;
    color: #013153; /* Default text color for the body */
    background-image: url('https://coachprimesolutions.com/media/cp-background-v3.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    /* Min-height ensures the background covers the viewport even if content is short */
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll due to animations/transforms */
    /* Added for mobile menu scroll lock */
    transition: overflow 0.3s ease;
}

/* Class to prevent scrolling when mobile menu is open */
body.no-scroll {
    overflow: hidden;
}

/* --- Animations (Global Keyframes) --- */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll-triggered animation base for general elements */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* When element is in view */
.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* --- Header Section --- */
header {
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 999;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 5vw, 2rem); /* Fluid padding for header */
    max-width: 1200px;
    height: auto;
    transition: background-color 0.3s ease;
}

/* Class added by JavaScript when scrolled */
header.scrolled {
    background-color: rgba(1, 49, 83, 0);
   /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); */
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    background-color: rgba(1, 49, 83, 0.5);
    padding: 10px 20px; /* Base padding */
    border-radius: 10px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Initial state for header content animation */
.logo,
.nav-links,
.button-sytle { /* Applies to buttons inside header for initial animation */
    opacity: 0;
    /* Transform will be set by specific animation keyframes */
}

/* Class added by JavaScript to trigger header animations */
header.is-in-view .logo {
    opacity: 1;
    transform: translateX(0);
    animation: slideInLeft 0.8s ease-out forwards;
}

header.is-in-view .nav-links {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.8s ease-out forwards 0.2s; /* Staggered */
}

header.is-in-view .button-sytle {
    opacity: 1;
    transform: translateX(0);
    animation: slideInRight 0.8s ease-out forwards 0.4s; /* Staggered */
}

/* --- Logo Part --- */
.logo {
    font-family: 'Albert Sans', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem); /* Fluid font size */
    font-weight: 500;
    display: flex;
    align-items: center;
}

.logo-img {
    width: clamp(50px, 10vw, 75px); /* Fluid width */
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: rotate(5deg);
}

.hyperlink-logo {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    padding-right: 10px;
    transition: color 0.3s ease;
}

.hyperlink-logo:hover {
    color: #09be3a;
}

/* --- Navigation Links --- */
.nav-links {
    font-family: 'Barlow', sans-serif;
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #09be3a;
    transform: translateY(-2px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #09be3a;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

/* --- Burger Menu Icon --- */
.burger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1000;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Burger menu animation (X transformation) */
.burger-menu.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* --- Global Section Padding --- */
section {
    padding: 6rem clamp(1rem, 5vw, 2rem); /* Fluid padding for sections */
    text-align: center;
    margin: 0 auto;
    max-width: 1200px;
    box-sizing: border-box; /* Ensures padding is included in width */
}

/* --- Global Headings --- */
h1 {
    font-size: clamp(2.5rem, 8vw, 6rem); /* Fluid H1 */
    margin-bottom: 1rem;
    color: #fff; /* Assuming H1s are in dark sections */
    line-height: 1.2;
    font-family: 'Albert Sans', sans-serif;
}

h2 {
    font-family: 'Albert Sans', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem); /* Fluid H2 */
    margin-bottom: 1rem;
    color: #3aab58;
    line-height: 1.3;
}

/* --- Global Button Styles --- */
.button-sytle,
button,
button-2,
button-3,
button-4 {
    /* Consolidate common button styles */
    border: none;
    padding: 1rem; /* Base padding */
    font-size: clamp(0.9rem, 1.8vw, 1.1rem); /* Fluid font size for buttons */
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Barlow', sans-serif;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Specific button styles */
.button-sytle { /* Used in header and other places */
    background-color: #09be3a; /* Green */
    color: #013153; /* Dark text */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.button-sytle:hover {
    background-color: #8acb2e; /* Darker green */
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button { /* General purpose button */
    background: #013153;
    color: #fff;
}
button:hover {
    background: #09be3a;
    color: #013153;
}

button-2 { /* Green background, white text */
    background: #34944e;
    color: #fff;
    font-size: clamp(1rem, 2vw, 1.5rem); /* Larger fluid font size for these buttons */
}
button-2:hover {
    background: #09be3a;
}

button-3 { /* White border, white text, transparent background */
    color: #fff;
    background: transparent;
    font-size: clamp(1rem, 2vw, 1.5rem); /* Larger fluid font size */
}
button-3:hover {
    border: 2px solid #09be3a;
    background-color: #09be3a;
    color: #013153;
}

button-4 { /* Dark green background, white text */
    background: #34944e;
    color: #fff;
}
button-4:hover {
    background: #3aab58;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem clamp(1rem, 5vw, 2rem); /* Fluid padding for footer */
    background: #013153;
    color: white;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem); /* Fluid font size */
}

/* --- Media Queries --- */

/* Tablet and Smaller Desktops (approx. 992px and below) */
@media (max-width: 992px) {
    header {
        padding: 1.5rem clamp(1rem, 3vw, 1.5rem); /* Adjust padding for smaller tablets */
    }

    .navbar {
        padding: 8px 15px; /* Smaller padding for navbar */
    }

    .nav-links {
        gap: 1rem; /* Slightly reduced gap between nav links */
    }

    .button-sytle {
        padding: 0.7em 1.2em; /* Smaller button padding */
        font-size: 1rem; /* Fixed font size for tablet buttons */
    }
}

/* Mobile Phones (approx. 768px and below) */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 10px; /* Even smaller padding for navbar */
    }

    .nav-links {
        display: none; /* Hide nav links by default for burger menu */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below the navbar */
        left: 0;
        width: 100%;
        background-color: rgba(1, 49, 83, 0.95); /* Darker background for menu */
        border-radius: 0 0 10px 10px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
        padding: 1rem 0;
        align-items: center; /* Center links */
        transition: transform 0.4s ease-out, opacity 0.4s ease-out;
        transform: translateY(-100%); /* Start off-screen above */
        opacity: 0;
        pointer-events: none; /* Disable interaction when hidden */
    }

    .nav-links.active {
        display: flex; /* Show menu when active */
        transform: translateY(0); /* Slide down */
        opacity: 1;
        pointer-events: all; /* Enable interaction */
    }

    .nav-links li {
        margin: 0.5rem 0; /* Space between stacked links */
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        padding: 0.5rem 0; /* Padding for click area */
        display: block;
        font-size: 1.1rem; /* Fixed font size for mobile menu links */
    }

    .button-sytle { /* The 'Get in Touch' button in the header */
        display: none; /* Hide main button on mobile to save space */
    }

    .burger-menu {
        display: flex; /* Show burger menu icon */
    }

    /* Adjust padding for header when burger menu is active to avoid jump */
    header.menu-open {
        /* This calculation is an estimate and might need fine-tuning based on actual content */
        padding-bottom: calc(2rem + 10px + 1rem + (6 * 0.5rem) + 1rem);
    }

    section {
        padding: 4rem clamp(0.5rem, 2vw, 1rem); /* Reduced section padding for mobile */
    }

    /* Ensure other button types also scale down */
    button,
    button-2,
    button-3,
    button-4 {
        font-size: 1rem;
        padding: 0.75rem;
    }
}