/* =========================================
   CONTACT & STATS SECTION
   ========================================= */

/* ============================================================
   STATS / NUMBERS SECTION
   ============================================================ */
.stats-header-section {
    width: 100%;
    position: relative;
    background: var(--bg-light);
    padding: var(--section-padding-y) 0;
    overflow: hidden;
}

.stats-header-section .stats-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

.stats-header-section .stats-header {
    text-align: center;
    margin-bottom: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.stat-item {
    text-align: center;
    padding: 20px 40px;
    border-left: 1px solid var(--gray-300);
}

.stat-item:first-child {
    border-left: none;
    padding-left: 0;
}

.stat-number {
    display: block;
    font-family: var(--font-main);
    font-size: clamp(3.5rem, 5vw, 64px);
    font-weight: 400;
    color: var(--primary-color);
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: 16px;
}

.stat-label {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-main);
    line-height: 1.6;
}

@media (max-width: 991px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .stat-item {
        border-left: none;
        border-top: 1px solid var(--gray-300);
        padding: 30px 0 0 0;
    }

    .stat-item:first-child {
        border-top: none;
        padding-top: 0;
    }

    /* Fixed: was .stats-heading (class name mismatch) */
    .stats-header-section .stats-header {
        font-size: 55px;
        line-height: normal;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        gap: 24px;
    }

    /* Fixed: was .stats-heading (class name mismatch) */
    .stats-header-section .stats-header {
        font-size: 28px;
    }

    .stats-header-section .stats-inner {
        padding: 0 20px;
    }
}


/* ============================================================
   CONTACT / CTA SECTION
   ============================================================ */
.contact-section {
    position: relative;
    padding: var(--section-padding-y) 0;
    overflow: hidden;
    background: var(--black); /* Fallback */
}

/* GPU-Accelerated Parallax Layer */
.contact-section::before {
    content: '';
    position: absolute;
    top: -20%; /* Extra height for parallax movement */
    left: 0;
    width: 100%;
    height: 140%; 
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
                url('../../assets/img/Next-Big-Code-Website-Design-Company-in-USA-overlay-shopify-partner-wordpress-developer-logo-design-company-website-design.webp');
    background-size: cover;
    background-position: center;
    z-index: 0;
    will-change: transform;
    pointer-events: none;
    transform: translateY(var(--parallax-y, 0));
}



.contact-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* ── Left: Form ── */
.contact-left {
    position: relative;
    z-index: 2;
}

.contact-heading {
    font-family: var(--font-main);
    font-size: clamp(1.6rem, 4vw, 55px);
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -1.2px;
    color: var(--white);
    margin: 0 auto 14px;
}

.contact-subtext {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 30px;
    color: var(--white);
    max-width: 760px;
    margin: 0 0 40px;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Fieldset-style input with floating label on border */
.form-field {
    position: relative;
}

.form-field input,
.form-field select,
.form-field textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 18px 20px;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.03em;
    color: var(--white);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-field textarea {
    resize: vertical;
}

.form-field select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
}

.form-field select option {
    background: var(--gray-999);
    color: var(--white);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--white);
}

/* Floating label  inputs and selects */
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field select:focus + label,
.form-field select:valid + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
    top: -4px;
    font-size: 11px;
    color: var(--white);
    background: var(--black);
    padding: 0 8px;
}

.form-field label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: transparent;
}

/* Textarea label sits at top, not vertically centred */
.form-field textarea + label {
    top: 18px;
    transform: none;
}

/* Fixed: explicit floated state for textarea label to match input behavior */
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
    top: -4px;
    transform: none;
}

/* Form Row - Email and Phone Side by Side */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Submit Button */
.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 28px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--white);
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    width: fit-content; /* Fixed: was max-width: 100% with no width set */
}

.contact-submit:hover {
    opacity: 0.9;
}

.btn-dots-icon {
    display: flex;
    gap: 3px;
}

.btn-dots-icon span {
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
}

/* ── Right: Image Component ── */
.contact-right {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.image-side {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) both;
    animation-delay: 0.2s;
}

.main-img-container {
    width: 100%;
    height: 600px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 40px 80px var(--shadow-dark);
    position: relative;
}

.main-img-container::after {
    content: '';
    position: absolute;
    inset: 0;
    top: 0; right: 0; bottom: 0; left: 0; /* fallback for inset */
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.4));
}

.main-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.image-side:hover .main-img-container img {
    transform: scale(1.05);
}

/* Glassmorphism Labels */
.glass-label {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 28px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 280px;
    color: white;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    z-index: 10;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.label-1 {
    top: 60px;
    left: -60px;
    animation: float 6s ease-in-out infinite;
}

.label-2 {
    bottom: 60px;
    right: -60px;
    left: auto;
    animation: float 8s ease-in-out infinite reverse;
}

.glass-label:hover {
    transform: scale(1.05) translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
}

.glass-label span {
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.check-circle {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-light-blue));
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 71, 255, 0.6);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Contact Responsive ── */
@media (max-width: 1200px) {
    .label-1 {
        left: -20px;
    }

    .label-2 {
        right: -20px;
    }
}

/* Added: mid-range guard to prevent labels bleeding outside viewport */
@media (max-width: 1100px) {
    .label-1 {
        left: 0px;
    }

    .label-2 {
        right: 0px;
    }
}

@media (max-width: 991px) {
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .contact-right {
        order: 2;
        padding: 0; /* Fixed: was 0 40px, double-padding with contact-inner's 40px */
    }

    .contact-left {
        order: 1;
    }

    .contact-section {
        padding: 100px 0;
    }

    .glass-label {
        width: 240px;
        padding: 14px 20px;
    }

    .label-1 {
        top: 30px;
        left: 10px;
    }

    .label-2 {
        bottom: 30px;
        right: 10px;
    }

    /* Reduced image height for tablet */
    .main-img-container {
        height: 480px;
    }
}

@media (max-width: 768px) {
    .contact-inner {
        padding: 0 24px;
    }

    .contact-section {
        padding: var(--section-padding-y-mobile) 0 70px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 28px; /* Fixed: was inheriting 15px desktop gap after stacking */
    }

    /* Reduced image height for large mobile */
    .main-img-container {
        height: 380px;
    }
}

@media (max-width: 480px) {
    .contact-inner {
        padding: 0 16px;
        gap: 36px;
    }

    .contact-submit {
        width: 100%;
        justify-content: center;
    }

    .form-row {
        gap: 28px;
    }

    /* Reduced image height for small mobile */
    .main-img-container {
        height: 260px;
    }
  
}