/* IBE Responsive CSS - Desktop & Mobile Support */
/* Maintains backward compatibility with Original Source mobile theme */

/* ========================================
 * RESPONSIVE BREAKPOINTS
 * ======================================== */
:root {
  --mobile-breakpoint: 767px;
  --tablet-breakpoint: 768px;
  --desktop-breakpoint: 1024px;
  --large-desktop-breakpoint: 1200px;
}

/* ========================================
 * DEVICE DETECTION CLASSES
 * ======================================== */
.device-mobile {
  /* Mobile-specific overrides if needed */
}

.device-desktop {
  /* Desktop-specific overrides */
}

/* ========================================
 * RESPONSIVE LAYOUT ADJUSTMENTS
 * ======================================== */

/* Mobile (default) - keeps existing behavior */
@media (max-width: 767px) {

  /* All existing mobile styles remain unchanged */
  .page-content {
    padding-bottom: 80px;
    padding-bottom: calc(80px + constant(safe-area-inset-bottom) * 1.1);
    padding-bottom: calc(80px + env(safe-area-inset-bottom) * 1.1);
  }

  /*
  #footer-bar {
    display: block;
  } */

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }
}

/* Desktop and larger screens */
@media (min-width: 768px) {

  /* Desktop Layout Adjustments */
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  .page-content {
    padding-bottom: 40px;
    /* Reduced padding on desktop */
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Desktop Navigation */
  #footer-bar {
    display: none;
    /* Hide mobile bottom bar on desktop */
  }

  .desktop-nav {
    display: block;
    /* position: fixed; */
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
  }

  .desktop-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
  }

  .desktop-nav .nav-brand {
    font-size: 20px;
    font-weight: 700;
    color: #1f1f1f;
    text-decoration: none;
  }

  .desktop-nav .nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
  }

  .desktop-nav .nav-menu a {
    color: #6c6c6c;
    text-decoration: none;
    font-weight: 500;
    padding: 20px 0;
    transition: color 0.3s ease;
  }

  .desktop-nav .nav-menu a:hover,
  .desktop-nav .nav-menu a.active {
    color: var(--highlight-color, #e74c3c);
  }

  .desktop-nav .nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
  }

  .desktop-nav .nav-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  /* Adjust page content for desktop nav */
  .header-clear,
  .header-clear-small {
    padding-top: 80px;
  }

  .mobile-only {
    display: none !important;
  }

  .desktop-only {
    display: block;
  }

  /* Desktop Card Layouts */
  .card-desktop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
  }

  .card-desktop-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .card-desktop-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
  }

  /* Desktop form layouts */
  .form-desktop-row {
    display: flex;
    gap: 20px;
  }

  .form-desktop-row .input-style {
    flex: 1;
  }
}

/* Large Desktop */
@media (min-width: 1200px) {
  .page-content {
    max-width: 1400px;
  }

  .desktop-nav .nav-container {
    max-width: 1400px;
  }

  body {
    font-size: 15px;
  }
}

/* ========================================
 * RESPONSIVE COMPONENTS
 * ======================================== */

/* Responsive Headers */
@media (min-width: 768px) {
  .header {
    height: 60px;
    height: calc(60px + constant(safe-area-inset-top) * 0.8);
    height: calc(60px + env(safe-area-inset-top) * 0.8);
  }

  .header .header-title {
    font-size: 16px;
    height: 60px;
    line-height: 60px;
  }

  .header .header-icon {
    height: 60px;
    line-height: 59px;
    font-size: 14px;
  }
}

/* Responsive Cards */
@media (min-width: 768px) {
  .card-style {
    margin: 10px;
  }

  .content {
    margin: 25px 20px 25px 20px;
  }

  /* Desktop hover effects */
  .card-style:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
  }
}

/* Responsive Typography */
@media (min-width: 768px) {
  h1 {
    font-size: 28px;
    line-height: 34px;
  }

  h2 {
    font-size: 24px;
    line-height: 30px;
  }

  h3 {
    font-size: 22px;
    line-height: 28px;
  }

  h4 {
    font-size: 20px;
    line-height: 26px;
  }

  h5 {
    font-size: 18px;
    line-height: 24px;
  }

  .boxed-text-xl {
    padding: 0 25px;
  }

  .boxed-text-l {
    padding: 0 20px;
  }
}

/* ========================================
 * RESPONSIVE UTILITIES
 * ======================================== */

/* Responsive spacing */
@media (min-width: 768px) {
  .desktop-p-0 {
    padding: 0 !important;
  }

  .desktop-p-1 {
    padding: 10px !important;
  }

  .desktop-p-2 {
    padding: 20px !important;
  }

  .desktop-p-3 {
    padding: 30px !important;
  }

  .desktop-m-0 {
    margin: 0 !important;
  }

  .desktop-m-1 {
    margin: 10px !important;
  }

  .desktop-m-2 {
    margin: 20px !important;
  }

  .desktop-m-3 {
    margin: 30px !important;
  }

  .desktop-text-left {
    text-align: left !important;
  }

  .desktop-text-center {
    text-align: center !important;
  }

  .desktop-text-right {
    text-align: right !important;
  }
}

/* Responsive Buttons */
@media (min-width: 768px) {
  .btn-desktop-inline {
    display: inline-block;
    width: auto;
    margin: 5px;
  }

  .btn-desktop-group {
    display: flex;
    gap: 10px;
    justify-content: center;
  }

  .btn-desktop-group .btn {
    flex: 1;
    max-width: 200px;
  }
}

/* ========================================
 * RESPONSIVE ANIMATIONS
 * ======================================== */

/* Desktop-only animations */
@media (min-width: 768px) {
  .desktop-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: desktopFadeIn 0.6s ease forwards;
  }

  @keyframes desktopFadeIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .desktop-slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: desktopSlideInLeft 0.6s ease forwards;
  }

  @keyframes desktopSlideInLeft {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}

/* ========================================
 * RESPONSIVE SLIDER ADJUSTMENTS
 * ======================================== */

/* Desktop slider modifications */
@media (min-width: 768px) {
  .splide__slide {
    padding: 0 5px;
  }

  .double-slider .splide__slide {
    padding: 0 10px;
  }

  .splide__pagination {
    bottom: -40px;
  }

  .splide__arrow {
    width: 3em;
    height: 3em;
    opacity: 0.8;
  }

  .splide__arrow:hover {
    opacity: 1;
  }
}

/* ========================================
 * RESPONSIVE MENU ADJUSTMENTS
 * ======================================== */

/* Desktop menu positioning */
@media (min-width: 768px) {
  .menu-box-bottom {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 500px;
  }

  .menu-box-modal {
    width: 90%;
    max-width: 600px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}

/* ========================================
 * THEME COMPATIBILITY
 * ======================================== */

/* Ensure theme colors work on desktop */
@media (min-width: 768px) {

  .desktop-nav .nav-menu a:hover,
  .desktop-nav .nav-menu a.active {
    color: var(--highlight-color, #e74c3c);
  }

  .desktop-nav .nav-actions .btn.bg-highlight {
    background-color: var(--highlight-color, #e74c3c);
  }
}

/* ========================================
 * RESPONSIVE FOOTER ADJUSTMENTS
 * ======================================== */

@media (min-width: 768px) {
  .footer {
    padding: 40px 20px;
    text-align: center;
  }

  .footer-socials {
    margin: 20px 0;
  }

  .footer-socials a {
    margin: 0 10px;
  }
}