/* ============================================================
   Edeson File Converter - Responsive Stylesheet
   ============================================================ */

/* ------------------------------------------------------------
   Tablet (max-width: 992px)
   ------------------------------------------------------------ */
@media (max-width: 992px) {

  .sidebar {
    width: 70px;
  }

  .sidebar .nav-link span {
    display: none;
  }

  .sidebar .nav-link {
    justify-content: center;
    padding: 12px;
    margin: 4px 8px;
  }

  .sidebar .logo-text,
  .sidebar-header .logo-text {
    display: none;
  }

  .sidebar .logo-subtitle,
  .sidebar .sidebar-subtitle {
    display: none;
  }

  .sidebar .logo,
  .sidebar-header {
    justify-content: center;
  }

  .sidebar .sidebar-footer span {
    display: none;
  }

  .sidebar .sidebar-footer {
    justify-content: center;
    padding: 16px 8px;
  }

  .main-content {
    margin-left: 70px;
  }

  .header-title {
    font-size: 1.1rem;
    letter-spacing: 1px;
  }

  .header-slogan {
    font-size: 0.68rem;
  }

  .header-ad {
    width: 320px;
    height: 50px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ------------------------------------------------------------
   Mobile (max-width: 768px)
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   Quick Features Menu (mobile only, below Dashboard heading)
   ------------------------------------------------------------ */
.quick-features-menu {
  display: none;
}

@media (max-width: 768px) {
  .quick-features-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
  }

  .quick-feature-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1 1 calc(33.333% - 8px);
    min-width: 80px;
    max-width: 120px;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-primary);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }

  .quick-feature-btn i {
    font-size: 1.3rem;
    color: var(--secondary);
    transition: transform 0.25s ease;
  }

  .quick-feature-btn:hover,
  .quick-feature-btn:active {
    background: var(--secondary);
    color: var(--primary);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 168, 37, 0.3);
  }

  .quick-feature-btn:hover i,
  .quick-feature-btn:active i {
    color: var(--primary);
    transform: scale(1.1);
  }

  .quick-feature-btn span {
    line-height: 1.2;
  }
}

@media (max-width: 480px) {
  .quick-feature-btn {
    flex: 1 1 calc(50% - 8px);
    max-width: none;
    min-width: 0;
  }
}

/* ------------------------------------------------------------
   Mobile (max-width: 768px)
   ------------------------------------------------------------ */
@media (max-width: 768px) {

  /* Sidebar: full-width slide-in with icons + text labels */
  .sidebar {
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  /* Show text labels on mobile (override tablet hiding) */
  .sidebar .nav-link span {
    display: inline;
  }

  .sidebar .nav-link {
    justify-content: flex-start;
    padding: 12px 20px;
    margin: 4px 12px;
    min-height: 48px;
    gap: 14px;
  }

  .sidebar .logo-text,
  .sidebar-header .logo-text {
    display: block;
  }

  .sidebar .logo-subtitle,
  .sidebar .sidebar-subtitle {
    display: block;
  }

  .sidebar .logo,
  .sidebar-header {
    justify-content: flex-start;
  }

  .sidebar .sidebar-footer span {
    display: inline;
  }

  .sidebar .sidebar-footer {
    justify-content: flex-start;
    padding: 16px 20px;
  }

  .main-content {
    margin-left: 0;
  }

  .header-hamburger {
    display: flex;
  }

  .header-main {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px;
  }

  .header-logo {
    order: 1;
    flex-shrink: 0;
  }

  .logo-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    border-radius: 12px;
  }

  .header-title-group {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .header-title {
    font-size: 0.85rem;
    letter-spacing: 0.8px;
  }

  .header-slogan {
    font-size: 0.62rem;
  }

  .header-actions {
    order: 3;
    gap: 2px;
    flex-shrink: 0;
  }

  .header-icon-btn {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .header-ad {
    order: 4;
    width: 100%;
    flex: 1 1 100%;
    height: auto;
    max-height: 60px;
    margin-top: 4px;
  }

  .ad-placeholder {
    padding: 4px 8px;
  }

  .ad-placeholder p {
    font-size: 0.65rem;
  }

  .ad-placeholder .ad-contact,
  .ad-placeholder .ad-whatsapp {
    font-size: 0.6rem;
  }

  .header-search-bar {
    padding: 0 16px 10px;
    order: 5;
  }

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

  .file-preview-area {
    grid-template-columns: 1fr;
  }

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

  .settings-cards {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
  }

  .toast-container {
    left: 16px;
    right: 16px;
  }

  .toast {
    min-width: auto;
    width: 100%;
  }

  .result-card {
    flex-direction: column;
    text-align: center;
  }

  .history-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .history-controls .search-box {
    min-width: auto;
  }

  .section {
    padding: 16px;
  }

  .section-heading {
    font-size: 1.4rem;
  }
}

/* ------------------------------------------------------------
   Small Mobile (max-width: 480px)
   ------------------------------------------------------------ */
@media (max-width: 480px) {

  .header-main {
    padding: 10px 12px;
    gap: 8px;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .header-title {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }

  .header-slogan {
    display: none;
  }

  .header-icon-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .header-ad {
    max-height: 50px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .tool-cards-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    font-size: 1.3rem;
  }

  .upload-zone {
    padding: 32px 16px;
  }

  .app-header {
    border-radius: 0;
  }

  .sidebar {
    width: 260px;
  }
}

/* ------------------------------------------------------------
   Sidebar Overlay (Mobile)
   ------------------------------------------------------------ */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ------------------------------------------------------------
   Footer Responsive
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 20px 20px;
    text-align: left;
  }

  .footer-section h4 {
    justify-content: flex-start;
  }

  .footer-name {
    font-size: 1.15rem;
  }

  .footer-role {
    font-size: 0.75rem;
  }

  .footer-websites ul li a {
    justify-content: flex-start;
  }

  .footer-bottom {
    padding: 12px 20px;
    text-align: left;
  }

  .footer-bottom p {
    justify-content: flex-start;
  }
}
