/* Mobile Styles */

/* Desktop'ta mobil elementleri gizle */
.header-left-mobile,
.header-menu-mobile,
.header-right-mobile,
.mobile-sidebar,
.mobile-sidebar-overlay,
.mobile-bottom-bar {
  display: none;
}

/* Mobile Header */
@media (max-width: 768px) {
  /* Desktop elementlerini gizle */
  .desktop-logo,
  .search-area,
  .header-right {
    display: none !important;
  }
  
  /* Mobil elementleri göster */
  .header-left-mobile,
  .header-menu-mobile,
  .header-right-mobile {
    display: flex;
  }
  
  .mobile-sidebar,
  .mobile-sidebar-overlay {
    display: block;
  }
  
  .mobile-bottom-bar {
    display: flex;
  }
  .header-container {
    padding: 0 15px;
    height: 60px;
    align-items: center;
    align-content: space-between;
    display: flex;
  }
  
  .header-left-mobile {
    display: flex;
    align-items: center;
    height: 100%;
  }
  
  .logo {
    font-size: 20px;
    display: flex;
    align-items: center;
    height: 100%;
  }
  
  .logo img {
    display: block;
    max-height: 100%;
    object-fit: contain;
  }
  
  .header-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
  }
  
  .search-area {
    display: none;
  }
  
  .search-modal-input {
    font-size: 24px;
    padding: 15px 0;
  }
  
  .search-modal-content {
    padding: 20px;
  }
  
  .search-modal-close {
    top: 10px;
    right: 10px;
    font-size: 24px;
  }
  
  .hero-section {
    padding: 0;
    margin-bottom: 20px;
  }
  
  .hero-container {
    aspect-ratio: 16 / 6;
  }
  
  .hero-header {
    padding: 15px;
  }
  
  .hero-content {
    margin-top: 70px;
  }
  
  .hero-title {
    font-size: 15px;
    font-weight: 300;
    padding: 0 20px;
  }
  
  .hero-author {
    font-size: 11px;
    font-weight: 300;
    opacity: 0.85;
  }
  
  .header-right {
    gap: 6px;
  }
  
  .header-icon-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .header-icon-btn i {
    font-size: 14px;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .header-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--primary-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    height: auto;
  }
  
  @media (max-width: 768px) {
    .mobile-menu-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
  
  .header-menu-mobile {
    display: none;
    align-items: center;
    justify-content: center;
  }
  
  @media (max-width: 768px) {
    .header-menu-mobile {
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
  
  .mobile-menu-toggle:hover {
    background: var(--primary);
    color: white;
  }
  
  .mobile-menu-toggle.active {
    background: var(--primary);
    color: white;
  }
  
  /* Logo ve Menu Layout */
  .header-container {
    position: relative;
  }
  
  .header-left-mobile {
    display: none;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    height: 100%;
  }
  
  @media (max-width: 768px) {
    .header-container {
      justify-content: space-between;
      align-items: center;
      align-content: space-between;
    }
    
    .header-left-mobile {
      display: flex;
      align-items: center;
    }
    
    .header-left-mobile .logo {
      display: flex;
      align-items: center;
      height: 100%;
    }
    
    .desktop-logo {
      display: none !important;
    }
    
    .header-menu-mobile {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      margin-left: auto;
      height: 100%;
    }
    
    .mobile-menu-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
      height: auto;
    }
  }
  
  @media (min-width: 769px) {
    .header-left-mobile {
      display: none !important;
    }
    
    .header-menu-mobile {
      display: none !important;
    }
  }
  
  
  /* Mobile Sidebar (Slide-in Menu) - Full Width */
  .mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    z-index: 1000;
    transition: left 0.3s ease-out;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-sidebar.active {
    left: 0;
  }
  
  /* Mobile Sidebar Header */
  .mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .mobile-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
  }
  
  .mobile-sidebar-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    border: 2px solid var(--border);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
    margin: 0;
  }
  
  .mobile-sidebar-close:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  
  /* Mobile Sidebar Content */
  .mobile-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
  }
  
  /* Mobile Sidebar - Categories and Tags spacing */
  .mobile-sidebar-content .categories-section + .categories-section {
    margin-top: 30px;
  }
  
  .mobile-sidebar-overlay {
    display: none;
  }
  
  /* Mobile Dropdowns (Upward) */
  .header-right-mobile .notification-wrapper,
  .header-right-mobile .user-wrapper {
    position: relative;
  }
  
  .header-right-mobile .notification-dropdown,
  .header-right-mobile .user-menu {
    position: fixed;
    bottom: 70px;
    right: 15px;
    left: 15px;
    top: auto;
    max-width: none;
    width: auto;
    min-width: auto;
    max-height: 50vh;
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  }
  
  .header-right-mobile .notification-dropdown {
    bottom: 70px;
  }
  
  .header-right-mobile .user-menu {
    bottom: 70px;
  }
  
  /* Mobile Bottom Bar */
  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 12px 20px;
    z-index: 998;
    height: 60px;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
  }
  
  .mobile-bottom-bar.hidden {
    transform: translateY(100%);
  }
  
  .mobile-bar-left,
  .mobile-bar-right {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #8f7058;
    color: white;
    text-decoration: none;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
    position: relative;
  }
  
  .mobile-bar-left:hover,
  .mobile-bar-right:hover {
    background: #957d65;
  }
  
  .mobile-bar-left i,
  .mobile-bar-right i {
    font-size: 18px;
    color: white;
  }
  
  .mobile-bar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #8f7058;
    color: white;
    text-decoration: none;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
    position: relative;
  }
  
  .mobile-bar-login-btn {
    width: auto;
    padding: 10px 20px;
    border-radius: 22px;
    gap: 8px;
  }
  
  .mobile-bar-login-btn span {
    font-size: 14px;
    font-weight: 600;
  }
  
  .mobile-bar-item:hover {
    background: #957d65;
  }
  
  .mobile-bar-center {
    position: relative;
    flex: 0 0 auto;
  }
  
  .mobile-bar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    border: 4px solid #8f7058;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-20px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  
  .mobile-bar-avatar img,
  .mobile-avatar-letter {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
  
  .mobile-avatar-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 24px;
  }
  
  .mobile-bar-guest-avatar {
    background: var(--muted);
    border-color: #8f7058;
    cursor: default;
  }
  
  .mobile-bar-guest-avatar:hover {
    transform: translateY(-20px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  
  .mobile-guest-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
  }
  
  .mobile-bar-avatar:hover {
    transform: translateY(-22px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  }
  
  .mobile-bar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #8f7058;
    color: white;
    text-decoration: none;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
    position: relative;
  }
  
  .mobile-bar-item:hover {
    background: #957d65;
  }
  
  .mobile-bar-item:active {
    background: #8f7058;
    transform: none;
  }
  
  .mobile-bar-left:active,
  .mobile-bar-right:active {
    background: #8f7058;
    transform: none;
  }
  
  .mobile-bar-item i {
    font-size: 18px;
    color: white;
  }
  
  .mobile-bar-item-wrapper {
    position: relative;
  }
  
  .mobile-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid #8f7058;
    z-index: 1;
  }
  
  /* Mobile Bottom Bar Dropdowns (Upward) */
  .mobile-notification-dropdown,
  .mobile-user-menu {
    position: fixed;
    bottom: 70px;
    left: 15px;
    right: 15px;
    top: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 999;
    max-height: 50vh;
    overflow-y: auto;
  }
  
  .mobile-notification-dropdown.active,
  .mobile-user-menu.active {
    display: block;
    animation: slideUp 0.2s ease-out;
  }
  
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Mark All Read Button - Mobile */
  .mobile-notification-dropdown .mark-all-read-btn {
    width: 100%;
    padding: 8px 16px;
    background: #fff9e6;
    color: #8b6914;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0 0 12px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: none;
  }
  
  .mobile-notification-dropdown .mark-all-read-btn:active {
    background: #fff4cc;
  }
  
  .mobile-user-menu {
    min-width: 200px;
  }
  
.mobile-user-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
  font-size: 14px;
}

.mobile-user-menu a i {
  width: 16px;
  text-align: center;
  color: var(--text-secondary);
}
  
  .mobile-user-menu a:last-child {
    border-bottom: none;
  }
  
  .mobile-user-menu a:hover {
    background: var(--muted);
    color: var(--primary);
  }
  
  /* Main content padding for mobile bottom bar */
  main {
    padding-bottom: 70px;
  }
  
  /* Container Layout - Mobile */
  .container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
  }
  
  .right-container {
    display: none;
  }
  
  .left-container {
    width: 100%;
  }
  
  /* Topics Header - Mobile */
  .topics-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-left:10px;
    padding-right: 10px;
    gap: 10px;
  }
  
  .topic-item {
    margin-top: 10px;
    flex-direction: column;
    padding: 12px;
    gap: 0;
  }
  
  /* Desktop'ta topic-footer-mobile gizle */
  .topic-footer-mobile {
    display: none;
  }
  
  @media (max-width: 768px) {
    .topic-footer-mobile {
      display: flex;
    }
  }
  
  .topic-item:first-of-type {
    margin-top: 0;
  }
  
  /* Topic Content - Mobile: Başlık ve açıklama üstte */
  .topic-content {
    order: 1;
    width: 100%;
    background: var(--bg);
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 0;
  }
  
  .topic-header {
    display: none;
  }
  
  .topic-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
  }
  
  .topic-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
  }
  
  .topic-content .topic-meta {
    display: none;
  }
  
  /* Topic Footer - Mobile: Avatar, isim, tarih, butonlar */
  .topic-footer-mobile {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    width: 100%;
  }
  
  /* Desktop'ta eski avatar'ı gizle */
  .topic-item > .topic-avatar:first-child {
    display: none;
  }
  
  .topic-user-info-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
  }
  
  .topic-avatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
    flex-shrink: 0;
  }
  
  .topic-user-details-mobile {
    display: flex;
    flex-direction: column;
    gap:0px;
  
  }
  
  .topic-author-mobile {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
  }
  
  .topic-date-mobile {
    font-size: 11px;
    color: var(--text-secondary);
  }
  
  .topic-actions-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  
  .category-badge-mobile {
    /* Styles inherited from main.css unified category badge */
  }
  
  .comment-count-mobile,
  .topic-view-count-mobile {
    /* Styles inherited from main.css unified view & comment count badge */
  }
  
  .topic-sidebar {
    display: none;
  }
  
  .sort-label-text {
    display: none;
  }
  
  .sort-label {
    font-size: 18px;
  }
  
  .sort-value {
    font-size: 18px;
  }
  
  .topics-header > div:last-child {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: auto;
    flex-shrink: 0;
  }
  
  .refresh-icon-btn,
  .new-topic-btn {
    padding: 6px 10px;
    font-size: 16px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .refresh-text,
  .new-topic-btn span {
    font-size: 16px;
    white-space: nowrap;
  }
  
  .refresh-icon,
  .new-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(40%) sepia(8%) saturate(800%) hue-rotate(10deg) brightness(95%) contrast(90%);
  }
  
  .refresh-text,
  .new-topic-btn span {
    color: var(--text-primary);
  }
  
  /* Main Content Padding */
  main {
    padding: 0;
  }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
  .container {
    grid-template-columns: 0.35fr 1fr;
    gap: 20px;
  }
}

/* Footer - Mobile Styles */
@media (max-width: 768px) {
  footer {
    margin-top: 30px;
    margin-bottom: 20px;
  }
  
  .footer-bar {
    margin: 0 15px;
    border-radius: 12px;
  }
  
  /* Desktop menüyü gizle */
  .footer-menu {
    display: none;
  }
  
  /* Mobile menüyü göster */
  .footer-mobile-menu {
    display: block;
    position: relative;
    margin-left: auto;
  }
  
  .footer-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
  }
  
  .footer-logo {
    flex-shrink: 0;
    gap: 8px;
  }
  
  .footer-logo img {
    max-height: 30px;
  }
  
  .footer-logo-text {
    font-size: 14px;
  }
  
  .footer-copyright {
    font-size: 13px;
  }
  
  .footer-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }
  
  .footer-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
  }
  
  .footer-mobile-toggle i {
    transition: transform 0.3s;
    font-size: 12px;
  }
  
  .footer-mobile-toggle.active i {
    transform: rotate(180deg);
  }
  
  .footer-mobile-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    left: auto;
    width: 250px;
    max-width: calc(100vw - 30px);
    margin-bottom: 8px;
    background: rgba(61, 40, 23, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .footer-mobile-dropdown.active {
    display: block;
  }
  
  .footer-mobile-dropdown a {
    display: block;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .footer-mobile-dropdown a:last-child {
    border-bottom: none;
  }
  
  .footer-mobile-dropdown a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 20px;
  }
  
  /* Page Content Box Mobile */
  .page-content-box {
    padding: 20px;
  }
  
  .page-content-box h1 {
    font-size: 24px;
    margin-bottom: 15px;
  }
  
  .page-content-box h2 {
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 12px;
  }
  
  .page-content-box p {
    font-size: 14px;
    line-height: 1.7;
  }
}

