/*
 * Contact Page — Dedicated Stylesheet
 * =====================================
 * Loaded ONLY on the Contact page template.
 * Depends on: main.css (CSS variables, .container, .section, .btn, etc.)
 * Enqueued in: functions.php → irf_enqueue_scripts()
 */


/* =============================================================
   1. BANNER ENHANCEMENTS
   ============================================================= */

.ctc-banner {
    min-height: 320px;
    padding: 150px 0 88px;
    align-items: flex-end;
}
.ctc-banner .page-banner-title  { margin-bottom: 10px; }
.ctc-banner .page-banner-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.72);
    margin-bottom: 20px;
    max-width: 560px;
    line-height: 1.65;
}
.ctc-banner-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.ctc-circle-1 {
    width: 520px; height: 520px;
    background: var(--red);
    opacity: 0.05;
    top: -220px; right: -60px;
}
.ctc-circle-2 {
    width: 300px; height: 300px;
    background: #fff;
    opacity: 0.03;
    bottom: -120px; left: 8%;
}


/* =============================================================
   2. OFFICES SECTION
   ============================================================= */

.ctc-offices-section { background: var(--white); }

.ctc-offices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

/* Card base */
.ctc-office-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 36px 32px;
    box-shadow: var(--shadow);
    transition: var(--tr);
    overflow: hidden;
}
.ctc-office-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--red);
}
.ctc-office-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Dark variant — Head Office */
.ctc-office-card--dark {
    background: linear-gradient(145deg, var(--red-dark) 0%, var(--red) 100%);
    border-color: transparent;
}
.ctc-office-card--dark .ctc-office-name    { color: var(--white); }
.ctc-office-card--dark .ctc-office-address { color: rgba(255,255,255,0.6); }
.ctc-office-card--dark .ctc-office-details { border-top-color: rgba(255,255,255,0.08); }
.ctc-office-card--dark .ctc-office-detail  { color: rgba(255,255,255,0.72); }
.ctc-office-card--dark .ctc-office-detail:hover { color: var(--red); }
.ctc-office-card--dark .ctc-office-icon {
    background: #fcf1f5;
    color: #181A17 ;
}
.ctc-office-card--dark .ctc-office-detail svg {color: #ffffff;}

.ctc-office-badge {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 20px;
}

.ctc-office-icon {
    width: 56px; height: 56px;
    background: rgba(254,0,0,0.07);
    color: var(--red);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
}

.ctc-office-name {
    font-size: 20px;
    color: var(--charcoal);
    margin-bottom: 10px;
}

.ctc-office-address {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.75;
    margin-bottom: 22px;
}

.ctc-office-details {
    border-top: 1px solid var(--border);
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ctc-office-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
    transition: var(--tr);
}
.ctc-office-detail:hover { color: var(--red); }
.ctc-office-detail svg { flex-shrink: 0; color: var(--red); }


/* =============================================================
   3. BRANCHES SECTION
   ============================================================= */

.ctc-branches-section { background: #fff; }

.ctc-branches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── Card ── */
.ctc-branch-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 2px 12px rgba(238,44,60,0.07);
    position: relative;
}
.ctc-branch-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--red);
    border-radius: 16px 16px 0 0;
}
.ctc-branch-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(238,44,60,0.14);
    border-color: rgba(238,44,60,0.25);
}

/* ── Card header ── */
.ctc-branch-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--light);
}
.ctc-branch-num {
    flex-shrink: 0;
    width: 40px; height: 40px;
    background: var(--red);
    color: #fff;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
}
.ctc-branch-name {
    font-size: 16px;
    font-weight: 700;
    color: #181A17;
    margin: 0;
    line-height: 1.2;
}

/* ── Contact rows ── */
.ctc-branch-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.ctc-branch-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #181A17;
    line-height: 1.55;
}
.ctc-branch-row a { color: #181A17; transition: color 0.2s ease; }
.ctc-branch-row a:hover { color: var(--red); }
.ctc-bi {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--red);
}

/* ── Get Directions button ── */
.ctc-branch-dir {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 22px 20px;
    padding: 11px 18px;
    border-radius: 50px;
    border: 1.5px solid var(--red);
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.22s ease;
}
.ctc-branch-dir svg { flex-shrink: 0; width: 15px; height: 15px; }
.ctc-branch-dir:hover {
    background: var(--red);
    color: #fff;
    box-shadow: 0 6px 20px rgba(238,44,60,0.28);
}


/* =============================================================
   4. CONTACT FORM SECTION
   ============================================================= */

.ctc-form-section { background: var(--white); }

.ctc-form-wrap {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 44px;
    align-items: start;
}

/* ── Info Panel (left) ── */
.ctc-form-info {
    background: linear-gradient(150deg, var(--red-dark) 0%, var(--red) 100%);
    border-radius: var(--radius);
    padding: 44px 38px;
    position: sticky;
    top: 100px;
    overflow: hidden;
}
.ctc-form-info::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--red);
}
.ctc-form-info::after {
    content: '';
    position: absolute;
    bottom: -90px; right: -90px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(254,0,0,0.1), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ctc-form-info .section-tag { margin-bottom: 18px; }

.ctc-form-info-title {
    font-size: clamp(20px, 2.2vw, 28px);
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 14px;
}

.ctc-form-info-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    line-height: 1.75;
    margin-bottom: 32px;
}

.ctc-form-info-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ctc-form-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.ctc-form-info-icon {
    width: 42px; height: 42px;
    background: #fff;
    color: var(--red);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.ctc-form-info-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 4px;
}

.ctc-form-info-value {
    font-size: 14px;
    color: rgba(255,255,255,0.82);
    transition: var(--tr);
    display: block;
    line-height: 1.5;
}
a.ctc-form-info-value:hover { color: var(--red); }

.ctc-form-social-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 12px;
}

/* ── Form Card (right) ── */
.ctc-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 44px 40px;
    box-shadow: var(--shadow);
}

.ctc-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ctc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.ctc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ctc-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: 2px;
}
.ctc-req { color: var(--red); font-size: 14px; line-height: 1; }

.ctc-input,
.ctc-select,
.ctc-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.ctc-input::placeholder,
.ctc-textarea::placeholder {
    color: #bcc4cc;
}
.ctc-input:focus,
.ctc-select:focus,
.ctc-textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(238,44,60,0.08);
}
.ctc-input-err {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 3px rgba(229,57,53,0.08) !important;
}
.ctc-select {
    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='%236C757D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
    color: var(--text);
}
.ctc-select option[value=""] { color: #bcc4cc; }
.ctc-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.65;
}

.ctc-error {
    font-size: 12px;
    color: #e53935;
    min-height: 16px;
    display: block;
}

.ctc-submit {
    width: 100%;
    justify-content: center;
    gap: 10px;
    padding: 15px 32px;
    font-size: 15px;
    margin-top: 4px;
    border-radius: 8px;
}
.ctc-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}
.ctc-submit-spinner {
    animation: ctcSpin 0.7s linear infinite;
}
@keyframes ctcSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ctc-success {
    align-items: center;
    gap: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}
.ctc-error-msg {
    align-items: center;
    gap: 10px;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
}


/* =============================================================
   5. MAP SECTION
   ============================================================= */

.ctc-map-section {
    background: #fcf1f5;
    padding: 70px 0 0;
}
.ctc-map-header {
    text-align: center;
    padding-bottom: 36px;
}
.ctc-map-header .section-tag   { margin-bottom: 10px; }
.ctc-map-header .section-title { margin-bottom: 0; }

.ctc-map-embed { width: 100%; line-height: 0; }
.ctc-map-embed iframe {
    display: block;
    width: 100%;
    height: 440px;
    border: 0;
    filter: contrast(1.05) saturate(0.9);
}


/* =============================================================
   6. FOOTER CTA
   ============================================================= */

.ctc-footer-cta {
    position: relative;
    padding: 76px 0;
    overflow: hidden;
}
.ctc-footer-cta-bg {
    position: absolute;
    inset: 0;
    background: #ee2c3c;
}
.ctc-footer-cta-bg::before {
    content: '';
    position: absolute;
    top: -80px; left: -80px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(252,241,245,0.15), transparent 70%);
    border-radius: 50%;
}
.ctc-footer-cta-bg::after {
    content: '';
    position: absolute;
    right: -80px; bottom: -80px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(252,241,245,0.12), transparent 70%);
    border-radius: 50%;
}

.ctc-footer-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.ctc-footer-cta-title {
    font-size: clamp(22px, 3vw, 34px);
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.25;
}
.ctc-footer-cta-sub {
    font-size: 15px;
    color: rgba(252,241,245,0.85);
    line-height: 1.6;
}

.ctc-footer-cta-btns {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
}


/* =============================================================
   7. STICKY CONTACT BAR  (mobile only)
   ============================================================= */

.ctc-sticky-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    display: flex;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    /* Desktop: hide */
    display: none;
}
@media (max-width: 767px) {
    .ctc-sticky-bar { display: flex; }
}
.ctc-sticky-bar.visible { transform: translateY(0); }

.ctc-sticky-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 15px 18px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--white);
    transition: opacity 0.2s ease;
    letter-spacing: 0.3px;
}
.ctc-sticky-btn:hover    { opacity: 0.88; }
.ctc-sticky-call         { background: var(--red); }
.ctc-sticky-whatsapp     { background: var(--red-dark); }


/* =============================================================
   8. RESPONSIVE
   ============================================================= */

/* ── Tablet ≤ 960px ── */
@media (max-width: 960px) {
    .ctc-form-wrap {
        grid-template-columns: 1fr;
    }
    .ctc-form-info { position: static; }
    .ctc-form-info-items { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

    .ctc-branches-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile ≤ 640px ── */
@media (max-width: 640px) {
    .ctc-banner { padding: 130px 0 72px; }

    .ctc-offices-grid    { grid-template-columns: 1fr; }
    .ctc-branches-grid   { grid-template-columns: 1fr; }
    .ctc-form-row        { grid-template-columns: 1fr; }
    .ctc-form-info-items { grid-template-columns: 1fr; }

    .ctc-form-card,
    .ctc-form-info  { padding: 28px 22px; }

    .ctc-office-card { padding: 28px 22px 24px; }

    .ctc-footer-cta-inner {
        flex-direction: column;
        text-align: center;
    }
    .ctc-footer-cta-btns {
        justify-content: center;
        flex-wrap: wrap;
    }

    .ctc-map-embed iframe { height: 280px; }

    /* Extra bottom padding so sticky bar doesn't cover content */
    body { padding-bottom: 56px; }
}
