/**
 * Contact Page Styles
 * 
 * FILE LOCATION: /includes/css/pages/contact.css
 * UPDATED: January 11, 2026 - v5: Clean production code, no development markers
 */

/* =============================================================================
   STICKY HEADER (KEEPS HEADER IN PLACE AT ALL TIMES)
   ============================================================================= */

/* Make header sticky - stays at top of viewport */
.navbar,
header,
.site-header,
nav[role="navigation"] {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030; /* Bootstrap navbar z-index */
    width: 100%;
}

/* Add padding to body to prevent content from going under fixed header */
body {
    padding-top: 56px; /* Typical Bootstrap navbar height */
}

/* =============================================================================
   PAGE LAYOUT VARIABLES + BACKGROUND IMAGE SETTINGS
   ============================================================================= */

:root {
    --tb-header-h: 56px;  /* Keep in sync with your real header height */
    --tb-footer-h: 80px;  /* Keep in sync with your real footer height */

    /* Background image scaling and positioning */
    --tb-contact-bg-position: center center;
    --tb-contact-bg-size: cover;
    --tb-contact-bg-opacity: 1;
    --tb-contact-bg-blur: 2px;

    /* Overlay gradient strength */
    --tb-contact-overlay-strength: 0.12;
    --tb-contact-left-fade: 0.42;

    /* Card background transparency */
    --tb-card-bg: rgba(255, 255, 255, 0.75);
    --tb-card-border: rgba(255, 255, 255, 0.60);

    /* Per-section tuning (subtle differences) */
    --tb-card-form-bg:     rgba(255, 255, 255, 0.70);
    --tb-card-info-bg:     rgba(255, 255, 255, 0.72);

    /* CTA should stay solid for contrast */
    --tb-card-cta-bg: #0d6efd;
}

/* =============================================================================
   FIXED FOOTER + SCROLLABLE CONTENT AREA (HEADER + FOOTER LOCKED)
   ============================================================================= */

/* Prevent the browser window itself from scrolling */
html, body {
    height: 100%;
}

body {
    overflow: hidden;
}

/* Pin footer to the bottom (supports multiple footer wrappers) */
footer,
.site-footer,
.footer {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1025; /* below navbar(1030), above page content */
    min-height: var(--tb-footer-h);
}

/* =============================================================================
   MAIN PAGE WRAPPER
   ============================================================================= */

.contact-page {
    background-color: #f8f9fa;

    /* Background image path */
    --tb-contact-bg-url: url("/assets/images/backgrounds/contact_background.png?v=20260111_3");

    /* Background tuning */
    --tb-contact-bg-blur: 2px;
    --tb-contact-bg-opacity: 1;
    --tb-contact-bg-size: cover;             /* Fill sides - no white space */
    --tb-contact-bg-position: center center; /* Center both directions */

    /* Editorial overlay tuning */
    --tb-contact-overlay-strength: 0.12;
    --tb-contact-left-fade: 0.42;

    /* Card transparency (overrides root defaults for this page if needed) */
    --tb-card-bg: rgba(255, 255, 255, 0.75);
    --tb-card-border: rgba(255, 255, 255, 0.60);

    /* Per-section tuning (subtle differences) */
    --tb-card-form-bg:     rgba(255, 255, 255, 0.70);
    --tb-card-info-bg:     rgba(255, 255, 255, 0.72);

    /* CTA should stay solid for contrast */
    --tb-card-cta-bg: #0d6efd;


    position: fixed;
    top: var(--tb-header-h);
    left: 0;
    right: 0;
    bottom: var(--tb-footer-h);

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    isolation: isolate;
    min-height: auto;
    padding-top: 3rem;  /* Padding instead of container margin - eliminates white gap */
    padding-bottom: 2rem;
}

/* Fixed background - stays in place while content scrolls, positioned below header */
.contact-page::before {
    content: "";
    position: fixed;            /* FIXED - background doesn't scroll */
    top: var(--tb-header-h);    /* Start below header */
    left: 0;
    right: 0;
    bottom: var(--tb-footer-h); /* Stop above footer */
    z-index: -3;

    background-image: var(--tb-contact-bg-url);
    background-repeat: no-repeat;
    background-size: var(--tb-contact-bg-size);
    background-position: var(--tb-contact-bg-position);

    filter: blur(var(--tb-contact-bg-blur)) saturate(0.88) contrast(0.90) brightness(1.06);
    opacity: var(--tb-contact-bg-opacity);

    pointer-events: none;
}

/* Fixed overlay - stays in place while content scrolls, positioned below header */
.contact-page::after {
    content: "";
    position: fixed;            /* FIXED - overlay doesn't scroll */
    top: var(--tb-header-h);    /* Start below header (matches background) */
    left: 0;
    right: 0;
    bottom: var(--tb-footer-h); /* Stop above footer */
    z-index: -2;

    background:
        linear-gradient(90deg,
            rgba(246,236,222,var(--tb-contact-left-fade)) 0%,
            rgba(246,236,222,0.22) 22%,
            rgba(246,236,222,0.08) 44%,
            rgba(246,236,222,0.00) 65%),
        linear-gradient(180deg,
            rgba(248,242,234,0.60) 0%,
            rgba(248,242,234,0.20) 40%,
            rgba(248,242,234,0.10) 70%,
            rgba(248,242,234,0.00) 100%),
        rgba(246,236,222,var(--tb-contact-overlay-strength));

    pointer-events: none;
}

/* Keep content above */
.contact-page .container {
    position: relative;
}

/* =============================================================================
   2. TYPOGRAPHY
   ============================================================================= */

.contact-page__title {
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #212529;
    text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}

/* =============================================================================
   3. CARDS
   ============================================================================= */

.contact-card {
    background: var(--tb-card-bg) !important;
    border: 1px solid var(--tb-card-border) !important;
    border-radius: 0.75rem;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.contact-card--form { background: var(--tb-card-form-bg) !important; }
.contact-card--info { background: var(--tb-card-info-bg) !important; }

/* =============================================================================
   4. RESPONSIVE ADJUSTMENTS
   ============================================================================= */

@media (max-width: 991.98px) {
    body {
        padding-top: 56px;
    }
    .contact-page {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (max-width: 575.98px) {
    .contact-card {
        border-radius: 0.65rem;
    }
    .contact-page__title {
        font-size: 1.9rem;
    }
}
