/* ==========================================================================
   DBIM v3.0 – Home page styles (Embassy of India, Reykjavik)
   Path: public_files/assets/css/dbim-home.css
   Colour group: Blue | Typeface: Noto Sans | Scoped to .dbim-home
   ========================================================================== */

.dbim-home {
    /* Primary colour group – Blue (darkest → lightest) */
    --dbim-key: #162F6A;
    --dbim-blue-2: #214AAB;
    --dbim-blue-3: #5279D7;
    --dbim-blue-4: #A3BBF3;
    --dbim-blue-5: #D2DFFF;

    /* Functional colours */
    --dbim-text: #150202;      /* Deep Earthy Brown – text on light bg */
    --dbim-linen: #EBEAEA;     /* Linen – highlight backgrounds */
    --dbim-white: #FFFFFF;     /* Inclusive White */
    --dbim-grey-dark: #606060;
    --dbim-grey: #8E8E8E;
    --dbim-grey-light: #C6C6C6;
    --dbim-link: #0D6EFD;
    --dbim-error: #DC3545;

    --dbim-font: "Noto Sans", Arial, sans-serif;

    color: var(--dbim-text);
}

/* ---------- Typeface: Noto Sans everywhere (icons <i> untouched) ---------- */
.dbim-home :is(h1, h2, h3, h4, h5, h6, p, a, span, li, button, time, strong, b, address, ol, ul, blockquote) {
    font-family: var(--dbim-font) !important;
}

/* ---------- Type scale – desktop ---------- */
.dbim-home h1 { font-size: 36px; font-weight: 700; line-height: 1.2; }
.dbim-home h2,
.dbim-home .dbim-section-title { font-size: 24px; font-weight: 600; line-height: 1.3; color: var(--dbim-key); }
.dbim-home h3,
.dbim-home .dbim-card-title { font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--dbim-key); }
.dbim-home p { font-size: 16px; line-height: 1.5; text-align: left; }

/* ---------- Utilities ---------- */
.dbim-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
.dbim-img-fluid { display: block; max-width: 100%; width: 100%; height: auto; }
.dbim-section-linen { background: var(--dbim-linen); }
.dbim-section-gap { margin-top: 32px; margin-bottom: 32px; }

/* ---------- Links: visible hover & focus states ---------- */
.dbim-home a { transition: color .15s ease, background-color .15s ease; }
.dbim-home a:hover { text-decoration: underline; }
.dbim-home a:focus-visible,
.dbim-home button:focus-visible {
    outline: 3px solid var(--dbim-blue-2);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ---------- Updates ticker ---------- */
.dbim-ticker {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--dbim-key);
    color: var(--dbim-white);
    padding: 8px 16px;
}
.dbim-ticker__label {
    flex: 0 0 auto;
    font-family: var(--dbim-font);
    font-size: 16px;
    font-weight: 600;
    padding-right: 12px;
    border-right: 2px solid var(--dbim-blue-4);
}
.dbim-ticker__viewport { flex: 1 1 auto; overflow: hidden; min-width: 0; }
.dbim-ticker__track {
    display: inline-flex;
    gap: 32px;
    margin: 0;
    padding: 0 0 0 100%;
    list-style: none;
    white-space: nowrap;
    animation: dbim-ticker-scroll 45s linear infinite;
}
.dbim-ticker__item { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; }
.dbim-ticker__item::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--dbim-blue-4);
    margin-right: 6px;
}
.dbim-ticker__item a { color: var(--dbim-white); font-weight: 500; text-decoration: none; }
.dbim-ticker__item a:hover,
.dbim-ticker__item a:focus-visible { color: var(--dbim-blue-5); text-decoration: underline; }
.dbim-ticker__item a:focus-visible { outline-color: var(--dbim-white); }
.dbim-ticker__item i { color: var(--dbim-white); font-size: 12px; }

/* Pause on hover, keyboard focus, or the Pause button */
.dbim-ticker:hover .dbim-ticker__track,
.dbim-ticker:focus-within .dbim-ticker__track,
.dbim-ticker.is-paused .dbim-ticker__track { animation-play-state: paused; }

.dbim-ticker__toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 4px 12px;
    border: 1px solid var(--dbim-white);
    border-radius: 4px;
    background: transparent;
    color: var(--dbim-white);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.dbim-ticker__toggle:hover { background: var(--dbim-blue-2); }
.dbim-ticker__toggle:focus-visible { outline-color: var(--dbim-white) !important; }
.dbim-ticker__icon--play { display: none; }
.dbim-ticker.is-paused .dbim-ticker__icon--play { display: inline; }
.dbim-ticker.is-paused .dbim-ticker__icon--pause { display: none; }

@keyframes dbim-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .dbim-ticker__track { animation: none; padding-left: 0; flex-wrap: wrap; white-space: normal; }
}

/* ---------- News lists (What's New / Press / Alerts / Tenders) ---------- */
.dbim-home .recordBox a.mar {
    font-size: 16px;
    line-height: 1.5;
    color: var(--dbim-text);
    font-weight: 500;
}
.dbim-home .recordBox a.mar:hover { color: var(--dbim-blue-2); }
.dbim-date {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--dbim-grey-dark);
}
.dbim-date i { color: var(--dbim-key); margin-right: 4px; }
.dbim-inline-icon,
.dbim-new { height: 1em; width: auto; vertical-align: middle; margin-left: 4px; }

.dbim-view-all-wrap { padding-top: 16px; }
.dbim-home .dbim-view-all {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    background: var(--dbim-key);
    color: var(--dbim-white);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.dbim-home .dbim-view-all:hover { background: var(--dbim-blue-2); color: var(--dbim-white); text-decoration: none; }
.dbim-home .dbim-view-all--light { background: var(--dbim-white); color: var(--dbim-key); }
.dbim-home .dbim-view-all--light:hover { background: var(--dbim-blue-5); color: var(--dbim-key); }

/* ---------- Facebook / gallery ---------- */
.dbim-fb-page { padding: 2%; }
.dbim-scroll-box { overflow: auto; position: relative; height: 250px; }
.dbim-album { width: 100%; padding: 2%; }
.dbim-album .post-date { text-align: center; }
.dbim-album .mar1 i { font-size: 12px; }
.dbim-ext-icon { font-size: 12px; color: var(--dbim-key); }

/* ---------- Right column cards ---------- */
.dbim-card { padding: 0 12px 16px; }
.dbim-card-text { font-size: 14px !important; text-align: center !important; margin-top: 10px; margin-bottom: 10px; }
.dbim-safetravel { display: inline-block; margin: 4px auto 0; }
.important_links_sub_2 { text-align: center; }
.dbim-emergency { text-align: center !important; margin: 0; }
.dbim-home .dbim-emergency__number {
    font-size: 16px;
    font-weight: 700;
    color: var(--dbim-error);
}

/* ---------- Important links ---------- */
.dbim-home .dbim-service-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    color: var(--dbim-text);
    text-decoration: none;
}
.dbim-home .dbim-service-link:hover { background: var(--dbim-blue-5); text-decoration: none; }
.dbim-service-link__text { font-size: 14px; font-weight: 500; color: var(--dbim-text);padding: 8px; }

/* ---------- Tenders panel ---------- */
.dbim-home .dbim-tender {
    background: var(--dbim-key) !important;
    border-radius: 6px;
    min-height: 465px;
    padding-bottom: 16px;
}
.dbim-home .dbim-tender__title {
    position: relative;
    margin: 0;
    padding: 16px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: var(--dbim-white);
    border-bottom: 2px solid var(--dbim-white);
}
.dbim-tender__list { height: 350px; overflow: auto; }
.dbim-home .dbim-list--dark .recordBox a.mar { color: var(--dbim-white); font-size: 14px; }
.dbim-home .dbim-list--dark .recordBox a.mar:hover { color: var(--dbim-blue-5); }
.dbim-home .dbim-list--dark .dbim-date,
.dbim-home .dbim-list--dark .dbim-date i { color: var(--dbim-blue-5); }
.dbim-home .dbim-list--dark a:focus-visible { outline-color: var(--dbim-white); }

/* ---------- Contact ---------- */
.dbim-home .dbim-contact-note { font-size: 14px; text-align: center; font-weight: 500; }
.dbim-contact-icon { color: var(--dbim-key); font-size: 26px; }
.dbim-address { font-style: normal; margin: 0; }
.dbim-map { width: 100%; margin: 1%; border: 0; border-radius: 12px; }

/* ---------- Mobile type scale ---------- */
@media (max-width: 767px) {
    .dbim-home h1 { font-size: 24px; }
    .dbim-home h2,
    .dbim-home .dbim-section-title { font-size: 20px; }
    .dbim-home h3,
    .dbim-home .dbim-card-title,
    .dbim-home .dbim-tender__title { font-size: 16px; }
    .dbim-home p,
    .dbim-ticker__item,
    .dbim-ticker__label,
    .dbim-home .recordBox a.mar { font-size: 14px; }
    .dbim-date,
    .dbim-card-text,
    .dbim-home .dbim-contact-note,
    .dbim-service-link__text,
    .dbim-home .dbim-list--dark .recordBox a.mar { font-size: 12px !important; }

    .dbim-ticker { padding: 6px 12px; gap: 8px; }
    .dbim-ticker__toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}
