/* =========================================================
   BASE.CSS  -  DESIGN SYSTEM
   ---------------------------------------------------------
   Is file me poore project ke common styles hain:
   colors, fonts, buttons, forms, cards, tables, modal, toast.
   Colors badalne hain to sirf neeche ":root" wale variables
   badal do - poori website ka color change ho jayega.
   ========================================================= */

:root {
    /* ---- Brand colors (IMED logo se liye gaye) ---- */
    --navy-950: #001a40;
    --navy-900: #012f6b;   /* MAIN BRAND COLOR */
    --navy-800: #0a3f86;
    --navy-700: #14509f;
    --navy-600: #1f63bf;
    --navy-200: #c7d8f0;
    --navy-100: #e4edf9;
    --navy-50:  #f1f6fc;

    --gold-500: #f6b900;   /* ACCENT COLOR */
    --gold-600: #d99f00;
    --gold-100: #fff1c2;
    --gold-50:  #fffaea;

    /* ---- Neutral colors ---- */
    --ink:         #0b1b33;
    --text:        #33445c;
    --muted:       #66758b;
    --line:        #e3e8f0;
    --line-strong: #cfd8e6;
    --bg:          #ffffff;
    --bg-soft:     #f6f8fc;
    --bg-tint:     #edf2fa;

    /* ---- Status colors ---- */
    --success:    #12805c;
    --success-bg: #e5f6ee;
    --warning:    #a85a06;
    --warning-bg: #fdf1d3;
    --danger:     #c0392b;
    --danger-bg:  #fdeae7;
    --info:       #1f63bf;
    --info-bg:    #e4edf9;

    /* ---- Fonts ---- */
    --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    /* ---- Layout ---- */
    --container: 1200px;
    --header-height: 76px;

    /* ---- Radius & shadows ---- */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;

    --shadow-xs: 0 1px 2px rgba(11, 27, 51, 0.06);
    --shadow-sm: 0 2px 10px rgba(11, 27, 51, 0.06);
    --shadow:    0 10px 30px rgba(11, 27, 51, 0.08);
    --shadow-lg: 0 22px 60px rgba(11, 27, 51, 0.14);

    --ease: 0.2s ease;
}

/* =========================================================
   RESET
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--navy-700); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--navy-900); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6, p { margin: 0; }

:focus-visible {
    outline: 3px solid rgba(31, 99, 191, 0.45);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--navy-900); color: #fff; }

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 9999;
    background: var(--navy-900);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: top var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--ink);
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

.lead { font-size: 1.125rem; color: var(--text); line-height: 1.75; }
.muted { color: var(--muted); }
.text-center { text-align: center; }
.text-navy { color: var(--navy-900); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy-700);
}
.eyebrow::before {
    content: "";
    width: 36px;
    height: 3px;
    background: var(--gold-500);
    border-radius: 2px;
}

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */

.container {
    width: min(100% - 40px, var(--container));
    margin-inline: auto;
}

.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-tight { padding: 56px 0; }

.section-head { max-width: 960px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { margin: 14px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

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

.stack > * + * { margin-top: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.hidden { display: none !important; }

.icon { display: inline-block; width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.2em; line-height: 0; }
[data-icon], i { font-style: normal; display: inline-flex; align-items: center; }
.icon svg { width: 100%; height: 100%; display: block; }

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--ease), background var(--ease), box-shadow var(--ease), border-color var(--ease), color var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn .icon { width: 1.1em; height: 1.1em; }

.btn-primary { background: var(--navy-900); color: #fff; box-shadow: 0 6px 16px rgba(1, 47, 107, 0.22); }
.btn-primary:hover { background: var(--navy-800); color: #fff; box-shadow: 0 10px 22px rgba(1, 47, 107, 0.28); }

.btn-accent { background: var(--gold-500); color: var(--navy-950); box-shadow: 0 6px 16px rgba(246, 185, 0, 0.32); }
.btn-accent:hover { background: #ffc61f; color: var(--navy-950); }

.btn-outline { background: #fff; color: var(--navy-900); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--navy-900); background: var(--navy-50); color: var(--navy-900); }

.btn-ghost { background: transparent; color: var(--navy-800); }
.btn-ghost:hover { background: var(--navy-50); color: var(--navy-900); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a82f23; color: #fff; }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--navy-800);
}
.link-arrow .icon { transition: transform var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* =========================================================
   CARDS & BADGES
   ========================================================= */

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-xs);
}
.card-hover { transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--navy-200); }

.icon-box {
    flex: none;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--navy-50);
    color: var(--navy-800);
    border: 1px solid var(--navy-100);
}
.icon-box .icon { width: 26px; height: 26px; }
.icon-box.gold { background: var(--gold-50); color: var(--gold-600); border-color: var(--gold-100); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--bg-tint);
    color: var(--navy-800);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-gold    { background: var(--gold-100);   color: #8a6400; }
.badge-plain::before { display: none; }

/* =========================================================
   FORMS
   ========================================================= */

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.field label,
.label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
}
.req { color: var(--danger); margin-left: 2px; }

.input,
.select,
.textarea {
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--ink);
    transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.input::placeholder,
.textarea::placeholder { color: #9aa7ba; }

.input:hover, .select:hover, .textarea:hover { border-color: var(--navy-200); }

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--navy-600);
    box-shadow: 0 0 0 4px rgba(31, 99, 191, 0.14);
}

.select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366758b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

.field-help { font-size: 0.8rem; color: var(--muted); }
.field-error { font-size: 0.8rem; color: var(--danger); display: none; font-weight: 500; }

.field.is-invalid .input,
.field.is-invalid .select,
.field.is-invalid .textarea,
.field.is-invalid .file-drop { border-color: var(--danger); background: #fffafa; }
.field.is-invalid .field-error { display: block; }

.word-counter { font-size: 0.8rem; color: var(--muted); text-align: right; }
.word-counter.over { color: var(--danger); font-weight: 600; }

/* file upload box */
.file-drop {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--ease), background var(--ease);
}
.file-drop:hover { border-color: var(--navy-600); background: var(--navy-50); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-drop .icon-box { width: 42px; height: 42px; border-radius: 10px; flex: none; background: #fff; }
.file-drop .icon-box .icon { width: 20px; height: 20px; }
.file-drop-text { min-width: 0; }
.file-drop-text strong { display: block; font-size: 0.9rem; color: var(--ink); }
.file-drop-text span { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.file-drop.has-file { border-style: solid; border-color: var(--success); background: var(--success-bg); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--navy-900); flex: none; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 28px; }

/* alert boxes */
.alert {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.alert .icon { margin-top: 2px; }
.alert-info    { background: var(--info-bg);    color: #174a8f; border-color: #c7d8f0; }
.alert-success { background: var(--success-bg); color: #0d6347; border-color: #bfe6d4; }
.alert-warning { background: var(--warning-bg); color: #7d4304; border-color: #f4dc9c; }
.alert-danger  { background: var(--danger-bg);  color: #9a2c21; border-color: #f4c6c0; }

.search-box { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box .input { padding-left: 42px; }

/* =========================================================
   TABLES
   ========================================================= */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
table.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 640px; }
.table th {
    padding: 13px 16px;
    text-align: left;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-soft); }
.table .cell-title { font-weight: 600; color: var(--ink); }
.table .cell-sub { font-size: 0.8rem; color: var(--muted); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    transition: var(--ease);
}
.icon-btn:hover { color: var(--navy-900); border-color: var(--navy-200); background: var(--navy-50); }
.icon-btn.danger:hover { color: var(--danger); border-color: #f4c6c0; background: var(--danger-bg); }
.icon-btn .icon { width: 17px; height: 17px; }

.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    color: var(--muted);
}
.empty-state .icon-box { margin: 0 auto 16px; }
.empty-state h4 { font-family: var(--font-body); color: var(--ink); margin-bottom: 6px; font-size: 1.05rem; }

/* =========================================================
   MODAL
   ========================================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(11, 27, 51, 0.5);
    backdrop-filter: blur(3px);
}
.modal-backdrop.open { display: flex; animation: fadeIn 0.18s ease; }

.modal {
    width: min(100%, 640px);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: popIn 0.22s ease;
}
.modal.modal-lg { width: min(100%, 820px); }
.modal.modal-sm { width: min(100%, 440px); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}
.modal-header h3 { font-size: 1.2rem; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.detail-list { display: grid; grid-template-columns: 170px 1fr; gap: 12px 20px; font-size: 0.92rem; }
.detail-list dt { color: var(--muted); font-weight: 500; }
.detail-list dd { margin: 0; color: var(--ink); font-weight: 500; word-break: break-word; }

/* =========================================================
   TOAST
   ========================================================= */

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 40px);
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--navy-600);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.92rem;
    color: var(--ink);
    animation: slideUp 0.25s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.success .icon { color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.error .icon { color: var(--danger); }
.toast.info .icon { color: var(--navy-600); }

/* =========================================================
   TABS, CHIPS, ACCORDION
   ========================================================= */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 8px 16px;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 600;
    transition: var(--ease);
}
.chip:hover { border-color: var(--navy-600); color: var(--navy-900); }
.chip.active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

.accordion { display: grid; gap: 12px; }
.accordion details {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: var(--ease);
}
.accordion details[open] { border-color: var(--navy-200); box-shadow: var(--shadow-sm); }
.accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--ink);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
    content: "+";
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--navy-50);
    color: var(--navy-800);
    font-size: 1.2rem;
    line-height: 1;
}
.accordion details[open] summary::after { content: "\2212"; background: var(--navy-900); color: #fff; }
.accordion .accordion-body { padding: 0 22px 20px; color: var(--muted); }

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn   { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin    { to { transform: rotate(360deg); } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE (base)
   ========================================================= */

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .section { padding: 60px 0; }
    .section-head { margin-bottom: 36px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .card { padding: 22px; }
    .detail-list { grid-template-columns: 1fr; gap: 2px 0; }
    .detail-list dd { margin-bottom: 12px; }
    .modal-body { padding: 20px; }
    .toast-stack { left: 20px; right: 20px; bottom: 16px; }
    .toast { min-width: 0; }
}

@media print {
    .no-print { display: none !important; }
}

/* Titles: first letter of every word is capital, site-wide (also for headings drawn by JavaScript) */
h1, h2, h3 { text-transform: capitalize; }

/* =========================================================
   FLAT STYLE: no drop shadows on buttons, tiles or cards.
   Separation comes from 1px borders instead.
   (Focus rings are kept for keyboard accessibility.)
   ========================================================= */
*:not(:focus):not(:focus-visible), *::before, *::after { box-shadow: none !important; }
.btn { border-width: 1px; }
.btn-primary { border-color: var(--navy-900); }
.btn-accent { border-color: var(--gold-500); }
.brochure-card { border: 1px solid var(--navy-900); }
.site-header { border-bottom: 1px solid var(--line); }
.hero-card, .nav-dropdown, .dropdown, .dropdown-menu, .toast, .modal { border: 1px solid var(--line-strong); }
.whatsapp-float, .whatsapp-card, .back-to-top, .scroll-top { border: 1px solid var(--line-strong); }
