/*
 * Rules the old site did not have. The old stylesheets (style.css, fancybox.css,
 * font/stylesheet.css) stay as they were; changes to the look go here.
 */

/* Footer credit "crafted by wiro.ai": plain weight (style.css makes .copyright a 600). */
.copyright-right a {
    font-weight: inherit;
}

/*
 * Video cards (Kurumsal Filmler): the old rule sized the play icon's box 96px narrower
 * than the card and let it start at the card's padding, so the icon sat about 28px left
 * of the picture's centre on desktop. Cover the whole card instead.
 */
.video-list li picture:before {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto;
}

/* The fixed 140px (100px on phones) height made the picture wider than its card, so it
   ran past the white frame. Fit the card's width instead; the icon then sits on the
   picture's centre too. */
.video-list li picture img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Footer: the newest news and announcements, each title at most two lines (owner, 2026-10-03).
   The spacing above and below moves from padding to margin so a clipped third line never
   shows in it, and the right padding keeps long titles off the next column. */
.footer-sitemap .footer-latest li a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0 24px 0 0;
    margin: 5px 0;
}

/* SEO landmarks (2026-10-03): <main> wraps the page content between the header and the
   footer (header.php, footer.php). It must not create a box: the old blocks float inside
   .tgs and lay out exactly as before. */
.tgs-main {
    display: contents;
}

/*
 * Home sliders before slick has run (CLS, 2026-10-03). Until then every slide is stacked
 * in the page, so the quick links and everything under the hero first paint far below
 * and jump up when slick collapses the stack. Show only what slick will show: the first
 * hero slide, and the first news cards in a row, as many as the slidesToShow of tgs.js
 * for the window width (4, 3 below 1281px, 2 below 1023px, 1 below 640px). Once slick
 * runs the items are no longer children of the slider, so none of this applies.
 */
.slider-hero:not(.slick-initialized) > .slider-hero-item ~ .slider-hero-item {
    display: none;
}

.slider-news:not(.slick-initialized) > .slider-news-item {
    width: 25%;
}

.slider-news:not(.slick-initialized) > .slider-news-item:nth-child(n+5) {
    display: none;
}

@media only screen and (max-width: 1280px) {
    .slider-news:not(.slick-initialized) > .slider-news-item {
        width: 33.3333%;
    }

    .slider-news:not(.slick-initialized) > .slider-news-item:nth-child(n+4) {
        display: none;
    }
}

@media only screen and (max-width: 1022px) {
    .slider-news:not(.slick-initialized) > .slider-news-item {
        width: 50%;
    }

    .slider-news:not(.slick-initialized) > .slider-news-item:nth-child(n+3) {
        display: none;
    }
}

@media only screen and (max-width: 639px) {
    .slider-news:not(.slick-initialized) > .slider-news-item {
        width: 100%;
    }

    .slider-news:not(.slick-initialized) > .slider-news-item:nth-child(n+2) {
        display: none;
    }
}

/* The hero mask now carries its size (width="1440" height="720"), so its box is reserved
   before the file arrives; height:auto keeps the 2:1 box the file gave it, instead of
   the 720px the height attribute would set. */
.slider-hero-item picture img {
    height: auto;
}

/*
 * QA bug fixes, 2026-10-03 (F numbers from the QA list). The look stays the old site's;
 * each rule is scoped to the place the bug was found.
 */

/* F06. The Averta files are a Turkish-only subset, and these style.css rules name no
   fallback, so Cyrillic, Chinese and letters like é, ä, ß fell back to the browser's
   serif (whole Russian menus in Times, one serif letter in "Qualité"). Open Sans is
   already loaded with its Cyrillic and Latin ranges; Turkish text still uses Averta. */
#nav li > a,
.slider-hero-title strong,
.footer-hero a strong,
.footer-title,
.footer-bulletin h5,
.footer-phone,
.page-title strong,
.master-title,
.export-figure strong,
.tgs-stats li strong,
.stats li strong {
    font-family: Averta, "Open Sans", Arial, sans-serif;
}

/* F01. fancybox 3.5.6 only treats a touch as a button press when the touched element or
   its parent is the button. A tap on the X lands on the svg path, so on phones the X of
   the home video and of the event form conditions did nothing. Let the tap reach the
   button itself. */
.fancybox-close-small svg {
    pointer-events: none;
}

/* F01. The home video popup drew its dark X inside the black video, next to YouTube's
   gear, where nobody could see it. Put a white X on the backdrop just above the video. */
#hidden-content-popup {
    overflow: visible;
}

#hidden-content-popup .fancybox-close-small {
    top: -44px;
    right: 0;
    color: #FFF;
    opacity: 1;
}

/* F01. The video box is 90vw wide with no height limit (inline style in
   templates/index.php). On a laptop or a phone held sideways it was taller than the
   window, fancybox put it at the top edge and the X above it ended up off screen. Keep
   the box short enough to leave room for the X: fancybox centres the box, so 132px less
   than the window height leaves 66px above it, the 44px X and a 22px gap. The !important
   beats the inline max-width; the dvh line uses the visible height where a phone
   browser's toolbar takes part of it. Windows tall enough for the 1280px box keep it. */
#hidden-content-popup > div {
    max-width: min(90vw, calc((100vh - 132px) * 16 / 9)) !important;
    max-width: min(90vw, calc((100dvh - 132px) * 16 / 9)) !important;
}

/* Header (interactions sweep). Opening and closing the burger leaves an inline
   display:none on #nav; when a tablet is then turned to landscape (1024px and wider)
   the desktop header had no menu and no burger. On desktop the menu always shows. */
@media only screen and (min-width: 1024px) {
    #nav {
        display: block !important;
    }
}

/* F29. On desktop the header slides away when the page scrolls down, but the search box
   is position:fixed and stayed floating over the content without its close button.
   Hide it with the header; it comes back with the header. Below 1024px the header
   never slides away, so the box stays. */
@media only screen and (min-width: 1024px) {
    .nav-up .header-search {
        display: none !important;
    }
}

/* Header search box from 768 to 1023px (owner): style.css opens it at 65px, over the
   lower edge of the 70px header and the search and language buttons in it. Open it
   just under the header instead. The logged-in offset is in tgsas_layout_admin_bar_offset(). */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
    .header-search {
        top: 80px;
    }
}

/* F21. Under 1320px the menu links get 10px side padding (7px under 1180px), but the
   blue bar above the active or hovered item kept the 20px offsets of the wide layout,
   so it was short and shifted. Match the bar to the padding. Under 1024px the burger
   menu hides the bar. */
@media only screen and (max-width: 1320px) {
    #nav li:hover > a::after,
    #nav li > a.active::after {
        left: 10px;
        width: calc(100% - 20px);
    }
}

@media only screen and (max-width: 1180px) {
    #nav li:hover > a::after,
    #nav li > a.active::after {
        left: 7px;
        width: calc(100% - 14px);
    }
}

/* F34. The hero slider dots are 10x3px on phones, too small to hit with a finger.
   Give each dot a 20px tall touch area; the drawn bar stays 3px. */
@media only screen and (max-width: 767px) {
    .slider-hero ul.slick-dots li {
        height: 20px;
        vertical-align: middle;
    }

    .slider-hero ul.slick-dots li button::after {
        top: calc(50% - 1.5px);
        bottom: auto;
        height: 3px;
    }
}

/* F19. Long German words ("Sonderlageerklärungen", "Investorbeziehungen") cannot wrap
   and ran out of the quick link boxes and into the next footer column. Break them
   inside their box instead (hyphens:auto was rejected: it re-hyphenates labels that
   already fit). The quick link boxes also fill their row, so a label on three lines no
   longer makes its box taller than its neighbours. */
.hero-links li a {
    height: 100%;
}

/* style.css gives the label height:100%. Now that the link has a definite height, that
   would stretch the label over the whole box and pin a one line label to the top; auto
   keeps it centred next to its icon as before. */
.hero-links li a strong {
    height: auto;
    overflow-wrap: break-word;
}

/* Not applied to the footer links and the home summary: there "Unternehmensführung" and
   "Außenhandelskapitalgesellschaft" run a few pixels into empty space (as on the old
   site), and breaking them would leave one or a few letters alone on the next line. */
.footer-title {
    overflow-wrap: break-word;
}

/* F23 and the export band footnote. On phones a period label on two lines
   ("JANUAR - AUGUST 2026") pushed its number 20px below the other one, and the source
   line sat right under the right column. Reserve two lines for the label and give the
   source line its own row. */
@media only screen and (max-width: 767px) {
    .export-figure small {
        min-height: 55px;
    }

    .daily-export-figure .wrap > .tac {
        clear: both;
        padding-top: 15px;
    }
}

/* F28. Two column announcement list on the home page: only the last item lost its
   bottom rule, so the last row looked unfinished. With an even count the item to its
   left loses it too. */
@media only screen and (min-width: 768px) {
    .latest-announcements li:nth-last-child(2):nth-child(odd) {
        box-shadow: none;
    }
}

/* F07. News, announcement and search cards are floats of unequal height (thumbnail
   ratio, empty date line), so a taller card snagged the next row and left holes. Lay
   the cards out in rows, and keep the date line's height when it is empty. */
.news ul {
    display: flex;
    flex-wrap: wrap;
}

.news li section span:empty::before {
    content: "\00a0";
}

/* F24. Card titles longer than three lines were cut at the box edge with no sign that
   they go on. End the third line with an ellipsis; the box heights stay. At 440px and
   below the list cards already show the whole title, so they are left alone. */
.news-item strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

@media only screen and (min-width: 441px) {
    .news li section strong {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

/* F24, financial statement cards. The document name box is two lines high and cut
   without a sign; the reviewed German, French, Spanish, Italian and Russian names are
   longer than the old English ones, so their third line vanished, and
   "Konzern-Eigenkapitalveränderungsrechnung" was cut mid word at the side. Break such a
   word inside the box and end the second line with an ellipsis; the box keeps its 40px.
   It stops floating so that it is a plain block for the clamp in every browser (the
   card's height and the download hint under it do not move). At 540px and below style.css
   shows the whole name, so those cards are left alone. */
@media only screen and (min-width: 541px) {
    .documents li a strong {
        float: none;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow-wrap: break-word;
    }
}

/* F31. A search without hits now says so (templates/search.php prints the sentence). */
.search-none {
    float: left;
    width: 100%;
    padding: 40px 0;
    font-size: 15px;
}

/* F16. Press clippings and news galleries are floats of unequal height, so rows started
   at different heights and left gaps. Lay them out in rows. On phones the first
   picture also touched the text above it. */
.partner-list ul {
    display: flex;
    flex-wrap: wrap;
}

@media only screen and (max-width: 767px) {
    .page-about .partner-list {
        margin-top: 20px;
    }
}

/* F15. The hero photo hangs up into the title band, but the title column was wider than
   the space left of it, so between 1024 and 1320px a long title ran under the photo.
   On pages with a hero photo the title stops where the photo begins. */
@media only screen and (min-width: 1024px) {
    .tgs:has(.page-about-top > .hero-photo) .sub-hero {
        padding-right: max(40%, calc(min(50%, 540px) - 30px));
    }
}

/* F02. Wide content in page bodies made the document wider than the screen on phones
   and tablets: the page panned sideways and the header buttons slid off the edge.
   The export performance table scrolls inside its column. The !important beats the
   table's inline display:table; the scroll sits on the table because making the
   .table-wrap span a new formatting context adds 50px under it. */
@media only screen and (max-width: 1023px) {
    .table-wrap table {
        display: block !important;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* F02. YouTube embeds (560px) and images with a fixed width in news bodies shrink to
   the column, and long bare URLs in announcements break instead of widening the page. */
.page-about iframe[src*="youtube.com"] {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.page-about img[width] {
    max-width: 100%;
    height: auto;
}

.page-about a {
    overflow-wrap: break-word;
}

/* F02. A table pasted from Word in two announcements scrolls inside its column. */
@media only screen and (max-width: 767px) {
    .page-about table.MsoNormalTable {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* F03. Yatırımcı Sunumları: the header row rule of document tables (grey, bold, hidden
   on phones) also matched the first presentation of every year inside the <details>
   lists, so on phones each year showed one presentation instead of two. The real
   header row is not inside <details> and keeps its look. */
.doc-table details li:first-child {
    background-color: transparent;
    color: inherit;
    font-weight: inherit;
}

.doc-table details li:first-child:hover {
    background-color: #F8F9FB;
}

@media only screen and (max-width: 767px) {
    .doc-table details li:first-child {
        display: block;
    }
}

/* F26. Announcement file rows: on phones the label is left aligned but the PDF pill
   stayed centred (.tac) under it. Align it with the label, as on the document lists. */
@media only screen and (max-width: 767px) {
    .link-list .tac {
        text-align: left !important;
    }
}

/* F27. Awards page: the older entries wrap their lines in <span>, which style.css sets
   to 14px, so the list changed size halfway down. */
.award-list li span {
    font-size: inherit;
}

/* F22. Two column footer on phones: long labels ran into the next column and two links
   read as one line. Keep a gap so a long label wraps inside its own column. */
@media only screen and (max-width: 540px) {
    .footer-sitemap li a {
        padding-right: 10px;
    }
}

/* F04. Result message of the contact, investor and webinar forms: style.css had no rule
   for it, so it was plain 13px text and success looked like failure. */
.alert {
    float: left;
    width: 100%;
    position: relative;
    margin: 30px 0 40px;
    padding: 18px 56px 18px 20px;
    border-radius: 8px;
    border: 1px solid #F3B4B4;
    background-color: #FDEDED;
    color: #A61B1B;
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
}

.alert.success {
    border-color: #A7E3C9;
    background-color: #E9F8F1;
    color: #0B7A55;
}

.alert .closebtn {
    position: absolute;
    top: 50%;
    right: 18px;
    margin-top: -16px;
    font-size: 28px;
    line-height: 32px;
    font-weight: 400;
    cursor: pointer;
}

/* F25. The 130x30 captcha was stretched into the 120x45 box; keep its proportions. */
.security-code img {
    object-fit: contain;
}

/* F33. iOS Safari zooms the page when a field under 16px gets focus and stays zoomed.
   The fields are 15px; make them 16px on phones and tablets (the header search has its
   own 15px rule). */
@media only screen and (max-width: 1023px) {
    input,
    textarea,
    select,
    .header-search input {
        font-size: 16px;
    }
}

/*
 * Speed, 2026-11-24 (templates/index.php, inc/render.php).
 * - Card, news and page photos carry width and height so the box is kept while they load;
 *   height:auto keeps their ratio as before.
 * - The first slide's photo comes from two custom properties: the 1280 px copy up to
 *   1024 px wide, the large one above.
 * - The home popup video: its picture and a play button until it is clicked.
 */
.news-item img,
.news li a img,
.hero-photo img {
    height: auto;
}

.item-zoom[data-tgs-hero] {
    background-image: var(--tgs-hero);
}

@media only screen and (max-width: 1024px) {
    .item-zoom[data-tgs-hero] {
        background-image: var(--tgs-hero-sm);
    }
}

.tgsas-yt {
    position: relative;
    background: #000;
}

.tgsas-yt-play {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.tgsas-yt-play img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tgsas-yt-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 68px;
    height: 48px;
    margin: -24px 0 0 -34px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 48'%3E%3Cpath fill='%23f00' d='M66.5 7.7A8.6 8.6 0 0 0 60.5 1.6C55.2 0 34 0 34 0S12.8 0 7.5 1.6A8.6 8.6 0 0 0 1.5 7.7C0 13.1 0 24 0 24s0 10.9 1.5 16.3a8.6 8.6 0 0 0 6 6.1C12.8 48 34 48 34 48s21.2 0 26.5-1.6a8.6 8.6 0 0 0 6-6.1C68 34.9 68 24 68 24s0-10.9-1.5-16.3z'/%3E%3Cpath fill='%23fff' d='M27 34l18-10-18-10z'/%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.tgsas-yt-play:hover .tgsas-yt-icon,
.tgsas-yt-play:focus-visible .tgsas-yt-icon {
    opacity: 1;
}

/* Text for search engines and screen readers only: the slide's title after "Detaylı Bilgi"
   (a link text of its own, 2026-11-24). */
.tgsas-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
