@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100..900;1,100..900&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Raleway:ital,wght@0,100..900;1,100..900&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&display=swap');

/* ==========================================================================
   1. Base Styles, Resets, and Global Variables
   ========================================================================== */

/* -----------------------Reset and Base Styles-------------------------------- */
* {
    margin: 0;
}

/* sensible global box-sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ----- Layout variables (CSS Custom Properties) ----- */
:root {
    --hamburger-width: 40px;
    --hamburger-height: 34px;
    --hamburger-padding: 4px;
    --hamburger-box-width: 30px;
    --hamburger-box-height: 20px;
    --hamburger-bar-height: 2.5px;
    --hamburger-bar-color: #333;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Typography Rules */
h1 {
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    font-style: normal;
    line-height: 1.2;
    color: #9c91a3;
}

h2 {
    font-family: "Bitter", serif;
    font-weight: 400;
}

h3 {
    font-family: "Inter", sans-serif;
    color: #3c3636;
    font-weight: 300;
}

h4 {
    font-family: "PT Sans", sans-serif;
    font-weight: 400;
}

h5 {
    font-family: "DM Sans", sans-serif;
    font-weight: 300;
}

h6 {
    font-family: "Red Hat Display", sans-serif;
    font-weight: 300;
    font-style: italic;
}

p {
    font-family: 'Inter', sans-serif;
}

/* Inline form error styling added for client-side validation */
.field-error {
    display: block;
    color: #b2186d;
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: static;
    left: 0;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    background: #000;
    color: #fff;
    z-index: 2000;
}

/* Responsive images */
.logo-img,
.footer-logo-img {
    max-width: 100%;
    height: auto;
}

/* Hero background images should cover their container */
.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   2. Header and Navigation Components (Base/Mobile-First Styles)
   ========================================================================== */

/* ---------------- Base Navbar Styles ---------------- */
.navbar {
    background-color: #fff;
    position: sticky;
    top: 0;
    /* Raised z-index to ensure the navbar remains above page overlays on all pages */
    z-index: 2000;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-img {
    height: 55px;
    border-radius: 0px;
    object-fit: cover;
}

.logo-img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}


/* Nav Menu (Mobile-First Default) */
.nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #fff;
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid #eee;
    position: absolute;
    top: 100%;
    left: 2;
    z-index: 999;
}

/* Nav links animation (mobile/dropdown) */
.nav-menu.active .nav-link {
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInLinks 0.3s forwards;
}

.nav-menu.active .nav-link:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-menu.active .nav-link:nth-child(2) {
    animation-delay: 0.2s;
}

.nav-menu.active .nav-link:nth-child(3) {
    animation-delay: 0.3s;
}

.nav-menu.active .nav-link:nth-child(4) {
    animation-delay: 0.4s;
}

.nav-menu.active .nav-link:nth-child(5) {
    animation-delay: 0.5s;
}

.nav-menu.active .nav-link:nth-child(6) {
    animation-delay: 0.6s;
}

.nav-menu.active .nav-link:nth-child(7) {
    animation-delay: 0.7s;
}

.nav-menu.active .nav-link:nth-child(8) {
    animation-delay: 0.8s;
}

/* Keyframes */
@keyframes fadeInLinks {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dropdown {
    from {
        transform: translateY(-6px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.6rem 0.5rem;
    color: #222;
    display: block;
    border-radius: 8px;
}

.nav-link:hover {
    color: #007bff;
    /* Base hover color */
}

.nav-link:hover,
.nav-link:focus {
    background: rgba(178, 24, 109, 0.06);
    color: var(--accent);
    outline: none;
}


/* Hamburger (Mobile-First Default) */
.hamburger {
    /* mobile-first: show hamburger by default - now an animated button */
    display: block;
    width: var(--hamburger-width);
    height: var(--hamburger-height);
    padding: var(--hamburger-padding);
    border: none;
    background: transparent;
    cursor: pointer;
}

/* Hamburger lines */
.hamburger-box {
    display: inline-block;
    position: relative;
    width: var(--hamburger-box-width);
    height: var(--hamburger-box-height);
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: var(--hamburger-box-width);
    height: var(--hamburger-bar-height);
    background-color: var(--hamburger-bar-color);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: transform 0.28s ease, opacity 0.18s ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    content: '';
    top: -8px;
}

.hamburger-inner::after {
    content: '';
    top: 8px;
}

/* Open state */
.hamburger.open .hamburger-inner {
    background: transparent;
}

.hamburger.open .hamburger-inner::before {
    transform: translateY(10px) rotate(45deg);
}

.hamburger.open .hamburger-inner::after {
    transform: translateY(-10px) rotate(-45deg);
}


/* ==========================================================================
   3. Footer Component (Base Styles)
   ========================================================================== */

/* ----------------------------- Footer compactness override ----------------------------- */
/* Apply a compact typographic scale for the footer across all breakpoints */
.footer-section h4 {
    font-size: 0.95rem !important;
    margin-bottom: 6px !important;
}

.footer-section ul li a,
.footer-section p,
.footer-bottom p {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
}

.footer-logo-img {
    height: 48px !important;
}

.social-icon {
    width: 36px !important;
    height: 36px !important;
}

/* Designer credit link: ensure white color and good contrast in footer */
.footer-bottom a[href*="eahwebdesigns.co.za"] {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.footer-bottom a[href*="eahwebdesigns.co.za"]:hover {
    color: #ffffff !important;
    opacity: 0.9;
}


.footer {
    background: #1f2937;
    color: white;
    padding: 0.6rem 1rem;
    /* responsive padding */
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 20px;
}

.footer-section h4 {
    color: white;
    margin: 0 0 8px 0;
    font-size: 1rem;
    text-decoration: underline;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 4px;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-logo-img {
    height: 50px;
    margin-bottom: 10px;
    border-radius: 8px;
}

.footer-help-btn:hover {
    background: #962f5d;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 10px 0;
    pointer-events: auto;
    z-index: 10;
    /* make sure it’s above any overlays */
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #374151;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #b2186d;
    transform: translateY(-2px);
}

.footer-divider {
    border: none;
    height: 1px;
    background: #374151;
    margin: 10px auto;
    width: 90%;
}

.footer-bottom {
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 4px 0;
}

/* =========================================================
   BASE STYLES (Apply to all screens)
   ========================================================= */
html {
    font-size: 16px;
}

body {
    font-size: 1rem;
}

/* Add your base navbar/footer styles here (not inside queries) */
/* Example:
.nav-menu { display: flex; }
.hamburger { display: none; }
*/


/* =========================================================
   ========== 0px – 479px : Small Mobile ====================
   ========================================================= */
@media (max-width: 479px) {
    html {
        font-size: 14px;
    }

    body {
        font-size: .95rem;
    }

    /* Navbar */
    .navbar {
        padding: .6rem .5rem;
        height: 70px;
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        text-align: center;
        padding: 1rem 0;
        border-top: 1px solid #eee;
        margin: 3px -21px;
        line-height: 1;
        border-radius: 24px;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: block;
        width: 44px;
        height: 36px;
        padding: 6px;
    }

    .nav-link {
        padding: .6rem 0;
        font-size: 1rem;
    }

    .logo-img {
        height: 26px;
    }

    /* Footer */
    .footer {
        padding: .5rem .75rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: .75rem;
    }

    .footer-section h4 {
        font-size: 1rem;
    }
}

/* =========================================================
   ========== 480px – 729px : Large Mobile / Small Tablet ===
   ========================================================= */
@media (min-width: 480px) and (max-width: 729px) {
    html {
        font-size: 15px;
    }

    /* Navbar */
    .nav-container {
        flex-wrap: wrap;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        text-align: center;
        padding: 1rem 0;
        border-top: 1px solid #eee;
        margin: 3px -16px;
        line-height: 1;
        border-radius: 21px;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: block;
        width: 44px;
        height: 36px;
        padding: 6px;
    }

    .nav-link {
        padding: .6rem 0;
        font-size: 1rem;
    }

    .logo-img {
        height: 40px;
    }

    /* Footer */
    .footer {
        padding: 1.2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    .footer-logo-img {
        height: 45px;
    }
}


/* =========================================================
   ========== 730px – 1000px : Tablets ======================
   ========================================================= */
@media (min-width: 730px) and (max-width: 1000px) {
    html {
        font-size: 16px;
    }

    /* Navbar */
    .navbar {
        padding: 0;
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .hamburger {
        display: block;
        font-size: 30px;
    }

    .logo-img {
        height: 50px;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        padding: 1rem 0;
        text-align: center;
        border-top: 1px solid #eee;
        border-radius: 15px;
        line-height: 1.0;
        margin: 3px -16px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        font-size: 1.5rem;
        padding: .5rem 0;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-section h4 {
        font-size: 1.3rem;
    }

    .footer-logo-img {
        height: 60px;
    }
}


/* =========================================================
   ========== 1001px – 1216px : Small Desktop ===============
   ========================================================= */
@media (min-width: 1001px) and (max-width: 1216px) {

    /* Navbar */
    .hamburger {
        display: none;
    }

    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 1rem;
    }

.nav-menu {
        display: contents;
        gap: 1rem;
    }

    .nav-link {
        font-size: 1rem;
        white-space: nowrap;
        padding: .5rem .75rem;
    }

    .logo-img {
        height: 50px;
        /* keep logo from shrinking and give some breathing room to the menu */
        flex: 0 0 auto;
        margin-right: 0.75rem;
    }

    /* Footer */
    .footer {
        padding: 1.2rem;
    }

    .footer-section h4 {
        font-size: 1.5rem;
    }

    .footer-logo-img {
        height: 80px;
    }
}


/* =========================================================
   ========== 1217px – 2000px : Desktop =====================
   ========================================================= */
@media (min-width: 1217px) and (max-width: 2000px) {

    /* Navbar */
    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
    }

    .hamburger {
        display: none;
    }

    .logo-img {
        height: 60px;
    }

    .nav-menu {
        display: contents;
        gap: 1rem;
    }

    .nav-link {
        font-size: 1.1rem;
    }

    /* Footer */
    .footer {
        padding: 4rem;
    }

    .footer-content {
        gap: 2.5rem;
    }

    .footer-section h4 {
        font-size: 1.8rem;
    }

    .footer-logo-img {
        height: 80px;
    }
}


/* =========================================================
   ========== 2000px+ : Ultra Large Screens =================
   ========================================================= */
@media (min-width: 2000px) {

    /* Navbar */
    .nav-container {
        padding: 4rem;
    }

    .logo-img {
        height: 100px;
    }

    .nav-link {
        font-size: 3rem;
    }

    /* Footer */
    .footer {
        padding: 5rem;
    }

    .footer-content {
        gap: 4rem;
    }

    .footer-section h4 {
        font-size: 2.5rem;
    }

    .footer-logo-img {
        height: 150px;
    }
}