﻿/* ==============================
   Vars & Base
   ============================== */
:root {
    --gold: #d4af37;
    --dark: #1b1b1b;
    --light: #ffffff;
    --muted: #f6f6f6;
    --ink: #333;
    --teal: #00c8c8;
    --shadow: 0 10px 30px rgba(0,0,0,.12);
    --radius: 18px;
    --transition: .25s ease;
}

* {
    box-sizing: border-box
}

html, body {
    margin: 0
}

body {
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial,sans-serif;
    background: #fff;
    color: var(--ink);
}

/* Utility */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px
}

.btn-gold {
    display: inline-block;
    background: var(--gold);
    color: #fff;
    padding: .65rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    transition: filter var(--transition),transform var(--transition)
}

    .btn-gold:hover {
        filter: brightness(1.05);
        transform: translateY(-1px)
    }

.page-section {
    position: relative;
    padding: 2.5rem 0
}

.no-bg::before {
    display: none
}

/* ==============================
   Hero
   ============================== */
.hero {
    position: relative;
    min-height: 56vh;
    display: grid;
    place-items: center;
    background: #111 center/cover no-repeat;
    color: #fff;
    text-align: center;
}

    .hero .overlay {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,.55)
    }

    .hero .container {
        position: relative;
        z-index: 1
    }

    .hero h1 {
        font-size: clamp(2rem,4vw,3rem);
        margin: .25rem 0 .5rem
    }

    .hero p {
        opacity: .95;
        margin: 0 0 1rem
    }

/* ==============================
   Section title
   ============================== */
.title-with-sub {
    text-align: center;
    color: #111;
    font-weight: 800;
    letter-spacing: .3px;
    margin: 2.25rem 0 1rem;
}

    .title-with-sub::after {
        content: "";
        display: block;
        width: 120px;
        height: 6px;
        margin: .75rem auto 0;
        border-radius: 6px;
        background: linear-gradient(to right,transparent,var(--gold),transparent);
        opacity: .7;
    }

/* ==============================
   Why cards
   ============================== */
.why-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1rem;
}

.why-item {
    flex: 1 1 260px;
    max-width: 320px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    padding: 1.8rem 1.4rem;
    text-align: center;
    transition: transform var(--transition),box-shadow var(--transition);
}

    .why-item:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 24px rgba(0,0,0,.12)
    }

    .why-item i {
        font-size: 2rem;
        color: #00b7b7;
        margin-bottom: .75rem;
        display: inline-block
    }

    .why-item p {
        margin: 0;
        font-weight: 600;
        color: #333
    }

/* ==============================
   Institute cards (visa-card style)
   ============================== */
.card-container {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 1rem
}

.visa-card {
    width: 320px;
    height: 250px;
    position: relative;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition),box-shadow var(--transition);
}

    .visa-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 14px 30px rgba(0,0,0,.12)
    }

.bg-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block
}

.flag-circle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 136px;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    display: grid;
    place-items: center;
}

    .flag-circle img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%
    }

.caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    text-align: center;
    font-weight: 800;
    color: #fff; /* makes text white */
}


/* ==============================
   Contact layout (map + form)
   ============================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.5rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 960px) {
    .contact-grid {
        grid-template-columns: 1fr
    }
}

.contact-card {
    background: linear-gradient(180deg,#3f3f3f,#494949);
    color: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    border-top: 6px solid var(--gold);
    box-shadow: 0 18px 45px rgba(0,0,0,.18);
    overflow: visible;
}

.contact-card__header {
    margin-bottom: 1rem
}

    .contact-card__header h2 {
        color: var(--gold);
        font-weight: 800;
        margin: .2rem 0
    }

    .contact-card__header p {
        color: #ddd;
        margin: 0
    }

/* Form grid inside card */
.contact-card .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1.1rem
}

.fg {
    display: flex;
    flex-direction: column;
    gap: .35rem
}

    .fg label {
        font-weight: 800;
        color: #f7f7f7
    }

        .fg label span {
            color: #ffb3b3
        }

.input, .textarea, .contact-card select {
    width: 100%;
    background: #fff;
    color: #000;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: .85rem 1rem;
    font-size: 1rem;
    transition: box-shadow var(--transition),border-color var(--transition);
}

    .input:focus, .textarea:focus, .contact-card select:focus {
        border-color: var(--gold);
        box-shadow: 0 0 0 4px rgba(212,175,55,.18);
        outline: 0;
    }

.textarea {
    resize: vertical;
    min-height: 140px
}

.val-msg {
    color: #ffd5d5;
    font-size: .92rem
}

.actions {
    display: flex;
    justify-content: flex-end
}

.btn-submit {
    background: var(--gold);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: .9rem 1.4rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(212,175,55,.35);
    transition: transform .06s ease,box-shadow var(--transition),filter var(--transition);
}

    .btn-submit:hover {
        filter: brightness(1.05);
        box-shadow: 0 12px 28px rgba(212,175,55,.45)
    }

    .btn-submit:active {
        transform: translateY(1px)
    }

/* Map/branch card helpers */
.branch-box {
    background: #00c8c8;
    border-radius: 16px;
    padding: 1rem
}

.branch-line {
    border: 0;
    border-top: 1px solid #b6ece8;
    margin: .8rem 0
}

/* ==============================
   LTR / RTL handling
   ============================== */
[dir="rtl"] .info-card {
    text-align: right
}

[dir="rtl"] .why-grid {
    direction: rtl
}

[dir="rtl"] .contact-card .actions {
    justify-content: flex-start
}

[dir="rtl"] .caption {
    direction: rtl
}

[dir="rtl"] .contact-card .fg label {
    text-align: right
}

[dir="rtl"] .contact-card .input,
[dir="rtl"] .contact-card select,
[dir="rtl"] .contact-card .textarea {
    text-align: right
}

/* Keep the other column order intuitive on small screens */
@media (max-width:960px) {
    [dir="rtl"] .contact-grid > .contact-card:first-child {
        order: 2
    }

    [dir="rtl"] .contact-grid > .contact-card:last-child {
        order: 1
    }
}

/* ==============================
   Small tweaks
   ============================== */
.optional {
    opacity: .7;
    font-weight: 600;
    margin-inline-start: .25rem
}

/* ==== Study page: form full width (no map) ==== */
.contact-grid {
    /* one column only */
    grid-template-columns: 1fr !important;
    max-width: 1100px; /* or 100% if you don't use .container */
    gap: 0; /* optional: tighten spacing */
}

    /* make the card take the full grid width */
    .contact-grid > .contact-card {
        grid-column: 1 / -1;
        width: 100%;
    }

/* optional: center within the page section container */
.page-section .contact-grid {
    margin-left: auto;
    margin-right: auto;
}

/* keep internal form fields stacked as-is */
.contact-card .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}


/* Fix alignment of form fields in RTL */
[dir="rtl"] .fg {
    text-align: right;
}

    [dir="rtl"] .fg label {
        display: inline-block;
        text-align: right;
        width: 100%;
    }

[dir="rtl"] .input,
[dir="rtl"] .textarea,
[dir="rtl"] select {
    direction: rtl; /* makes text and arrow align right */
    text-align: right; /* text aligned right inside the box */
}

[dir="rtl"] select {
    padding-right: 1rem; /* space for text */
    padding-left: 0.5rem; /* less space on left */
}

/* ---------- RTL form alignment ---------- */
[dir="rtl"] .fg {
    text-align: right;
}

    [dir="rtl"] .fg label {
        display: block;
        width: 100%;
        text-align: right;
    }

/* ---------- RTL select: right-aligned text + LEFT caret ---------- */
[dir="rtl"] .contact-card select,
[dir="rtl"] select.input {
    direction: rtl; /* numbers/words flow RTL */
    text-align: right; /* value to the right */
    padding-right: 1rem; /* breathing room on the right */
    padding-left: 2.2rem; /* space for the left caret */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-repeat: no-repeat;
    background-size: 12px 12px;
    /* small down arrow SVG, placed on the LEFT in RTL */
    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-position: 10px 50%; /* left side */
}

/* Keep LTR selects normal with caret on the right */
[dir="ltr"] .contact-card select,
[dir="ltr"] select.input {
    direction: ltr;
    text-align: left;
    padding-left: 1rem;
    padding-right: 2.2rem; /* space for right caret */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-repeat: no-repeat;
    background-size: 12px 12px;
    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-position: calc(100% - 10px) 50%; /* right side */
}
