/**
 * Evkaf site-wide type scale. Loaded after typography.css.
 * rem units respect the browser's default text size; fluid headings scale
 * between phone and desktop. Role rules override previous widget values.
 */
:root {
    --evkaf-size-display: clamp(2.375rem, 1.75rem + 2.2vw, 3.75rem);
    --evkaf-size-h1: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
    --evkaf-size-h2: clamp(1.5625rem, 1.2rem + 1.2vw, 2.125rem);
    --evkaf-size-h3: clamp(1.25rem, 1.05rem + .65vw, 1.5rem);
    --evkaf-size-h4: clamp(1.125rem, 1rem + .35vw, 1.25rem);
    --evkaf-size-h5: 1rem;
    --evkaf-size-h6: .9375rem;
    --evkaf-size-body: .9375rem;
    --evkaf-size-input: 1rem;
    --evkaf-size-lead: clamp(.9375rem, .9rem + .15vw, 1rem);
    --evkaf-size-card: clamp(1.0625rem, 1rem + .2vw, 1.125rem);
    --evkaf-size-control: .8125rem;
    --evkaf-size-small: .8125rem;
    --evkaf-size-label: .75rem;
    --evkaf-size-year: clamp(3rem, 2.4rem + 2vw, 4rem);
    --evkaf-weight-regular: 400;
    --evkaf-weight-medium: 500;
    --evkaf-weight-semibold: 600;
    --evkaf-weight-bold: 700;
    --evkaf-leading-body: 1.7;
    --evkaf-leading-heading: 1.22;
    --evkaf-leading-card: 1.45;
    --evkaf-leading-control: 1.45;
    --evkaf-tracking-heading: -.025em;
}

/* Elementor's standard and UiCore global typography roles. */
:root body,
body [class*='elementor-kit-'] {
    --e-global-typography-primary-font-size: var(--evkaf-size-h2) !important;
    --e-global-typography-primary-font-weight: var(--evkaf-weight-semibold) !important;
    --e-global-typography-primary-line-height: var(--evkaf-leading-heading) !important;
    --e-global-typography-secondary-font-size: var(--evkaf-size-h3) !important;
    --e-global-typography-secondary-font-weight: var(--evkaf-weight-semibold) !important;
    --e-global-typography-secondary-line-height: var(--evkaf-leading-heading) !important;
    --e-global-typography-text-font-size: var(--evkaf-size-body) !important;
    --e-global-typography-text-font-weight: var(--evkaf-weight-regular) !important;
    --e-global-typography-text-line-height: var(--evkaf-leading-body) !important;
    --e-global-typography-accent-font-size: var(--evkaf-size-control) !important;
    --e-global-typography-accent-font-weight: var(--evkaf-weight-semibold) !important;
    --e-global-typography-accent-line-height: var(--evkaf-leading-control) !important;
    --e-global-typography-uicore_primary-font-size: var(--evkaf-size-h2) !important;
    --e-global-typography-uicore_primary-font-weight: var(--evkaf-weight-semibold) !important;
    --e-global-typography-uicore_secondary-font-size: var(--evkaf-size-h3) !important;
    --e-global-typography-uicore_secondary-font-weight: var(--evkaf-weight-semibold) !important;
    --e-global-typography-uicore_text-font-size: var(--evkaf-size-body) !important;
    --e-global-typography-uicore_text-font-weight: var(--evkaf-weight-regular) !important;
    --e-global-typography-uicore_accent-font-size: var(--evkaf-size-control) !important;
    --e-global-typography-uicore_accent-font-weight: var(--evkaf-weight-semibold) !important;
}

body,
body :is(p, li, dt, dd, table, .elementor-widget-text-editor, .uicore-post-content,
    .entry-content, .evkaf-design, .elementor-testimonial-content) {
    font-size: var(--evkaf-size-body) !important;
    font-weight: var(--evkaf-weight-regular) !important;
    line-height: var(--evkaf-leading-body) !important;
    letter-spacing: normal !important;
}

body :is(h1, h2, h3, h4, h5, h6, .elementor-heading-title):not(.ui-e-title) {
    font-weight: var(--evkaf-weight-semibold) !important;
    line-height: var(--evkaf-leading-heading) !important;
    letter-spacing: var(--evkaf-tracking-heading) !important;
    overflow-wrap: break-word;
}
body :is(h1, .evkaf-type-h1):not(.ui-e-title) { font-size: var(--evkaf-size-h1) !important; }
body :is(h2, .evkaf-type-h2):not(.ui-e-title) { font-size: var(--evkaf-size-h2) !important; }
body :is(h3, .evkaf-type-h3):not(.ui-e-title) { font-size: var(--evkaf-size-h3) !important; }
body :is(h4, .evkaf-type-h4):not(.ui-e-title) { font-size: var(--evkaf-size-h4) !important; }
body :is(h5, .evkaf-type-h5):not(.ui-e-title) { font-size: var(--evkaf-size-h5) !important; }
body :is(h6, .evkaf-type-h6):not(.ui-e-title) { font-size: var(--evkaf-size-h6) !important; }
body :is(div, span, p).elementor-heading-title { font-size: var(--evkaf-size-h2) !important; }

/* UiCore widget titles retain their Elementor sizes and weights (accordion/icon boxes). */

/* Staff directory headings use a compact scale instead of the global h2/h3 sizes. */
body .personeller-content h3.personel-name {
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.015em !important;
    color: #182c22;
}
body .personeller-content h2.personel-kategori-title {
    font-size: 1.375rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.02em !important;
    color: #153d25;
}
@media (max-width: 767px) {
    body .personeller-content h2.personel-kategori-title {
        font-size: 1.2rem !important;
    }
}

/* Reader controls have independent sizing from page headings and text buttons. */
body .yayinlar-modal h3.yayinlar-modal-title {
    font-size: 16px !important;
    line-height: 1.4 !important;
    min-width: 0;
    overflow-wrap: anywhere;
}
body :is(.yayinlar-modal, .yayinlar-lightbox) :is(.yayinlar-modal-close, .yayinlar-lightbox-close) {
    font-size: 32px !important;
    line-height: 1 !important;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Text links keep their parent size; emphasis remains visible in article text. */
body :is(p, li, td, th, .elementor-heading-title) > :where(a, span) {
    font-size: inherit;
    line-height: inherit;
}
body :is(strong, b, th) { font-weight: var(--evkaf-weight-bold) !important; }
body :is(h1, h2, h3, h4, h5, h6, .elementor-heading-title) :where(a, span, strong, b) {
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

/* Navigation and actions: compact but readable on both desktop and phone. */
body :is(button, .elementor-button, .elementor-button-text, .button,
    .underlined-link, .text-link, .news-read, .elementor-accordion-title, .elementor-tab-title),
body .uicore-menu :is(a, .ui-menu-item-wrapper),
body :is(.desktop-nav, .mobile-nav, .elementor-nav-menu) > a {
    font-size: var(--evkaf-size-control) !important;
    font-weight: var(--evkaf-weight-semibold) !important;
    line-height: var(--evkaf-leading-control) !important;
    letter-spacing: normal !important;
}
body :is(input, textarea, select) {
    font-size: var(--evkaf-size-input) !important;
    font-weight: var(--evkaf-weight-regular) !important;
    line-height: 1.5 !important;
}
body label {
    font-size: var(--evkaf-size-control) !important;
    font-weight: var(--evkaf-weight-medium) !important;
    line-height: 1.5 !important;
}
body :is(small, figcaption, .breadcrumbs, .ui-breadcrumb, .elementor-post__meta-data,
    .news-meta, .news-meta > span, .legacy > span, .hero-marker, .slide-count,
    .news-carousel-status, .footer-bottom) {
    font-size: var(--evkaf-size-small) !important;
    font-weight: var(--evkaf-weight-regular) !important;
    line-height: 1.6 !important;
    letter-spacing: normal !important;
}
body :is(.eyebrow, .evkaf-type-eyebrow, .news-image > span) {
    font-size: var(--evkaf-size-label) !important;
    font-weight: var(--evkaf-weight-bold) !important;
    line-height: 1.5 !important;
    letter-spacing: .12em !important;
}

/* Dedicated display and card roles retain the original design's hierarchy. */
body .evkaf-design .hero-copy :is(h1, h2, h3),
body .evkaf-type-display,
body .evkaf-type-display .elementor-heading-title {
    font-size: var(--evkaf-size-display) !important;
    font-weight: var(--evkaf-weight-medium) !important;
    line-height: 1.13 !important;
    letter-spacing: -.035em !important;
}
body :is(.hero-description, .evkaf-type-lead) {
    font-size: var(--evkaf-size-lead) !important;
    font-weight: var(--evkaf-weight-regular) !important;
    line-height: var(--evkaf-leading-body) !important;
}
body :is(.news-card, .focus-card) h3,
body .elementor-post__title,
body .uicore-blog-grid :is(h2, h3),
body .evkaf-type-card .elementor-heading-title {
    font-size: var(--evkaf-size-card) !important;
    font-weight: var(--evkaf-weight-semibold) !important;
    line-height: var(--evkaf-leading-card) !important;
    letter-spacing: -.015em !important;
}
/* Shared compact news titles in the carousel and news-list shortcode. */
body .evkaf-design .news-card h3,
body .evkaf-news-card h3.evkaf-news-title,
body .ihale-item h3.ihale-baslik,
body .evkaf-post-item h3.evkaf-post-title {
    font-size: 1rem !important;
    font-weight: var(--evkaf-weight-semibold) !important;
    line-height: 1.45 !important;
    letter-spacing: -.015em !important;
}

body :is(.service-card, .useful-grid) strong {
    font-size: var(--evkaf-size-body) !important;
    font-weight: var(--evkaf-weight-semibold) !important;
    line-height: var(--evkaf-leading-card) !important;
}
body :is(.service-card, .useful-grid) small {
    font-size: var(--evkaf-size-small) !important;
    white-space: normal !important;
}
body .evkaf-design .legacy > strong {
    font-size: var(--evkaf-size-year) !important;
    font-weight: var(--evkaf-weight-regular) !important;
    line-height: 1.1 !important;
}

/* Compact contact information and footer navigation. */
body :is(.uicore-top-bar, .utility) :is(p, a, span) {
    font-size: var(--evkaf-size-small) !important;
    font-weight: var(--evkaf-weight-regular) !important;
    line-height: 1.5 !important;
}
body :is(footer, .elementor-location-footer, [data-elementor-type='footer'])
    :is(p, li, .elementor-icon-list-text),
body .evkaf-design :is(.footer-about > p, .footer-contact > p, .footer-grid > div > a) {
    font-size: var(--evkaf-size-control) !important;
    line-height: 1.65 !important;
}
body .evkaf-design .footer-grid h3 {
    font-size: var(--evkaf-size-h6) !important;
    font-weight: var(--evkaf-weight-semibold) !important;
}
body .evkaf-design .footer-quote > p {
    font-size: var(--evkaf-size-h3) !important;
    font-weight: var(--evkaf-weight-regular) !important;
}

/* Explicit utility roles for Elementor's Advanced > CSS Classes field. */
body .evkaf-type-body,
body .evkaf-type-body :is(p, .elementor-heading-title) {
    font-size: var(--evkaf-size-body) !important;
    font-weight: var(--evkaf-weight-regular) !important;
    line-height: var(--evkaf-leading-body) !important;
}
body .evkaf-type-small,
body .evkaf-type-small :is(p, .elementor-heading-title) {
    font-size: var(--evkaf-size-small) !important;
    font-weight: var(--evkaf-weight-regular) !important;
    line-height: 1.6 !important;
}

@media (max-width: 767px) {
    :root {
        --evkaf-size-display: 2.375rem;
        --evkaf-size-h1: 1.75rem;
        --evkaf-size-h2: 1.5625rem;
        --evkaf-size-h3: 1.25rem;
        --evkaf-size-h4: 1.125rem;
        --evkaf-size-card: 1.0625rem;
    }

    /* Let longer mobile headings grow without overlapping the slide controls. */
    body .evkaf-design .modern-hero {
        height: auto !important;
        min-height: 585px;
    }
    body .evkaf-design .hero-inner {
        height: auto;
        min-height: inherit;
        display: flex;
        flex-direction: column;
        gap: 36px;
        padding-bottom: 24px;
    }
    body .evkaf-design .hero-bottom {
        position: static;
        margin-top: auto;
        flex-wrap: wrap;
        gap: 12px;
    }
    body .evkaf-design .slide-count { white-space: nowrap; }
}
