/* ========================================= */
/* PREMIUM CONTACT PAGE STYLES               */
/* ========================================= */

.contact-main {
    background-color: #f9f9f9;
    padding-bottom: 6rem;
}

/* Animations */
.reveal-item {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- CINEMATIC HERO --- */
.contact-hero {
    position: relative;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8)), url('../imgs/web_essentials/getintouch.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 10rem 2rem 14rem 2rem; /* Deep padding to allow overlap */
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
}

.contact-hero .hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-hero h1 {
    font-family: var(--font-family-headings);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    text-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.contact-hero p {
    font-size: 1.2rem;
    color: #e0e0e0;
    font-weight: 300;
    line-height: 1.6;
}

/* --- OVERLAPPING CONTACT CONTAINER --- */
.contact-section {
    max-width: 1300px;
    margin: -8rem auto 0 auto; /* Pulls it up over the hero */
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 3rem;
    align-items: stretch;
    width: 100%;
}

/* --- LEFT: APP-LIKE INFO CARD --- */
.contact-info-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0; /* UX FIX: Prevents Grid blowout */
}

.info-header { margin-bottom: 2.5rem; }
.info-header h2 { font-family: var(--font-family-headings); font-size: 2rem; color: #111; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0.5rem; }
.info-header p { color: #666; font-size: 1rem; line-height: 1.5; }

.info-list { display: flex; flex-direction: column; gap: 1.8rem; margin-bottom: 2.5rem; }
.info-item { 
    display: flex; align-items: flex-start; gap: 1rem; text-decoration: none; 
    color: inherit; transition: transform 0.3s ease, box-shadow 0.3s ease; 
    padding: 10px; border-radius: 12px;
    -webkit-tap-highlight-color: transparent; /* Premium mobile touch */
}
.info-item:not(.non-clickable):hover { background: #fff; transform: translateX(5px); box-shadow: 0 5px 15px rgba(0,0,0,0.03); }

.icon-circle { width: 50px; height: 50px; background: #111; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.3s; }
.info-item:not(.non-clickable):hover .icon-circle { background: var(--accent-color); color: #111; }
.icon-circle i { font-size: 1.3rem; }

.info-text h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 0.3rem; font-weight: 600; }
.info-text p { font-size: 1.1rem; color: #111; font-weight: 500; margin: 0; line-height: 1.4; }

/* Integrated Map Widget */
.map-widget { margin-top: auto; border-radius: 16px; overflow: hidden; height: 200px; border: 4px solid #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.map-widget iframe { width: 100%; height: 100%; object-fit: cover; }

/* --- RIGHT: SMART FORM --- */
.contact-form-wrapper {
    background: #fff;
    border-radius: 24px;
    padding: 4rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    min-width: 0; /* UX FIX: Prevents horizontal scroll from breaking the Grid layout width */
}

.form-badge { display: inline-block; padding: 6px 14px; background: #e8f5e9; color: #2e7d32; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border-radius: 20px; margin-bottom: 1rem; }
.contact-form-wrapper h2 { font-family: var(--font-family-headings); font-size: 2.5rem; color: #111; font-weight: 800; letter-spacing: -1px; margin-bottom: 0.5rem; }
.form-subtitle { color: #666; font-size: 1.05rem; margin-bottom: 3rem; }

/* 5-Lakh Feature: Interactive Pills */
.inquiry-router { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 3rem; padding: 8px; background: #f5f5f5; border-radius: 40px; }
.inquiry-pill { 
    flex: 1; text-align: center; padding: 14px 20px; border: none; background: transparent; 
    color: #666; font-family: var(--font-family-headings); font-weight: 600; font-size: 0.95rem; 
    border-radius: 30px; cursor: pointer; transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); 
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.inquiry-pill:hover { color: #111; }
.inquiry-pill.active { background: #111; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,0.15); }

/* Premium Floating Input Fields */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.floating-input { position: relative; width: 100%; }
.floating-input.full-width { margin-bottom: 2.5rem; }

.floating-input input, 
.floating-input textarea {
    width: 100%; padding: 18px 20px; font-family: inherit; font-size: 1rem; color: #111;
    background: #fdfdfd; border: 2px solid #eaeaea; border-radius: 12px; outline: none;
    transition: all 0.3s ease; box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
    -webkit-appearance: none; /* iOS Safari fix */
    box-sizing: border-box;
}

/* Specific targeting for date inputs to ensure text remains fully visible without clipping */
.floating-input input[type="date"] {
    -webkit-appearance: auto; 
    appearance: auto;
    min-height: 58px; 
    color: #111;
    cursor: pointer;
    line-height: normal;
    box-sizing: border-box;
}

.floating-input label {
    position: absolute; top: 18px; left: 20px; font-size: 1rem; color: #888;
    pointer-events: none; transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: transparent; padding: 0 4px;
}

/* Float the label up when focused OR when it has text (achieved via placeholder=" ") */
.floating-input input:focus, .floating-input textarea:focus,
.floating-input input:not(:placeholder-shown), .floating-input textarea:not(:placeholder-shown) {
    border-color: #111; background: #fff;
}
.floating-input input:focus ~ label, .floating-input textarea:focus ~ label,
.floating-input input:not(:placeholder-shown) ~ label, .floating-input textarea:not(:placeholder-shown) ~ label,
.floating-input label.active-label { 
    top: -10px; left: 16px; font-size: 0.8rem; font-weight: 600; color: #111; background: #fff;
}

/* Smart Expanding Area */
.smart-extra-fields {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* We increased max-height drastically to support the new Home Measurement layout */
.smart-extra-fields.expanded {
    max-height: 800px; opacity: 1; margin-bottom: 0;
}

/* Submit Button */
.lux-submit-btn {
    width: 100%; padding: 20px; border: none; border-radius: 12px;
    background: #25D366; color: white; font-family: var(--font-family-headings);
    font-size: 1.15rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease; position: relative; overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.lux-submit-btn i { font-size: 1.5rem; z-index: 2; position: relative; }
.lux-submit-btn span { z-index: 2; position: relative; }
.lux-submit-btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg); transition: all 0.6s ease; z-index: 1;
}
.lux-submit-btn:hover { background: #1ebe5d; transform: translateY(-3px); box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4); }
.lux-submit-btn:hover::before { left: 100%; }

.secure-note { text-align: center; font-size: 0.85rem; color: #888; margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: 5px; }
.secure-note i { font-size: 1rem; }


/* ========================================= */
/* PREMIUM RESPONSIVE DESIGN                 */
/* ========================================= */
@media (max-width: 1024px) {
    .contact-container { grid-template-columns: 1fr; }
    .contact-info-card { flex-direction: row; gap: 2rem; padding: 2rem; flex-wrap: wrap; }
    .info-header { width: 100%; margin-bottom: 1rem; }
    .info-list { width: calc(50% - 1rem); margin-bottom: 0; }
    .map-widget { width: calc(50% - 1rem); height: auto; min-height: 250px; margin-top: 0; }
    .contact-form-wrapper { padding: 3rem 2rem; }
}

@media (max-width: 768px) {
    /* Refined Mobile Hero */
    .contact-hero { 
        padding: 7rem 1.5rem 8rem 1.5rem; 
        clip-path: polygon(0 0, 100% 0, 100% 97%, 0% 100%);
    }
    .contact-hero h1 { font-size: 2.2rem; }
    .contact-hero p { font-size: 1rem; max-width: 90%; margin: 0 auto; }
    
    /* Precision Mobile Overlap */
    .contact-section { margin-top: -4rem; padding: 0 1rem; box-sizing: border-box; width: 100%; }
    .contact-container { gap: 2rem; width: 100%; box-sizing: border-box; overflow: hidden; }
    
    /* Compact, Touch-Friendly Info Card */
    .contact-info-card { 
        flex-direction: column; gap: 1.5rem; padding: 2rem 1.5rem; 
        border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06);
        width: 100%; box-sizing: border-box; overflow: hidden;
    }
    .info-header h2 { font-size: 1.8rem; }
    .info-list, .map-widget { width: 100%; }
    .icon-circle { width: 45px; height: 45px; }
    .icon-circle i { font-size: 1.1rem; }
    .info-text h3 { font-size: 0.8rem; }
    .info-text p { font-size: 1rem; }
    .map-widget { height: 250px; border-radius: 12px; }
    
    /* Mobile Form Layout */
    .contact-form-wrapper { 
        padding: 2.5rem 1.5rem; 
        border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06);
        width: 100%; box-sizing: border-box; overflow: hidden;
    }
    .contact-form-wrapper h2 { font-size: 2rem; letter-spacing: -0.5px; }
    .form-subtitle { font-size: 0.95rem; margin-bottom: 2rem; }
    
    /* 5-LAKH MOBILE UX: Native Swipeable Tabs */
    .inquiry-router { 
        flex-direction: row; flex-wrap: nowrap; overflow-x: auto; 
        scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; 
        padding: 5px; gap: 8px; border-radius: 16px; margin-bottom: 2rem;
        scrollbar-width: none; 
        width: 100%; max-width: 100%; 
    }
    .inquiry-router::-webkit-scrollbar { display: none; }
    
    .inquiry-pill { 
        flex: 0 0 auto; width: auto; padding: 12px 20px; 
        font-size: 0.9rem; scroll-snap-align: start; border-radius: 12px;
    }
    
    /* Touch-Optimized Form Fields */
    .form-grid { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
    .floating-input.full-width { margin-bottom: 2rem; }
    
    .floating-input input, 
    .floating-input textarea { 
        padding: 16px 18px; 
        font-size: 1rem; 
        border-radius: 10px;
    }
    .floating-input input[type="date"] { min-height: 52px; }
    .floating-input label { top: 16px; left: 18px; font-size: 0.95rem; }
    
    .smart-extra-fields.expanded { max-height: 1000px; margin-bottom: 1.5rem; } 
    
    /* Tactile Call to Action */
    .lux-submit-btn { padding: 18px; font-size: 1.1rem; border-radius: 10px; }
    
    /* Instant Touch Feedback */
    .info-item:active { transform: scale(0.98); }
    .lux-submit-btn:active { transform: scale(0.98); box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); }
}