/* ========================================
   Shape Mockup & Image Box Responsive Fixes
   Complete fix for mobile and tablet layouts
   ======================================== */

/* Hide all decorative shapes on mobile and tablet */
@media (max-width: 991px) {
  .shape-mockup {
    display: none !important;
  }
  
  .shape-mockup-wrap .shape-mockup {
    display: none !important;
  }
}

/* Image Box Fixes for All Screen Sizes */
@media (max-width: 1199px) {
  .img-box1 {
    margin-right: 0 !important;
    padding-right: 0 !important;
  }
}

/* Mobile specific fixes (up to 767px) */
@media (max-width: 767px) {
  /* Reset all img-box1 positioning */
  .img-box1 {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 35px !important;
    width: 100% !important;
    overflow: visible !important;
  }
  
  /* Main image full width */
  .img-box1 .img1 {
    position: relative !important;
    margin-bottom: 20px !important;
    width: 100% !important;
  }
  
  .img-box1 .img1 img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    border-radius: 12px !important;
    display: block;
  }
  
  /* Second image hidden on mobile */
  .img-box1 .img2 {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* About grid - responsive card */
  .about-grid {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 240px !important;
    margin: 20px auto !important;
    padding: 28px 20px !important;
    transform: none !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-color2) 100%) !important;
    box-shadow: 0 8px 25px rgba(13, 94, 244, 0.25) !important;
  }
  
  /* Remove background image on mobile */
  .about-grid[data-bg-src] {
    background-image: none !important;
  }
  
  .about-grid::before {
    display: none !important;
  }
  
  /* Text styling inside grid */
  .about-grid_year {
    font-size: 38px !important;
    margin-bottom: 12px !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1.1 !important;
  }
  
  .about-grid_year .counter-number {
    color: #fff !important;
  }
  
  .about-grid_year .text-theme {
    color: #FFD700 !important;
  }
  
  .about-grid_text {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
  }
  
  /* Remove all absolute positioned elements */
  .img-box1 > *[style*="position: absolute"],
  .img-box1 .shape-mockup,
  .img-box1 .about-shape1 {
    display: none !important;
  }
  
  /* Fix row spacing in about section */
  #about-sec .row {
    margin-left: -15px !important;
    margin-right: -15px !important;
  }
  
  #about-sec .row > * {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  
  /* Column ordering - image first, content second */
  #about-sec .row {
    display: flex;
    flex-direction: column;
  }
  
  #about-sec .col-xl-6:first-child {
    order: 1;
    margin-bottom: 30px;
  }
  
  #about-sec .col-xl-6:last-child {
    order: 2;
  }
}

/* Tablet fixes (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .img-box1 {
    position: relative !important;
    margin: 0 auto !important;
    margin-bottom: 40px !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  
  .img-box1 .img1 {
    margin-bottom: 25px;
    width: 100%;
  }
  
  .img-box1 .img1 img {
    width: 100%;
    border-radius: 12px;
  }
  
  .about-grid {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 25px auto !important;
    max-width: 280px !important;
    padding: 35px 30px !important;
    transform: none !important;
  }
  
  .about-grid_year {
    font-size: 42px !important;
  }
  
  .about-grid_text {
    font-size: 15px !important;
  }
  
  /* Show second image on tablet but make it relative */
  .img-box1 .img2 {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin: 20px auto 0 !important;
    max-width: 350px !important;
    display: block !important;
  }
  
  .img-box1 .img2 img {
    width: 100%;
    border-radius: 12px;
  }
  
  .img-box1 .img2::after {
    display: none !important;
  }
  
  /* Center content on tablet */
  #about-sec .col-xl-6 {
    text-align: center;
  }
  
  #about-sec .title-area {
    text-align: center;
  }
  
  #about-sec .row.align-items-center {
    justify-content: center;
  }
}

/* Large tablets (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .img-box1 {
    margin-right: 20px !important;
    padding-right: 80px !important;
    padding-bottom: 150px !important;
  }
  
  .about-grid {
    padding: 30px 25px !important;
  }
  
  .img-box1 .img2 {
    max-width: 250px !important;
  }
}

/* Prevent overflow issues */
@media (max-width: 991px) {
  .overflow-hidden {
    overflow: visible !important;
  }
  
  .shape-mockup-wrap {
    position: relative !important;
    z-index: 1 !important;
  }
}
