/* İME-DC add-on components: news band, brand strip, category listing cards,
   legal warning modal, contact form selector. Loaded only when one of these
   is actually on the page — the frozen theme files are never touched. */

:root {
    --imedc-red: #c90c0f;
    --imedc-red-dark: #a10a0c;
    --imedc-ink: #333;
    --imedc-muted: #777;
    --imedc-line: #e7e7e7;
}

/* ------------------------------- bands -------------------------------- */
.imedc-band { background: #f7f7f7; border-top: 1px solid var(--imedc-line); }
.imedc-band-in { max-width: 1200px; margin: 0 auto; padding: 56px 30px; }
.imedc-band-title {
    font-size: 26px; line-height: 1.25; color: var(--imedc-ink);
    margin: 0 0 30px; text-align: center; font-weight: 600;
}
.imedc-band-title::after {
    content: ""; display: block; width: 56px; height: 3px;
    background: var(--imedc-red); margin: 14px auto 0;
}

/* ------------------------------ news band ------------------------------ */
.imedc-news-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.imedc-news-card {
    flex: 1 1 300px; max-width: 368px; display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--imedc-line); border-radius: 6px;
    overflow: hidden; text-decoration: none; color: var(--imedc-ink);
    transition: box-shadow .25s ease, transform .25s ease;
}
.imedc-news-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.10); transform: translateY(-3px); color: var(--imedc-ink); }
.imedc-news-img { display: block; aspect-ratio: 16/9; overflow: hidden; }
.imedc-news-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imedc-news-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.imedc-news-date { font-size: 12px; color: var(--imedc-muted); letter-spacing: .04em; text-transform: uppercase; }
.imedc-news-title { font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--imedc-ink); }
.imedc-news-excerpt { font-size: 14px; line-height: 1.6; color: #555; }
.imedc-news-more { font-size: 13px; font-weight: 600; color: var(--imedc-red); margin-top: 4px; }
.imedc-news-card:hover .imedc-news-more { color: var(--imedc-red-dark); }

/* ----------------------------- brand strip ----------------------------- */
.imedc-brands-band { background: #fff; }
.imedc-brands-band .imedc-band-in { padding: 34px 30px; }
.imedc-brands { overflow: hidden; position: relative; }
.imedc-brands-static { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: center; }
.imedc-brands-track {
    display: flex; align-items: center; gap: 64px; width: max-content;
    animation: imedc-brands-flow 36s linear infinite;
}
.imedc-brands-flow:hover .imedc-brands-track { animation-play-state: paused; }
@keyframes imedc-brands-flow { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.imedc-brand { display: inline-flex; align-items: center; justify-content: center; }
.imedc-brand img {
    max-height: 56px; max-width: 160px; width: auto; height: auto; display: block;
    filter: grayscale(1); opacity: .65; transition: filter .25s ease, opacity .25s ease;
}
.imedc-brand:hover img { filter: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .imedc-brands-track { animation: none; } }

/* -------------------------- category listing --------------------------- */
.imedc-cat-listing { margin-top: 10px; }
.imedc-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 14px; background: #fff; border: 1px solid var(--imedc-line); border-radius: 6px;
    padding: 26px 22px; margin-bottom: 24px; text-decoration: none; color: var(--imedc-ink);
    transition: box-shadow .25s ease, transform .25s ease;
    min-height: 120px; justify-content: center;
}
a.imedc-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.10); transform: translateY(-3px); color: var(--imedc-ink); }
.imedc-card-img { display: block; height: 120px; }
.imedc-card-img img { max-height: 120px; max-width: 100%; width: auto; margin: 0 auto; }
.imedc-card-title { font-size: 16px; font-weight: 600; line-height: 1.35; }
.imedc-card-more { font-size: 13px; font-weight: 600; color: var(--imedc-red); }
.imedc-card-static .imedc-card-more { display: none; }

/* --------------------------- warning modal ----------------------------- */
.imedc-warn-overlay {
    position: fixed; inset: 0; z-index: 999999; display: none;
    align-items: center; justify-content: center;
    background: rgba(20, 20, 20, .55); padding: 20px;
}
html.imedc-warn-open, html.imedc-warn-open body { overflow: hidden; }
.imedc-warn-card {
    position: relative; background: #fff; border-radius: 8px; max-width: 560px;
    width: 100%; max-height: 84vh; display: flex; flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.28); overflow: hidden;
    border-top: 4px solid var(--imedc-red);
}
.imedc-warn-body { padding: 30px 34px 10px; overflow-y: auto; color: var(--imedc-ink); font-size: 15px; line-height: 1.65; }
.imedc-warn-body p { margin: 0 0 12px; }
.imedc-warn-body strong { color: var(--imedc-red); }
.imedc-warn-actions { padding: 8px 34px 26px; text-align: center; }
.imedc-warn-btn {
    background: var(--imedc-red); color: #fff; border: 0; border-radius: 4px;
    padding: 11px 34px; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .2s ease;
}
.imedc-warn-btn:hover { background: var(--imedc-red-dark); }
.imedc-warn-close {
    position: absolute; top: 8px; right: 10px; background: none; border: 0;
    font-size: 26px; line-height: 1; color: #999; cursor: pointer; padding: 6px;
}
.imedc-warn-close:hover { color: var(--imedc-ink); }

/* ------------------------ contact form selector ------------------------ */
.imedc-form-picker { margin: 0 0 30px; }
.imedc-form-picker-label { display: block; font-weight: 600; margin-bottom: 14px; color: var(--imedc-ink); font-size: 16px; }
.imedc-form-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.imedc-form-chip {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background: #fff; color: var(--imedc-ink); border: 1px solid #cfcfcf; border-radius: 999px;
    padding: 9px 18px; font-size: 14px; line-height: 1.4; font-family: inherit; font-weight: 500;
    transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
    height: auto; min-height: 0; /* neutralize theme button sizing */
}
.imedc-form-chip:hover { border-color: var(--imedc-red); color: var(--imedc-red); }
.imedc-form-chip.on {
    background: var(--imedc-red); border-color: var(--imedc-red); color: #fff;
    box-shadow: 0 4px 14px rgba(201, 12, 15, .25);
}
.imedc-form-chip:focus-visible { outline: 2px solid var(--imedc-red); outline-offset: 2px; }
.imedc-form-intro { margin: 0 0 22px; color: #555; }
.imedc-form-pane { display: none; }
.imedc-form-pane.on { display: block; }

@media (max-width: 760px) {
    .imedc-band-in { padding: 40px 20px; }
    .imedc-news-card { max-width: none; }
}

/* ------------------------- certificates grid --------------------------- */
.imedc-cert-grid { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; margin: 6px 0 34px; }
.imedc-cert { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 200px;
    text-decoration: none; color: var(--imedc-ink); }
.imedc-cert img { max-width: 100%; max-height: 240px; width: auto; border: 1px solid var(--imedc-line);
    background: #fff; padding: 6px; transition: box-shadow .25s ease, transform .25s ease; }
a.imedc-cert:hover img { box-shadow: 0 12px 26px rgba(0,0,0,.14); transform: translateY(-3px); }
.imedc-cert-title { font-size: 13px; text-align: center; line-height: 1.4; color: #555; }

/* --------------------------- newsletter band --------------------------- */
.imedc-nl-band { background: #f2f2f2; }
.imedc-nl-band .imedc-band-in { max-width: 760px; text-align: center; }
.imedc-nl-text { margin: -14px 0 26px; color: #555; font-size: 15px; line-height: 1.6; }
.imedc-nl-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.imedc-nl-row input[type=email] {
    flex: 1 1 300px; max-width: 420px; padding: 12px 16px; font-size: 15px;
    border: 1px solid #ccc; border-radius: 4px; background: #fff; color: var(--imedc-ink);
}
.imedc-nl-btn {
    background: var(--imedc-red); color: #fff; border: 0; border-radius: 4px;
    padding: 12px 30px; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .2s ease; height: auto; min-height: 0;
}
.imedc-nl-btn:hover { background: var(--imedc-red-dark); }
.imedc-nl-btn:disabled { background: #9aa; cursor: default; }
.imedc-nl-lists { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.imedc-nl-list { font-size: 14px; color: var(--imedc-ink); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.imedc-nl-kvkk { display: block; font-size: 12.5px; color: #777; max-width: 560px; margin: 0 auto; line-height: 1.55; cursor: pointer; }
.imedc-nl-kvkk a { color: var(--imedc-red); text-decoration: underline; }
.imedc-nl-msg { min-height: 20px; margin-top: 12px; font-size: 14px; font-weight: 600; }
.imedc-nl-msg.ok { color: #1f8a4c; }
.imedc-nl-msg.err { color: var(--imedc-red); }
.imedc-custom-band { background: #fff; }

/* ---------------------- floating WhatsApp button ----------------------- */
.imedc-wa {
    position: fixed; right: 18px; bottom: 18px; z-index: 99990;
    display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25d366; color: #fff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transition: transform .18s ease, box-shadow .18s ease;
}
.imedc-wa svg { width: 30px; height: 30px; display: block; }
.imedc-wa:hover,
.imedc-wa:focus { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
/* keep the theme's "go to top" arrow clear of the button */
html.imedc-has-wa .scroll-top { bottom: 84px; }
@media (max-width: 767px) {
    .imedc-wa { width: 50px; height: 50px; right: 14px; bottom: 14px; }
    .imedc-wa svg { width: 27px; height: 27px; }
    html.imedc-has-wa .scroll-top { bottom: 76px; }
}

/* ------------------------- TR | EN language switch ---------------------- */
/* Sits OUTSIDE the theme-managed widget containers (The7 clones/moves those
   on scroll & resize, which made an embedded switcher unclickable). It is a
   plain absolutely-positioned child of the top bar instead. */
.imedc-lang-switch {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; letter-spacing: .08em; vertical-align: middle;
}
.imedc-lang-switch a {
    color: inherit; text-decoration: none; opacity: .62;
    font-weight: 600; transition: opacity .15s ease;
    padding: 6px 4px; display: inline-block;
}
.imedc-lang-switch a:hover { opacity: 1; }
.imedc-lang-switch a.on { opacity: 1; pointer-events: none; }
.imedc-lang-sep { opacity: .35; }
.top-bar { position: relative; }
.top-bar > .imedc-lang-switch {
    position: absolute; right: 25px; top: 50%; transform: translateY(-50%);
    z-index: 30; line-height: 1;
}
/* clear the corner so the switch never overlaps the search/YouTube icons */
.top-bar .right-widgets { padding-right: 58px; }
@media (max-width: 990px) {
    .top-bar > .imedc-lang-switch { display: none; } /* the mobile menu has its own */
}
.mobile-mini-widgets-in-menu .imedc-lang-switch {
    display: flex; justify-content: center; padding: 16px 0 22px;
    font-size: 14px;
}

/* -------------------- Turkish-authoritative legal note ------------------ */
.imedc-legal-note {
    margin: 26px 0 6px; padding: 12px 18px; border-left: 3px solid var(--imedc-red);
    background: #f9f4f4; color: #555; font-size: 13.5px; line-height: 1.6;
}

/* --------------------- news post featured image ------------------------ */
.imedc-post-img { text-align: center; }
.imedc-post-img img {
    height: 220px !important; width: auto !important;
    max-width: 100%; object-fit: contain; display: inline-block;
}
@media (max-width: 767px) { .imedc-post-img img { height: 160px !important; } }

/* ============================== mobile pass ============================= */
@media (max-width: 990px) {
    /* compact header: keep the logo inside the slim mobile bar */
    .masthead .mobile-branding img,
    .masthead-mobile-header .mobile-branding img,
    .mobile-header-bar .mobile-branding img,
    .dt-mobile-header .mobile-branding img {
        max-height: 46px !important; width: auto !important; height: auto !important;
    }
}
@media (max-width: 767px) {
    .imedc-band-in { padding: 38px 18px; }
    .imedc-band-title { font-size: 21px; margin-bottom: 24px; }
    .imedc-brands-band .imedc-band-in { padding: 26px 18px; }
    .imedc-brand img { max-height: 44px; max-width: 130px; }
    .imedc-brands-track { gap: 44px; }
    .imedc-news-body { padding: 16px 16px 18px; }
    .imedc-form-picker-label { font-size: 15px; }
    .imedc-form-chip { padding: 8px 14px; font-size: 13px; }
    .imedc-form-pane .wpcf7-form input[type="text"],
    .imedc-form-pane .wpcf7-form input[type="email"],
    .imedc-form-pane .wpcf7-form input[type="tel"],
    .imedc-form-pane .wpcf7-form select,
    .imedc-form-pane .wpcf7-form textarea { width: 100%; box-sizing: border-box; }
    .imedc-warn-overlay { padding: 14px; }
    .imedc-warn-body { padding: 24px 20px 8px; font-size: 14px; }
    .imedc-warn-actions { padding: 8px 20px 22px; }
    .imedc-nl-lists { gap: 12px; }
    .imedc-cert { width: 42%; min-width: 132px; }
    .imedc-cert img { max-height: 190px; }
    .imedc-card-img { height: 100px; }
    .imedc-card-img img { max-height: 100px; }
    /* wide spec tables scroll sideways instead of breaking the page */
    #content .wpb_wrapper table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
}

/* ------------------ footer logo rows (members / certs) ------------------ */
.imedc-logo-band { background: #fff; }
.imedc-logo-band .imedc-band-in { padding: 22px 30px; }
.imedc-logo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 44px; }
.imedc-logo-item { display: inline-flex; align-items: center; justify-content: center; }
.imedc-logo-item img { max-height: 52px; max-width: 150px; width: auto; height: auto; display: block; }
a.imedc-logo-item { transition: transform .2s ease; }
a.imedc-logo-item:hover { transform: translateY(-2px); }
@media (max-width: 767px) {
    .imedc-logo-band .imedc-band-in { padding: 16px 18px; }
    .imedc-logo-row { gap: 14px 28px; }
    .imedc-logo-item img { max-height: 40px; max-width: 116px; }
}

/* ---------------- footer social icons (bottom bar) ---------------------- */
#bottom-bar .wf-float-right { display: flex; align-items: center; height: 100%; }
.imedc-social { display: inline-flex; align-items: center; gap: 16px; }
.imedc-social a, .imedc-social > span { display: inline-flex; line-height: 0; }
.imedc-social img { height: 22px; width: auto; display: block; opacity: .85; transition: opacity .15s ease; }
.imedc-social a:hover img { opacity: 1; }
@media (max-width: 767px) {
    #bottom-bar .wf-float-right { height: auto; justify-content: center; width: 100%; }
    .imedc-social { padding: 8px 0 2px; }
    .imedc-social img { height: 24px; }
}
