/* Responsive Styles */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 5rem;
    }

    body {
        overflow-x: hidden;
        /* Prevent any horizontal scroll on mobile */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    /* Show hamburger pinned to the right */
    .hamburger {
        display: flex !important;
        margin-left: auto;
    }

    /* Show logo image + brand text on mobile */
    .logo-brand {
        display: block;
        font-size: 0.92rem;
    }

    .logo-img {
        height: 34px;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(253, 251, 247, 0.98);
        backdrop-filter: blur(12px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease;
        pointer-events: none;
    }

    /* Open state */
    .navbar.nav-open .nav-links {
        max-height: 400px;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        color: var(--color-text-primary) !important;
        text-shadow: none !important;
        letter-spacing: 0.5px;
    }

    .nav-links a.active {
        color: var(--color-accent-gold) !important;
    }

    /* Make the CTA button full-width inside the menu */
    .nav-links .btn-primary {
        display: block;
        margin: 1rem 1.5rem;
        width: calc(100% - 3rem);
        text-align: center;
        border-radius: 4px;
    }

    .navbar {
        height: var(--header-height);
        padding: 0;
        position: fixed;
        /* transparent by default — ::before gradient + ::after white bg handle the rest */
    }

    /* Row layout: logo left, hamburger right */
    .navbar .container {
        flex-direction: row;
        align-items: center;
    }

    /* Hamburger bars white on transparent navbar, dark once scrolled */
    .navbar:not(.scrolled) .hamburger span {
        background: #ffffff;
    }

    #about-portrait-img {
        width: 100% !important;
    }

    .form-wrapper {
        width: 100% !important;
        padding: 0 1rem;
    }

    /* Tighten Certification Badges on Mobile */
    #credentials .logo-grid {
        gap: 2rem !important;
        /* Reduce gap significantly */
    }

    #credentials .credential-item img {
        max-height: 50px !important;
        /* Scale down slightly for a neat single row */
    }

    /* Override split layouts to stack on mobile - use flexbox with order for clean stacking */
    .split-layout,
    .split-layout.reverse {
        display: flex;
        flex-direction: column;
        direction: ltr;
        text-align: left;
    }

    /* Always show image BELOW text on mobile regardless of desktop layout */
    .split-layout .split-content {
        order: 1;
    }

    .split-layout .split-image {
        order: 2;
        margin-top: var(--spacing-lg);
        padding-left: 0;
    }

    #about .split-image {
        padding-left: 0;
    }
}

/* Default Desktop sizing for form-wrapper */
.form-wrapper {
    width: 100%;
    max-width: 1200px;
}