/* BILISIMCI HOCAM - viewport responsive layer
   Strategy:
   0-767px: phone, one column, free scroll, content visible.
   768-1199px: tablet/small laptop, adaptive two columns where possible, free scroll.
   1200px+: desktop, locked hero on landing pages, Discover opens content.
*/

:root {
  --rr-header-h: clamp(64px, 6vw, 90px);
  --rr-ticker-h: 44px;
  --rr-safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

.page-wrap,
.hero-section,
.hero-inner,
.main-wrap,
.section,
.modules-grid,
.blog-hero,
.duyuru-hero,
.sss-hero,
.hakkimda-hero,
.iletisim-hero,
.search-hero,
.editorial-stage,
.posts-wrap,
.duyuru-main,
.sss-main,
.philosophy-wrap {
  min-width: 0;
  max-width: 100%;
}

.mobile-blog-break {
  display: none;
}

/* Desktop landing: current two-column experience with Discover. */
@media (min-width: 1200px) {
  html,
  body {
    height: 100%;
  }

  body:not(.icerik-acik) {
    overflow: hidden !important;
  }

  body.icerik-acik {
    height: auto !important;
    overflow-y: auto !important;
    scroll-behavior: smooth;
  }

  body:not(.icerik-acik) .main-wrap {
    display: none !important;
  }

  body:not(.icerik-acik) .hero-section {
    min-height: 0 !important;
    height: calc(100dvh - var(--rr-header-h)) !important;
    padding: 0 0 calc(var(--rr-ticker-h) + var(--rr-safe-bottom)) !important;
    display: flex !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  body:not(.icerik-acik) .hero-inner {
    width: min(100%, 1740px) !important;
    height: 100% !important;
    min-height: 0 !important;
    margin-inline: auto !important;
    display: grid !important;
    grid-template-columns: minmax(320px, .92fr) minmax(460px, 1.08fr) !important;
    align-items: center !important;
    gap: clamp(1.1rem, 2.6vw, 3.4rem) !important;
    padding: clamp(.75rem, 1.7dvh, 1.4rem) clamp(1rem, 4vw, 5rem) calc(3.85rem + var(--rr-safe-bottom)) !important;
    overflow: hidden !important;
  }

  body:not(.icerik-acik) .hero-left,
  body:not(.icerik-acik) .hero-right {
    min-width: 0 !important;
  }

  body:not(.icerik-acik) .hero-h1 {
    font-size: clamp(2.35rem, 4.25vw, 4.55rem) !important;
    line-height: 1.03 !important;
    margin-bottom: clamp(.55rem, 1.3dvh, 1rem) !important;
  }

  body:not(.icerik-acik) .hero-desc {
    max-width: min(680px, 100%) !important;
    font-size: clamp(.92rem, 1.15vw, 1.16rem) !important;
    line-height: 1.42 !important;
    margin-bottom: clamp(.65rem, 1.35dvh, 1rem) !important;
  }

  body:not(.icerik-acik) .hero-actions {
    gap: clamp(.7rem, 1vw, 1rem) !important;
    margin-bottom: clamp(.75rem, 1.7dvh, 1.25rem) !important;
  }

  body:not(.icerik-acik) .hero-stats {
    display: flex !important;
  }

  body:not(.icerik-acik) .hero-terminal {
    width: min(100%, 720px) !important;
    height: clamp(305px, 43dvh, 445px) !important;
    max-height: none !important;
    margin-inline: auto !important;
    overflow: hidden !important;
  }

  body:not(.icerik-acik) .terminal-body,
  body:not(.icerik-acik) #termBody {
    height: calc(100% - 42px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    font-size: clamp(.56rem, .78vw, .78rem) !important;
    line-height: 1.42 !important;
  }

  body:not(.icerik-acik) .scroll-down-btn {
    display: inline-flex !important;
    position: fixed !important;
    left: 50% !important;
    bottom: calc(var(--rr-ticker-h) + .68rem + var(--rr-safe-bottom)) !important;
    transform: translateX(-50%) !important;
    z-index: 50 !important;
  }

  body:not(.icerik-acik) .ticker-wrap {
    display: flex !important;
  }

  body.icerik-acik .scroll-down-btn {
    display: none !important;
  }

  body.icerik-acik .modules-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Small desktop/laptop: preserve two columns, allow vertical scroll. */
@media (min-width: 768px) and (max-width: 1199px) {
  html,
  body,
  body:not(.icerik-acik),
  body.icerik-acik {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body:not(.icerik-acik) .main-wrap,
  body.icerik-acik .main-wrap {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body:not(.icerik-acik) .hero-section,
  body.icerik-acik .hero-section {
    min-height: auto !important;
    height: auto !important;
    padding: clamp(1rem, 2.8vh, 2.2rem) 0 clamp(1.8rem, 4vh, 3rem) !important;
    overflow: visible !important;
  }

  body:not(.icerik-acik) .hero-inner,
  body.icerik-acik .hero-inner {
    width: min(100%, 1120px) !important;
    display: grid !important;
    grid-template-columns: minmax(280px, .88fr) minmax(360px, 1.12fr) !important;
    gap: clamp(1rem, 2.6vw, 2rem) !important;
    align-items: center !important;
    padding: clamp(.8rem, 2vw, 1.3rem) clamp(1rem, 3vw, 2rem) !important;
    margin-inline: auto !important;
    min-height: auto !important;
    height: auto !important;
  }

  body:not(.icerik-acik) .hero-badge,
  body.icerik-acik .hero-badge,
  body:not(.icerik-acik) .hero-stats,
  body.icerik-acik .hero-stats {
    display: none !important;
  }

  body:not(.icerik-acik) .hero-h1,
  body.icerik-acik .hero-h1 {
    font-size: clamp(2rem, 5vw, 3.35rem) !important;
    line-height: 1.05 !important;
  }

  body:not(.icerik-acik) .hero-desc,
  body.icerik-acik .hero-desc {
    font-size: clamp(.84rem, 1.6vw, 1rem) !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
  }

  body:not(.icerik-acik) .hero-terminal,
  body.icerik-acik .hero-terminal {
    width: min(100%, 560px) !important;
    height: auto !important;
    min-height: clamp(310px, 38vw, 410px) !important;
    max-height: none !important;
    margin-inline: auto !important;
    overflow: hidden !important;
  }

  body:not(.icerik-acik) .terminal-body,
  body:not(.icerik-acik) #termBody,
  body.icerik-acik .terminal-body,
  body.icerik-acik #termBody {
    height: auto !important;
    min-height: clamp(265px, 34vw, 360px) !important;
    overflow: hidden !important;
    font-size: clamp(.56rem, .96vw, .72rem) !important;
    line-height: 1.4 !important;
  }

  body:not(.icerik-acik) .scroll-down-btn,
  body.icerik-acik .scroll-down-btn,
  body:not(.icerik-acik) .ticker-wrap,
  body.icerik-acik .ticker-wrap {
    display: none !important;
  }

  body:not(.icerik-acik) .modules-grid,
  body.icerik-acik .modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Phone: one column, free scroll, content visible without Discover. */
@media (max-width: 767px) {
  html,
  body,
  body:not(.icerik-acik),
  body.icerik-acik {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body:not(.icerik-acik) .main-wrap,
  body.icerik-acik .main-wrap {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body:not(.icerik-acik) .hero-section,
  body.icerik-acik .hero-section {
    height: auto !important;
    min-height: auto !important;
    padding: .65rem 0 1.25rem !important;
    overflow: visible !important;
  }

  body:not(.icerik-acik) .hero-inner,
  body.icerik-acik .hero-inner {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .9rem !important;
    align-items: start !important;
    padding: .7rem clamp(.85rem, 4vw, 1.1rem) 0 !important;
    min-height: 0 !important;
    height: auto !important;
  }

  body:not(.icerik-acik) .hero-badge,
  body.icerik-acik .hero-badge,
  body:not(.icerik-acik) .hero-stats,
  body.icerik-acik .hero-stats {
    display: none !important;
  }

  body:not(.icerik-acik) .hero-h1,
  body.icerik-acik .hero-h1 {
    font-size: clamp(1.85rem, 11vw, 3rem) !important;
    line-height: 1.03 !important;
    letter-spacing: 0 !important;
    margin-bottom: .7rem !important;
    overflow-wrap: anywhere !important;
  }

  body:not(.icerik-acik) .hero-desc,
  body.icerik-acik .hero-desc {
    font-size: clamp(.82rem, 3.65vw, .98rem) !important;
    line-height: 1.45 !important;
    margin-bottom: .9rem !important;
    max-width: 100% !important;
  }

  body:not(.icerik-acik) .hero-desc-line,
  body.icerik-acik .hero-desc-line {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .12rem !important;
    white-space: normal !important;
  }

  body:not(.icerik-acik) .hero-desc-arrow,
  body.icerik-acik .hero-desc-arrow {
    display: none !important;
  }

  body:not(.icerik-acik) .hero-actions,
  body.icerik-acik .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .65rem !important;
  }

  body:not(.icerik-acik) .hero-cta,
  body:not(.icerik-acik) .hero-cta-outline,
  body.icerik-acik .hero-cta,
  body.icerik-acik .hero-cta-outline {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    padding-inline: .65rem !important;
    font-size: .78rem !important;
    white-space: normal !important;
  }

  body:not(.icerik-acik) .hero-terminal,
  body.icerik-acik .hero-terminal {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: clamp(330px, 82vw, 390px) !important;
    max-height: none !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }

  body:not(.icerik-acik) .hero-left,
  body:not(.icerik-acik) .hero-right,
  body:not(.icerik-acik) .hero-desc,
  body:not(.icerik-acik) .hero-desc-line,
  body:not(.icerik-acik) .hero-type-part,
  body:not(.icerik-acik) .hero-terminal *,
  body.icerik-acik .hero-left,
  body.icerik-acik .hero-right,
  body.icerik-acik .hero-desc,
  body.icerik-acik .hero-desc-line,
  body.icerik-acik .hero-type-part,
  body.icerik-acik .hero-terminal * {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  body:not(.icerik-acik) .hero-type-part,
  body.icerik-acik .hero-type-part {
    display: block !important;
    white-space: normal !important;
  }

  body:not(.icerik-acik) .terminal-body,
  body:not(.icerik-acik) #termBody,
  body.icerik-acik .terminal-body,
  body.icerik-acik #termBody {
    height: auto !important;
    min-height: clamp(285px, 72vw, 340px) !important;
    overflow: hidden !important;
    font-size: clamp(.5rem, 2.1vw, .62rem) !important;
    line-height: 1.45 !important;
    padding-inline: .68rem !important;
  }

  body:not(.icerik-acik) .terminal-body .tl,
  body:not(.icerik-acik) #termBody .tl,
  body.icerik-acik .terminal-body .tl,
  body.icerik-acik #termBody .tl {
    width: 100% !important;
    min-width: 0 !important;
    display: block !important;
  }

  body:not(.icerik-acik) .terminal-body .tl-course-row,
  body:not(.icerik-acik) #termBody .tl-course-row,
  body.icerik-acik .terminal-body .tl-course-row,
  body.icerik-acik #termBody .tl-course-row {
    width: 100% !important;
    grid-template-columns: 1fr !important;
    gap: .05rem !important;
    white-space: normal !important;
    overflow: hidden !important;
  }

  body:not(.icerik-acik) .terminal-body .tl-name,
  body:not(.icerik-acik) #termBody .tl-name,
  body.icerik-acik .terminal-body .tl-name,
  body.icerik-acik #termBody .tl-name {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body:not(.icerik-acik) .terminal-body .tl-arrow,
  body:not(.icerik-acik) #termBody .tl-arrow,
  body.icerik-acik .terminal-body .tl-arrow,
  body.icerik-acik #termBody .tl-arrow {
    padding-inline: .12rem !important;
    letter-spacing: 0 !important;
    justify-self: start !important;
  }

  body:not(.icerik-acik) .terminal-body .tl-tag,
  body:not(.icerik-acik) #termBody .tl-tag,
  body.icerik-acik .terminal-body .tl-tag,
  body.icerik-acik #termBody .tl-tag {
    text-align: left !important;
    justify-self: start !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body:not(.icerik-acik) .scroll-down-btn,
  body.icerik-acik .scroll-down-btn,
  body:not(.icerik-acik) .ticker-wrap,
  body.icerik-acik .ticker-wrap {
    display: none !important;
  }

  body:not(.icerik-acik) .modules-grid,
  body.icerik-acik .modules-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .section,
  .section-head,
  .modules-grid {
    padding-inline: clamp(.9rem, 4vw, 1.1rem) !important;
  }
}

@media (max-width: 380px) {
  body:not(.icerik-acik) .hero-actions,
  body.icerik-acik .hero-actions {
    grid-template-columns: 1fr !important;
  }
}

/* General subpages: below desktop the lower content is part of the normal flow. */
@media (max-width: 1199px) {
  body:not(.icerik-acik) .editorial-stage,
  body:not(.icerik-acik) .posts-wrap,
  body:not(.icerik-acik) .filter-bar,
  body:not(.icerik-acik) .duyuru-main,
  body:not(.icerik-acik) .sss-tabs,
  body:not(.icerik-acik) .sss-main,
  body:not(.icerik-acik) .sss-cta,
  body:not(.icerik-acik) .section-block,
  body:not(.icerik-acik) .philosophy-wrap,
  body:not(.icerik-acik) .cta-block {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  body:not(.icerik-acik) .editorial-stage,
  body:not(.icerik-acik) .duyuru-main,
  body:not(.icerik-acik) .sss-main,
  body:not(.icerik-acik) .philosophy-wrap {
    display: grid !important;
  }

  body:not(.icerik-acik) .filter-bar,
  body:not(.icerik-acik) .sss-tabs,
  body:not(.icerik-acik) .sss-cta {
    display: flex !important;
  }

  body:not(.icerik-acik) .posts-wrap,
  body:not(.icerik-acik) .section-block,
  body:not(.icerik-acik) .cta-block {
    display: block !important;
  }

  .blog-hero,
  .duyuru-hero,
  .sss-hero,
  .hakkimda-hero,
  .iletisim-hero,
  .search-hero {
    min-height: auto !important;
    height: auto !important;
    justify-content: flex-start !important;
    padding-top: clamp(1rem, 3vh, 2rem) !important;
  }
}

@media (max-width: 767px) {
  .blog-hero,
  .duyuru-hero,
  .sss-hero,
  .hakkimda-hero,
  .iletisim-hero,
  .search-hero {
    padding-inline: 12px !important;
    padding-bottom: clamp(1.25rem, 5vh, 2.5rem) !important;
  }

  .blog-hero-content,
  .blog-hero-title,
  .blog-hero-title .grad,
  .blog-hero-sub,
  .blog-hero-stats,
  .page-title,
  .page-sub,
  .profile-card,
  .profile-content,
  .search-hero-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .blog-hero *,
  .duyuru-hero *,
  .sss-hero *,
  .hakkimda-hero *,
  .iletisim-hero *,
  .search-hero * {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .blog-hero-title,
  .page-title,
  .profile-name,
  .search-hero h1 {
    font-size: clamp(1.25rem, 6.1vw, 1.62rem) !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .blog-hero-title .grad {
    display: block !important;
    white-space: normal !important;
  }

  .mobile-blog-break {
    display: block !important;
  }

  .blog-hero-sub,
  .page-sub,
  .profile-bio,
  .search-hero p {
    display: block !important;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    margin-inline: auto !important;
    font-size: .84rem !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  .editorial-stage,
  .posts-wrap,
  .duyuru-main,
  .sss-main,
  .philosophy-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 12px !important;
  }
}
