/* ========================================
   TOLYAP MESKEN - RESPONSIVE CSS
   Mobile & Tablet Optimizations
======================================== */

/* ========================================
   LARGE DESKTOP (1440px+)
======================================== */

@media (min-width: 1441px) {
  .container {
    max-width: 1600px;
  }

  h1 {
    font-size: 4rem;
  }

  .cb-hero-block__title h1 {
    font-size: 5rem;
  }
}

/* ========================================
   DESKTOP (1200px - 1440px)
======================================== */

@media (max-width: 1440px) {
  h1 {
    font-size: 3rem;
  }

  .cb-hero-block__title h1 {
    font-size: 4rem;
  }

  .projects-grid {
    gap: 30px;
  }
}

/* ========================================
   TABLET LANDSCAPE (992px - 1199px)
======================================== */

@media (max-width: 1199px) {
  /* Typography */
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  /* Header */
  .cb-header__nav-bar {
    padding: 15px 30px;
  }

  .cb-header__menu {
    gap: 30px;
  }

  .cb-header__menu-logo img {
    height: 50px;
  }

  .cb-header__menu-item a {
    font-size: 0.85rem;
  }

  /* Hero */
  .cb-hero-block__title h1 {
    font-size: 3.5rem;
  }

  /* Stats */
  .cb-stats-container {
    gap: 30px;
  }

  .cb-stat-number {
    font-size: 3rem;
  }

  /* Projects Grid */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Values Grid */
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cb-values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Why Tolyap */
  .why-tolyap-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .cb-footer__row {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .cb-footer__about {
    grid-column: 1 / -1;
  }

  /* Contact Grid */
  .contact-grid {
    gap: 50px;
  }
}

/* ========================================
   TABLET PORTRAIT (768px - 991px)
======================================== */

@media (max-width: 991px) {
  /* Typography */

  .nav-left,
  .nav-right {
    display: none !important;
  }

  .nav-center {
    position: static;
    transform: none;
    flex: 1;
  }

  .logo span {
    font-size: 16px;
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .page-hero__content h1 {
    font-size: 2.5rem;
  }

  /* Header - Mobile Menu */
  .cb-header__burger {
    display: block;
    position: relative;
    z-index: 1000;
  }

  .cb-header__burger-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .cb-header__mobile {
    display: none;
  }

  .cb-header__mobile:checked ~ .cb-header__menu {
    transform: translateX(0);
  }

  .cb-header__mobile:checked
    ~ .cb-header__burger-label
    .cb-header__mobile__line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }

  .cb-header__mobile:checked
    ~ .cb-header__burger-label
    .cb-header__mobile__line:nth-child(2) {
    opacity: 0;
  }

  .cb-header__mobile:checked
    ~ .cb-header__burger-label
    .cb-header__mobile__line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .cb-header__menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-white);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .cb-header__menu-item a {
    font-size: 1.2rem;
  }

  .cb-header__menu-logo-placeholder {
    display: none;
  }

  .cb-header__menu-logo {
    position: static;
    transform: none;
    margin-bottom: 30px;
  }

  .cb-header__mobile--logo {
    display: block;
  }

  .cb-header__enquire-form {
    display: none;
  }

  /* Hero */
  .cb-hero-block {
    height: 70vh;
    min-height: 500px;
  }

  .cb-hero-block__title h1 {
    font-size: 2.5rem;
  }

  .cb-hero-block__title h4 {
    font-size: 1rem;
  }

  .hero-slogan {
    font-size: 1rem;
  }

  /* Sections Padding */
  .cb-text-block,
  .projects-section,
  .about-intro-section,
  .values-section,
  .mission-vision-section,
  .why-tolyap-section,
  .contact-section {
    padding: 60px 20px;
  }

  .cb-stats-section {
    padding: 50px 20px;
  }

  .cb-cta-section {
    padding: 60px 20px;
  }

  /* Stats */
  .cb-stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  /* Two Column */
  .cb-2-column {
    grid-template-columns: 1fr;
  }

  .cb-2-column__block {
    min-height: 400px;
  }

  /* Media Block */
  .cb-media-block {
    min-height: 500px;
  }

  .cb-media-block__content {
    padding: 0 40px;
  }

  .cb-media-block__content__title h2 {
    font-size: 2.5rem;
  }

  /* Mission & Vision */
  .mission-vision-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Footer */
  .cb-footer {
    padding: 60px 0 0;
  }

  .cb-footer__container {
    padding: 0 30px;
  }

  .cb-footer__row {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cb-footer__about {
    grid-column: auto;
  }

  .cb-footer__bottom .cb-footer__row {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .cb-footer__legal {
    justify-content: center;
  }
}

/* ========================================
   MOBILE LARGE (576px - 767px)
======================================== */

@media (max-width: 767px) {
  /* Typography */
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  h4 {
    font-size: 1.1rem;
  }

  p {
    font-size: 0.95rem;
  }

  /* Header */
  .cb-header__nav-bar {
    padding: 12px 20px;
  }

  .cb-header__mobile--logo img {
    height: 50px;
  }

  /* Page Hero */
  .page-hero {
    height: 300px;
    margin-top: 80px;
  }

  .page-hero__content h1 {
    font-size: 2rem;
  }

  .page-hero__content p {
    font-size: 1rem;
  }

  /* Hero */
  .cb-hero-block__title h1 {
    font-size: 2rem;
  }

  .cb-hero-block__title h4 {
    font-size: 0.9rem;
  }

  /* Buttons */
  .cb-btn-primary,
  .cb-btn-secondary,
  .cb-btn-link {
    padding: 10px 20px !important; /* 6px 24px yerine - daha dengeli */
    font-size: 0.8rem !important; /* 0.85rem'den biraz küçülttük */
    font-weight: 500;
    letter-spacing: 0.5px;
  }

  .cb-btn-large {
    padding: 12px 28px !important; /* 14px 32px'den küçülttük */
    font-size: 0.85rem !important; /* 0.9rem'den küçülttük */
    font-weight: 500;
    letter-spacing: 0.5px;
  }

  /* Stats */
  .cb-stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .cb-stat-number {
    font-size: 2.5rem;
  }

  .cb-stat-label {
    font-size: 0.85rem;
  }

  /* Two Column */
  .cb-2-column__content {
    padding: 40px 30px;
  }

  .cb-2-column__content h3 {
    font-size: 1.8rem;
  }

  /* Media Block */
  .cb-media-block {
    min-height: 400px;
  }

  .cb-media-block__content {
    padding: 0 30px;
  }

  .cb-media-block__content__title h2 {
    font-size: 2rem;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .projects-filter {
    gap: 10px;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 0.8rem;
  }

  /* Values */
  .values-grid,
  .cb-values-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Why Tolyap */
  .why-tolyap-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .why-tolyap-number {
    font-size: 3rem;
  }

  /* CTA Section */
  .cb-cta-content h2 {
    font-size: 1.8rem;
  }

  .cb-cta-content p {
    font-size: 1rem;
  }

  .cb-cta-buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px; /* EKLENDI */
  }

  .cb-cta-buttons a {
    width: 100%;
    padding: 11px 24px !important; /* EKLENDI - İnce buton */
    font-size: 0.85rem !important; /* EKLENDI */
    font-weight: 500; /* EKLENDI */
    letter-spacing: 0.8px; /* EKLENDI */
  }

  /* Contact Form */
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 30px 20px;
  }

  /* Footer */
  .cb-footer__container {
    padding: 0 20px;
  }

  /* Cookie Banner */
  .eu-cookie-compliance-content {
    flex-direction: column;
    gap: 20px;
  }

  .eu-cookie-compliance-buttons {
    flex-direction: column;
    width: 100%;
  }

  .eu-cookie-compliance-agree-button,
  .eu-cookie-compliance-secondary-button {
    width: 100%;
  }

  .sliding-popup-bottom {
    padding: 20px;
  }
}

/* ========================================
   MOBILE SMALL (320px - 575px)
======================================== */

@media (max-width: 575px) {
  /* Typography */
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  h6 {
    font-size: 0.8rem;
  }

  /* Container */
  .container {
    padding: 0 15px;
  }

  /* Hero */
  .cb-hero-block {
    height: 60vh;
    min-height: 400px;
  }

  .cb-hero-block__title h1 {
    font-size: 1.6rem;
  }

  .cb-hero-block__title {
    padding: 0 15px;
  }

  /* Page Hero */
  .page-hero {
    height: 250px;
  }

  .page-hero__content h1 {
    font-size: 1.6rem;
  }

  .page-hero__content p {
    font-size: 0.9rem;
  }

  /* Sections */
  .cb-text-block,
  .projects-section,
  .about-intro-section,
  .values-section,
  .mission-vision-section,
  .why-tolyap-section,
  .contact-section {
    padding: 40px 15px;
  }

  .cb-stats-section {
    padding: 40px 15px;
  }

  .cb-cta-section {
    padding: 50px 15px;
  }

  /* Stats */
  .cb-stats-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .cb-stat-item {
    padding: 20px;
  }

  .cb-stat-number {
    font-size: 2.5rem;
  }

  /* Two Column */
  .cb-2-column__block {
    min-height: 350px;
  }

  .cb-2-column__content {
    padding: 30px 20px;
  }

  .cb-2-column__content h3 {
    font-size: 1.5rem;
  }

  /* Media Block */
  .cb-media-block {
    min-height: 350px;
  }

  .cb-media-block__content {
    padding: 0 20px;
  }

  .cb-media-block__content__title h2 {
    font-size: 1.6rem;
  }

  .cb-media-block__content__title p {
    font-size: 0.95rem;
  }

  /* Project Card */
  .project-card__image {
    height: 250px;
  }

  .project-card__content {
    padding: 20px;
  }

  .project-card__title {
    font-size: 1.2rem;
  }

  /* Value Card */
  .value-card,
  .mission-vision-card {
    padding: 30px 20px;
  }

  .value-icon,
  .mission-vision-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
  }

  /* Contact */
  .contact-detail-item {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .contact-form {
    padding: 25px 15px;
  }

  /* CTA */
  .cb-cta-content h2 {
    font-size: 1.5rem;
  }

  /* Footer */
  .cb-footer {
    padding: 50px 0 0;
  }

  .cb-footer__container {
    padding: 0 15px;
  }

  .cb-footer__top {
    padding-bottom: 40px;
  }

  .cb-footer__logo img {
    width: 140px;
  }

  /* Scroll to Top */
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 1.3rem;
  }

  /* Cookie Banner */
  .eu-cookie-compliance-message h3 {
    font-size: 1rem;
  }

  .eu-cookie-compliance-message p {
    font-size: 0.85rem;
  }

  .sliding-popup-bottom {
    padding: 15px;
  }
}

/* ========================================
   LANDSCAPE ORIENTATION (Mobile)
======================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .cb-hero-block {
    height: 100vh;
    min-height: 100vh;
  }

  .cb-hero-block__title h1 {
    font-size: 2rem;
  }

  .cb-hero-block__scroll {
    display: none;
  }

  header {
    position: absolute;
  }
}

/* ========================================
   PRINT MEDIA QUERY
======================================== */

@media print {
  .cb-header,
  .cb-footer,
  .scroll-to-top,
  .eu-cookie-compliance-banner,
  .cb-hero-block__scroll,
  .cb-cta-section,
  .projects-filter {
    display: none !important;
  }

  .page-hero {
    margin-top: 0;
    height: auto;
    padding: 40px 20px;
  }

  body {
    font-size: 12pt;
  }

  .container {
    max-width: 100%;
  }
}

/* ========================================
   ACCESSIBILITY - REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-indicator span {
    animation: none;
  }
}

/* ========================================
   HIGH CONTRAST MODE
======================================== */

@media (prefers-contrast: high) {
  :root {
    --color-primary: #0056b3;
    --color-secondary: #000000;
  }

  button,
  a {
    outline: 2px solid currentColor;
  }
}

/* ========================================
   DARK MODE (Optional - Future)
======================================== */

@media (prefers-color-scheme: dark) {
  /* Dark mode stilleri buraya eklenebilir */
  /* Şu an için devre dışı */
}

/* ========================================
   END OF RESPONSIVE CSS
======================================== */

/* ============================================
   MOBİL MENÜ - FULL SCREEN OVERLAY
   ============================================ */

.mobile-menu-overlay {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #232d10;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-menu-overlay.active {
  top: 0;
  opacity: 1;
  visibility: visible;
}

.mobile-menu-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 20px 100px;
}

/* Kapat Butonu */
.mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 10px;
  z-index: 10;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-close:hover {
  transform: rotate(90deg);
  opacity: 0.7;
}

/* Menü İçeriği */
.mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 500px;
}

.mobile-menu-item {
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 2px;
  text-decoration: none;
  padding: 20px 40px;
  position: relative;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
}

.mobile-menu-item::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease;
}

.mobile-menu-item:hover::after {
  width: 60px;
}

/* Projeler Dropdown */
.mobile-menu-dropdown {
  width: 100%;
  text-align: center;
}

.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mobile-dropdown-toggle svg {
  transition: transform 0.3s ease;
}

.mobile-dropdown-toggle.active svg {
  transform: rotate(180deg);
}

.mobile-dropdown-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-dropdown-items.active {
  max-height: 800px;
}

.mobile-dropdown-items a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1px;
  text-decoration: none;
  padding: 12px 40px;
  transition: all 0.3s ease;
  border-left: 2px solid transparent;
}

.mobile-dropdown-items a:hover {
  color: #fff;
  border-left-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* İletişim Butonu - Alt Kısım */
.mobile-menu-footer {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 300px;
  padding: 0 20px;
}

.mobile-contact-btn {
  display: block;
  background: #e63946;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  padding: 18px 50px;
  text-align: center;
  border-radius: 4px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.mobile-contact-btn:hover {
  background: #d62839;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

/* Eski mobil menü stillerini gizle */
.mobile-menu {
  display: none !important;
}

/* Responsive ayarlar */
@media (max-width: 480px) {
  .mobile-menu-item {
    font-size: 24px;
    padding: 18px 30px;
  }

  .mobile-dropdown-items a {
    font-size: 16px;
    padding: 10px 30px;
  }

  .mobile-contact-btn {
    font-size: 16px;
    padding: 16px 40px;
  }
}

/* ========================================
   MOBILE LARGE (576px - 767px)
======================================== */

@media (max-width: 767px) {
  /* ... mevcut kodlar ... */

  /* Proje Kartı Butonları - Mobilde Alt Alta ve İnce */
  .project-card__actions {
    display: flex;
    flex-direction: row; /* Yan yana */
    gap: 10px;
    width: 100%;
  }

  .project-card__btn,
  .project-card__btn-alt {
    flex: 1; /* Eşit genişlik */
    padding: 11px 16px !important;
    font-size: 0.8rem !important;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap; /* Tek satırda kal */
    min-height: 44px; /* Eşit yükseklik */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* ========================================
   MOBILE SMALL (320px - 575px)
======================================== */

@media (max-width: 575px) {
  /* ... mevcut kodlar ... */

  /* Proje Kartı Butonları - Çok küçük ekranlarda */
  .project-card__actions {
    gap: 8px;
  }

  .project-card__btn,
  .project-card__btn-alt {
    flex: 1;
    padding: 10px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 500;
    letter-spacing: 0.3px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Çok küçük ekranlar için alt alta */
@media (max-width: 380px) {
  .project-card__actions {
    flex-direction: column;
  }

  .project-card__btn,
  .project-card__btn-alt {
    width: 100%;
    padding: 12px 20px !important;
  }
}
