/* =========================
   Responsive Styles
   ========================= */

/* Small desktops / tablets (Max 992px) */
@media (max-width: 992px) {
  .hero-grid,
  .cards-grid,
  .stats-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-map-col {
    grid-column: 1 / -1;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .gallery-bale-btn {
    min-width: 280px;
  }

  .gallery-eitaa-btn {
    min-width: 280px;
  }
}

/* Tablets and mobile (Max 768px) */
@media (max-width: 768px) {
  /* Header adjustments for mobile */
  .header-top {
    flex-direction: column;
    padding: 8px 0;
    gap: 6px;
    text-align: center;
  }

  .header-hours {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }

  .header-contact {
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  /* Hide organizational link buttons in header top bar on mobile */
  .header-contact .header-link-btn {
    display: none !important;
  }

  /* Hide company name button (مفکاپ) in mobile */
  .header-contact .company-name {
    display: none !important;
  }

  /* Also hide the specific mafkap link */
  .header-contact a[href*="mafkap.ir"] {
    display: none !important;
  }

  /* Hide mafkap button in mobile floating actions */
  .mobile-float-btn.company {
    display: none !important;
  }

  /* Show phone buttons in header */
  .header-phone-btn {
    font-size: 0.75rem;
    padding: 3px 6px;
  }

  .hours-chip {
    font-size: 0.7rem;
    padding: 3px 7px;
  }

  .hours-chip i {
    font-size: 0.8rem;
  }

  /* Hide LMS button in header */
  .lms-btn {
    display: none;
  }

  /* Header Main Inner */
  .header-inner {
    min-height: 70px;
    padding: 8px 0;
  }

  /* Add floating action buttons for mobile */
  .mobile-float-actions {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 20px;
    left: 20px;
    gap: 10px;
    z-index: 999;
  }

  .mobile-float-btn {
    width: auto;
    min-width: 130px;
    height: 45px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    padding: 0 16px;
  }

  .mobile-float-btn.store {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  }

  .mobile-float-btn.company {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  }

  .mobile-float-btn.lms {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  }

  .mobile-float-btn i {
    font-size: 1.1rem;
  }

  .mobile-float-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .mobile-float-btn::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.05);
      opacity: 0.5;
    }
  }

  /* Brand text adjustment in mobile */
  .brand-text {
    display: none; /* برای خلوت شدن هدر موبایل، متن برند را مخفی می‌کنیم */
  }

  /* Show Toggle Button */
  .menu-toggle {
    display: block;
    background: transparent;
    font-size: 1.5rem;
  }

  /* Mobile Navigation Overlay */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0c568b; /* رنگ اختصاصی منوی موبایل */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 20px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .main-nav a {
    color: #fff !important;
    width: 100%;
    text-align: right;
    padding: 10px 0;
    border-radius: 0;
  }

  /* Grid Layouts Stacked */
  .hero-grid,
  .cards-grid,
  .stats-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 56px 0 36px;
    gap: 36px;
  }

  .footer-map-frame iframe {
    height: 200px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-back-top {
    bottom: 20px;
    right: 20px;
    left: auto;
    width: 42px;
    height: 42px;
  }

  .section {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .gallery-bale-btn {
    min-width: 100%;
  }

  .gallery-eitaa-btn {
    min-width: 100%;
  }

  .gallery-bale-btn-inner {
    padding: 14px 20px;
  }

  .gallery-eitaa-btn-inner {
    padding: 14px 20px;
  }

  .gallery-bale-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .gallery-eitaa-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .gallery-bale-label {
    font-size: 0.7rem;
  }

  .gallery-bale-text {
    font-size: 1rem;
  }

  .gallery-cta-text {
    font-size: 0.85rem;
    max-width: 100%;
  }
}

/* Hide mobile floating buttons on desktop */
@media (min-width: 769px) {
  .mobile-float-actions {
    display: none;
  }
}



/* Very small phones (Max 480px) */
@media (max-width: 480px) {
  .header-top {
    padding: 6px 0;
    gap: 4px;
  }

  .header-hours {
    gap: 3px;
  }

  .hours-chip {
    font-size: 0.65rem;
    padding: 2px 5px;
  }

  .hours-chip i {
    font-size: 0.75rem;
  }

  .header-contact {
    gap: 6px;
  }

  .header-phone-btn {
    font-size: 0.7rem;
    padding: 2px 5px;
  }

  .brand img {
    width: 55px;
    height: 55px;
  }

  .header-inner {
    min-height: 65px;
    padding: 6px 0;
  }

  .mobile-float-btn {
    min-width: 110px;
    height: 40px;
    font-size: 0.75rem;
    padding: 0 12px;
    gap: 6px;
  }

  .mobile-float-btn i {
    font-size: 0.9rem;
  }

  .mobile-float-actions {
    gap: 8px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .hero-actions a {
    width: 100%;
  }
}
/* Slider Responsive */
@media (max-width: 992px) {
  .slider {
    height: 420px;
  }

  .slide-overlay h2 {
    font-size: 26px;
  }
}

@media (max-width: 768px) {
  .slider-section {
    padding: 20px 0 28px;
  }

  .slider {
    height: 320px;
    border-radius: 20px;
  }

  .slide-overlay {
    right: 14px;
    left: 14px;
    bottom: 14px;
    padding: 14px 16px;
    border-radius: 16px;
  }

  .slide-overlay h2 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .slide-overlay p {
    font-size: 14px;
    line-height: 1.8;
  }

  .nav-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .prev {
    left: 10px;
  }

  .next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .slider {
    height: 260px;
    border-radius: 16px;
  }

  .slide-overlay {
    right: 10px;
    left: 10px;
    bottom: 10px;
    padding: 12px 14px;
  }

  .slide-overlay h2 {
    font-size: 16px;
  }

  .slide-overlay p {
    font-size: 12px;
  }

  .dot {
    width: 9px;
    height: 9px;
  }

  .dot.is-active {
    width: 22px;
  }
}
