/* ============================================================
   CONTACT PAGE STYLES
   Page: resources/views/main/contact/index.blade.php
   Depends on global variables defined in style.css:
   - Colors: --ink-*, --primary-*, --white, --danger
   - Spacing: --spacing-*
   - Typography: --font-*
   - Transitions: --transition, --ease-*
   - Shadows: --shadow-*
   - Radius: --radius-*
   - Gradients: --grad-brand
   - Sizes: --icon-size, --icon-size-sm, --social-icon-size, --map-height
   ============================================================ */
/* ============================================================
   BODY – base typography and background
   ============================================================ */

body {
    font-family: var(--font-body);
    color: var(--ink-800);
    background-color: var(--ink-50);
}

/* ============================================================
   PAGE WRAPPER – gradient accents
   ============================================================ */

.contact-page-wrapper {
    padding-bottom: var(--spacing-5xl);
    background-color: var(--bg-body);
    background-image:
        radial-gradient(ellipse 80% 40% at 50% 0%,
            rgba(16,134,202,.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 90% 80%,
            rgba(245,200,66,.05) 0%, transparent 55%);
}

/* ============================================================
   MAP CARD – embedded Google Maps iframe
   ============================================================ */

.map-card {
    border-radius: var(--radius-2xl);
    overflow: hidden;
    border: 4px solid rgba(255,255,255,.9);
    height: var(--map-height);
    box-shadow: var(--shadow-xl);
    transition: box-shadow var(--transition);
    position: relative;
}

.map-card::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: calc(var(--radius-2xl) + 4px);
    background: var(--grad-brand);
    opacity: .12;
    z-index: -1;
    filter: blur(16px);
    transition: opacity var(--transition);
}

.map-card:hover::before {
    opacity: .22;
}

.map-card iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ============================================================
   CONTACT CARD – main form container
   ============================================================ */

.contact-card.main-form-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-3xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-card);
    position: relative;
    overflow: hidden;
    animation: fadeInUp .5s var(--ease-out) both;
}

.contact-card.main-form-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad-brand);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.contact-card.main-form-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse 60% 30% at 50% 0%,
        rgba(16,134,202,.04) 0%, transparent 60%);
    pointer-events: none;
}

/* ============================================================
   CARD SUBTITLE – section heading with icon
   ============================================================ */

.card-subtitle {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink-800);
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -.01em;
}

.card-subtitle i {
    font-size: 1rem;
    color: var(--primary-blue);
    width: 34px;
    height: 34px;
    background: var(--primary-blue-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[dir="rtl"] .card-subtitle i {
    margin-right: 0;
    margin-left: 0;
}

/* ============================================================
   FORM LABELS – uppercase with letter-spacing
   ============================================================ */

.form-label {
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-600);
    margin-bottom: .4rem;
    letter-spacing: .015em;
    text-transform: uppercase;
}

/* ============================================================
   INPUT GROUP – with icon prefix
   ============================================================ */

.input-group {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.input-group-text {
    background: var(--ink-50);
    border: 1px solid var(--ink-200);
    border-right: none;
    color: var(--primary-blue);
    padding: 0 14px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    transition: background var(--transition), color var(--transition);
}

.input-group:focus-within .input-group-text {
    background: var(--primary-blue-light);
    color: var(--primary-blue-darker);
}

[dir="rtl"] .input-group-text {
    border-right: 1px solid var(--ink-200);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ============================================================
   FORM CONTROL – input fields
   ============================================================ */

.form-control {
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--ink-800);
    background: var(--white);
    border: 1px solid var(--ink-200);
    border-left: none;
    padding: 11px var(--spacing-md);
    transition: border-color var(--transition), background var(--transition);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.col-12 > .form-control,
.col-md-6 > .form-control {
    border-left: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    padding: 11px var(--spacing-md);
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: none;
    background: var(--white);
    outline: none;
    color: var(--ink-900);
}

.form-control::placeholder {
    color: var(--ink-400);
    font-size: .9rem;
}

/* ============================================================
   TEXTAREA – custom height with no resize
   ============================================================ */

.custom-textarea {
    resize: none;
    border-radius: var(--radius-md) !important;
    border-left: 1px solid var(--ink-200) !important;
    min-height: 130px;
    line-height: 1.65;
}

[dir="rtl"] .form-control:not(:first-child) {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-left: 1px solid var(--ink-200);
    border-right: none;
}

/* ============================================================
   ERROR FEEDBACK – validation messages
   ============================================================ */

.error-feedback {
    color: var(--danger);
    font-size: .8rem;
    margin-top: .35rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-feedback::before {
    content: '!';
    display: inline-flex;
    width: 16px; height: 16px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* ============================================================
   SUBMIT BUTTON – gradient with shine effect
   ============================================================ */

.btn-gradient-submit {
    background: var(--grad-brand);
    color: var(--white);
    border: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .02em;
    transition: transform var(--transition), box-shadow var(--transition);
    border-radius: var(--border-radius-sm);
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 14px var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-blue);
}

.btn-gradient-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent, rgba(255,255,255,.18), transparent);
    background-size: 200% 100%;
    transform: translateX(-100%);
    transition: transform .55s;
}

.btn-gradient-submit:hover {
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(16,134,202,.4);
}

.btn-gradient-submit i.pulse {
    animation: submit-pulse 1.8s ease-in-out infinite;
}

@keyframes submit-pulse {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* ============================================================
   INFO SIDEBAR – contact details cards
   ============================================================ */

.info-sidebar {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.info-item-box {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-lg);
    transition: all var(--transition) var(--ease-out);
    border: 1px solid rgba(16,134,202,.07);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInUp .5s var(--ease-out) both;
}

.info-item-box:nth-child(1) { animation-delay: .10s; }
.info-item-box:nth-child(2) { animation-delay: .20s; }
.info-item-box:nth-child(3) { animation-delay: .30s; }

.info-item-box::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--grad-brand);
    transform: scaleY(0);
    transition: transform var(--transition) var(--ease-out);
    transform-origin: bottom;
    border-radius: 0 2px 2px 0;
}

[dir="rtl"] .info-item-box::before {
    left: auto; right: 0;
    border-radius: 2px 0 0 2px;
}

.info-item-box:hover {
    border-color: rgba(16,134,202,.18);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-item-box:hover::before {
    transform: scaleY(1);
}

/* ============================================================
   ICON SHAPE – circular icon container
   ============================================================ */

.icon-shape {
    width: var(--icon-size);
    height: var(--icon-size);
    background: linear-gradient(135deg,
        rgba(16,134,202,.12) 0%,
        rgba(16,134,202,.06) 100%);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: 1.35rem;
    margin-inline-end: var(--spacing-lg);
    flex-shrink: 0;
    transition: all var(--transition) var(--ease-bounce);
    border: 1px solid rgba(16,134,202,.12);
}

.info-item-box:hover .icon-shape {
    background: var(--grad-brand);
    color: var(--white);
    border-color: transparent;
    transform: scale(1.08) rotate(-4deg);
    box-shadow: var(--shadow-blue);
}

/* ============================================================
   INFO CONTENT – text details
   ============================================================ */

.info-content h5 {
    font-family: var(--font-display);
    margin: 0 0 3px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-800);
    letter-spacing: -.01em;
}

.info-content p {
    margin: 0;
    color: var(--ink-600);
    font-size: .9rem;
    line-height: 1.5;
}

/* ============================================================
   SOCIAL CONNECT – footer section with social icons
   ============================================================ */

.sociall-connect {
    background: linear-gradient(135deg,
        var(--primary-blue-light) 0%,
        rgba(245,200,66,.08) 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--ink-800);
    border: 1px solid rgba(16,134,202,.10);
    box-shadow: var(--shadow-sm);
    margin-top: auto;
    animation: fadeInUp .5s .4s var(--ease-out) both;
}

.sociall-connect h6 {
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-600);
    margin-bottom: var(--spacing-lg);
}

.sociall-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sociall-icon {
    color: var(--primary-blue);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--social-icon-size);
    height: var(--social-icon-size);
    border-radius: 50%;
    border: 1.5px solid rgba(16,134,202,.30);
    background: var(--white);
    text-decoration: none;
    transition: all var(--transition) var(--ease-bounce);
    box-shadow: var(--shadow-sm);
}

.sociall-icon:hover {
    background: var(--grad-brand);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-4px) scale(1.08);
    box-shadow: var(--shadow-blue);
}

/* ============================================================
   ANIMATIONS – fadeInUp for cards
   ============================================================ */

.contact-card {
    animation: fadeInUp .5s .05s var(--ease-out) both;
}

/* ============================================================
   RTL OVERRIDES
   ============================================================ */

[dir="rtl"] .input-group-text {
    border-right: 1px solid var(--ink-200);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ============================================================
   RESPONSIVE: TABLET (≤768px)
   ============================================================ */

@media (max-width: 768px) {
    .info-sidebar {
        flex-direction: column;
    }
}

/* ============================================================
   RESPONSIVE: MOBILE (≤576px)
   ============================================================ */

@media (max-width: 576px) {

    .icon-shape {
        width: var(--icon-size-sm);
        height: var(--icon-size-sm);
        font-size: 1.1rem;
        min-width: var(--icon-size-sm);
    }

    .info-content h5 {
        font-size: .92rem;
    }

    .info-content p {
        font-size: .82rem;
    }

    .btn-gradient-submit {
        padding: 12px var(--spacing-lg);
    }

    .sociall-icon {
        width: 38px;
        height: 38px;
        font-size: .9rem;
    }

    .map-card {
        height: 220px;
    }
}

/* ============================================================
   DARK MODE
   ============================================================ */

@media (prefers-color-scheme: dark) {

    :root {
        --bg-body:    #131210;
        --bg-white:   #1e1c18;
        --bg-input:   #131210;
        --bg-social:  #131210;
        --border-light: #312f28;
        --border-card:  rgba(255,255,255,.04);
        --ink-50:  #1e1c18;
        --ink-100: #252320;
        --ink-200: #312f28;
        --ink-400: #7a7568;
        --ink-600: #b0aa9e;
        --ink-800: #e8e4dc;
        --ink-900: #f5f2ec;
    }

    .form-control {
        background-color: #131210;
        color: var(--ink-800);
        border-color: #312f28;
    }

    .form-control:focus {
        background-color: #1e1c18;
        border-color: var(--primary-blue);
    }

    .input-group-text {
        background-color: #131210;
        border-color: #312f28;
        color: var(--primary-blue);
    }

    .input-group:focus-within .input-group-text {
        background: rgba(16,134,202,.12);
    }

    .contact-card.main-form-card,
    .info-item-box {
        background: #1e1c18;
        border-color: rgba(255,255,255,.06);
    }

    .icon-shape {
        background: rgba(16,134,202,.14);
        border-color: rgba(16,134,202,.18);
    }

    .sociall-connect {
        background: linear-gradient(135deg,
            rgba(16,134,202,.10) 0%,
            rgba(245,200,66,.06) 100%);
        border-color: rgba(16,134,202,.14);
    }

    .sociall-icon {
        background: #252320;
        border-color: rgba(16,134,202,.30);
    }

    .gradient-title {
        background: linear-gradient(135deg, #5bb8f5 0%, #4ecfb2 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}