/*
* ========================================================================
* HOSTALIG MOBILE RESPONSIVE ENHANCEMENTS
* Comprehensive mobile-first responsive design improvements
* ========================================================================
*/

/* ===== MOBILE-FIRST BASE STYLES ===== */

/* Prevent horizontal scrolling */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

* {
  box-sizing: border-box;
}

/* Container and row fixes */
.container, .container-fluid {
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

.row {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
}

.col, [class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
  max-width: 100%;
}

/* Enhanced Mobile Typography */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
  }
  
  h1 {
    font-size: 28px !important;
    line-height: 1.3;
    margin-bottom: 16px;
  }
  
  h2 {
    font-size: 24px !important;
    line-height: 1.4;
    margin-bottom: 14px;
  }
  
  h3 {
    font-size: 20px !important;
    line-height: 1.4;
    margin-bottom: 12px;
  }
  
  h4 {
    font-size: 18px !important;
    line-height: 1.4;
    margin-bottom: 10px;
  }
  
  p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 24px !important;
  }
  
  h2 {
    font-size: 22px !important;
  }
  
  h3 {
    font-size: 18px !important;
  }
  
  p {
    font-size: 14px;
  }
}

/* ===== ENHANCED MOBILE NAVIGATION ===== */

@media (max-width: 1200px) {
  /* Improved mobile menu */
  .navbar-collapse {
    width: 100% !important;
    max-width: 100% !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }
  
  .navbar-collapse.show {
    transform: translateX(0);
  }
  
  /* Better mobile menu items */
  .navbar .navbar-nav .nav-link {
    padding: 16px 0;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
  }
  
  /* Enhanced dropdown styling */
  .navbar .dropdown-menu {
    background: #f8f9fa;
    margin: 0;
    padding: 8px 0;
    border-radius: 0;
    position: static !important;
    transform: none !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    border: none;
    width: 100%;
  }
  
  .navbar .dropdown-menu .dropdown-item {
    padding: 12px 30px;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
  }
  
  .navbar .dropdown-menu .dropdown-item:hover,
  .navbar .dropdown-menu .dropdown-item:focus {
    background-color: #e9ecef;
    color: #495057;
    padding-left: 35px;
  }
  
  .navbar .dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
  }
  
  /* Dropdown toggle improvements */
  .navbar .nav-link.dropdown-toggle::after {
    transition: transform 0.2s ease;
  }
  
  .navbar .nav-link.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
  }
  
  /* Mobile header buttons */
  .mobile-content {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
  }
  
  .mobile-content .theme-btn {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
    padding: 14px 20px;
    font-size: 16px;
  }
}

/* ===== MOBILE HERO SECTION ENHANCEMENTS ===== */

@media (max-width: 768px) {
  .hero-banner {
    padding: 80px 0 60px;
    text-align: center;
  }
  
  .hero-banner .inner-content {
    margin-bottom: 30px;
  }
  
  .hero-banner .inner-content h1 {
    font-size: 28px !important;
    margin-bottom: 20px;
  }
  
  .hero-banner .inner-content p.big {
    font-size: 18px;
    margin-bottom: 20px;
  }
  
  .hero-banner .inner-content p {
    font-size: 15px;
    margin-bottom: 25px;
  }
  
  /* Mobile hero features */
  .hero-features {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .hero-features .feature-item {
    justify-content: center;
    font-size: 14px;
  }
  
  /* Mobile domain search */
  .domain-search-form {
    margin-bottom: 25px;
  }
  
  .domain-search-form form {
    flex-direction: column;
    gap: 12px;
  }
  
  .domain-search-form input {
    width: 100% !important;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  .domain-search-form .theme-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }
  
  /* Center View Plans & Pricing button on mobile */
   .theme-btn.three.width-increase {
      display: block !important;
      margin: 0 auto !important;
      text-align: center !important;
      width: auto !important;
      max-width: 280px;
      visibility: visible !important;
    }
  }


    
    /* Style pricing plan elements with theme green color */
    .product-plan-card h3,
    .hosting-type-card h3 {
      color: var(--color-one) !important;
    }
    
    .product-plan-card .price-figure,
    .hosting-type-card .price-figure {
      color: var(--color-one) !important;
    }
    
    .product-plan-card .price-figure sup,
    .hosting-type-card .price-figure sup {
      color: var(--color-one) !important;
    }
    
    .product-plan-card .ri-checkbox-circle-fill,
    .hosting-type-card .ri-check-line,
    .plan-listing .ri-check-line {
      color: var(--color-one) !important;
    }

@media (max-width: 480px) {
  .hero-banner {
    padding: 60px 0 40px;
  }
  
  .hero-banner .inner-content h1 {
    font-size: 24px !important;
  }
  
  .hero-banner .inner-content p.big {
    font-size: 16px;
  }
}

/* ===== MOBILE PRICING CARDS ENHANCEMENTS ===== */

/* Fix card alignment for all screen sizes */
.row.g-4 {
  display: flex;
  flex-wrap: wrap;
}

.row.g-4 > [class*="col-"] {
  display: flex;
  align-items: stretch;
}

.hosting-type-card,
.plan-one-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
  justify-content: space-between;
}

.hosting-type-card .card-content,
.plan-one-card .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.hosting-type-card .price-area,
.plan-one-card .price-area {
  margin-top: auto;
  margin-bottom: 20px;
}

.hosting-type-card .theme-btn,
.plan-one-card .theme-btn {
  margin-top: auto;
}

.hosting-type-card h3,
.plan-one-card h3 {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hosting-type-card p,
.plan-one-card p {
  flex-grow: 1;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .hosting-type-card,
  .plan-one-card {
    margin-bottom: 30px;
    padding: 20px 15px;
    min-height: auto;
    border-radius: 12px;
  }
  
  .hosting-type-card h3 {
    font-size: 20px !important;
    margin-bottom: 10px;
    min-height: auto;
    text-align: center !important;
  }
  
  .hosting-type-card .plan-description {
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center !important;
    line-height: 1.4;
  }
  
  .price-area {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px 0;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
  }
  
  .price-figure {
    font-size: 28px;
    display: block;
  }
  
  .price-figure sup {
    font-size: 16px;
  }
  
  .price-label {
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
  }
  
  .price-term {
    font-size: 12px;
    display: block;
    margin-top: 5px;
  }
  
  /* Popular badge mobile */
  .popular-badge {
    font-size: 11px;
    padding: 4px 12px;
    top: -8px;
    right: 15px;
  }
  
  /* Mobile pricing switcher */
  .pricing-switcher {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .pricing-switcher .btn {
    font-size: 11px;
    padding: 6px 10px;
    min-width: auto;
    border-radius: 6px;
  }
  
  /* Mobile plan features */
  .plan-listing {
    margin-bottom: 20px;
  }
  
  .plan-listing ul {
    padding-left: 0;
    margin-bottom: 0;
  }
  
  .plan-listing li {
    font-size: 12px;
    padding: 6px 0;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
  }
  
  .plan-listing li i {
    margin-right: 8px;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
  }
  
  .plan-listing li strong {
    font-weight: 600;
  }
  
  /* Mobile buttons */
  .hosting-type-card .theme-btn {
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 8px;
    margin-top: 15px;
  }
  
  /* Mobile card spacing */
  .hosting-type-card .border {
    margin: 15px 0 !important;
  }
  
  /* Mobile section spacing */
  .theme-section-gap {
    padding: 40px 0;
  }
  
  /* Mobile container padding */
   .container {
     padding-left: 15px;
     padding-right: 15px;
   }
 }
 
 /* Extra small mobile devices */
 @media (max-width: 480px) {
   .hosting-type-card,
   .plan-one-card {
     padding: 15px 12px;
     margin-bottom: 25px;
   }
   
   .hosting-type-card h3 {
     font-size: 18px !important;
   }
   
   .hosting-type-card .plan-description {
     font-size: 12px;
   }
   
   .price-figure {
     font-size: 24px;
   }
   
   .price-figure sup {
     font-size: 14px;
   }
   
   .plan-listing li {
     font-size: 11px;
     padding: 4px 0;
   }
   
   .plan-listing li i {
     font-size: 12px;
   }
   
   .hosting-type-card .theme-btn {
     font-size: 13px;
     padding: 10px 15px;
   }
   
   .pricing-switcher .btn {
     font-size: 10px;
     padding: 5px 8px;
   }
   
   .theme-section-gap {
     padding: 30px 0;
   }
 }

@media (max-width: 480px) {
  .hosting-type-card,
  .plan-one-card {
    padding: 20px 15px;
  }
  
  .price-figure {
    font-size: 28px;
  }
  
  .pricing-switcher .btn {
    font-size: 11px;
    padding: 6px 10px;
  }
}

/* ===== MOBILE FEATURE CARDS ENHANCEMENTS ===== */

@media (max-width: 768px) {
  .feature-card,
  .style-one-card,
  .service-style-two-card {
    margin-bottom: 25px;
    padding: 20px;
    text-align: center;
  }
  
  .feature-card-icon,
  .style-one-card-icon {
    margin: 0 auto 15px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .feature-card h4,
  .style-one-card h3 {
    font-size: 18px !important;
    margin-bottom: 12px;
  }
  
  .feature-card p,
  .style-one-card p {
    font-size: 14px;
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  .feature-card,
  .style-one-card,
  .service-style-two-card {
    padding: 18px 15px;
  }
  
  .feature-card-icon,
  .style-one-card-icon {
    width: 50px;
    height: 50px;
  }
}

/* ===== MOBILE FORM ENHANCEMENTS ===== */

@media (max-width: 768px) {
  .php-email-form {
    padding: 0;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-control,
  .form-select {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
  }
  
  .form-control:focus,
  .form-select:focus {
    border-color: var(--color-one);
    box-shadow: 0 0 0 0.2rem rgba(42, 134, 46, 0.25);
  }
  
  label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
  }
  
  textarea.form-control {
    min-height: 120px;
    resize: vertical;
  }
}

/* ===== MOBILE BUTTON ENHANCEMENTS ===== */

@media (max-width: 768px) {
  .theme-btn {
    padding: 14px 24px;
    font-size: 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
  }
  
  .theme-btn.btn-small {
    padding: 10px 18px;
    font-size: 14px;
  }
  
  .theme-btn.w-100 {
    width: 100% !important;
  }
  
  /* Mobile CTA buttons */
  .mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
  }
  
  .mobile-cta .theme-btn {
    width: 100%;
    margin: 0;
  }
}

/* ===== MOBILE TABLE ENHANCEMENTS ===== */

@media (max-width: 768px) {
  /* Hide comparison table section on mobile */
  .comparison-table {
    display: none !important;
  }
  
  .table-responsive {
    border: none;
  }
  
  .table {
    font-size: 14px;
  }
  
  .table th,
  .table td {
    padding: 12px 8px;
    vertical-align: middle;
  }
  
  .table th {
    font-size: 13px;
    font-weight: 600;
  }
  
  /* Stack table on very small screens */
  @media (max-width: 480px) {
    .table,
    .table thead,
    .table tbody,
    .table th,
    .table td,
    .table tr {
      display: block;
    }
    
    .table thead tr {
      position: absolute;
      top: -9999px;
      left: -9999px;
    }
    
    .table tr {
      border: 1px solid #ccc;
      margin-bottom: 10px;
      padding: 10px;
      border-radius: 8px;
    }
    
    .table td {
      border: none;
      position: relative;
      padding-left: 50% !important;
      text-align: right;
    }
    
    .table td:before {
      content: attr(data-label) ":";
      position: absolute;
      left: 6px;
      width: 45%;
      padding-right: 10px;
      white-space: nowrap;
      font-weight: 600;
      text-align: left;
    }
  }
}

/* ===== MOBILE FOOTER ENHANCEMENTS ===== */

@media (max-width: 768px) {
  footer {
    padding: 40px 0 20px;
  }
  
  .footer-logo {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .footer-logo img {
    width: 200px;
    max-width: 100%;
  }
  
  .footer-list {
    margin-bottom: 25px;
  }
  
  .footer-list h5 {
    font-size: 16px;
    margin-bottom: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    position: relative;
  }
  
  .footer-list h5:after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    transition: transform 0.3s ease;
  }
  
  .footer-list.open h5:after {
    transform: translateY(-50%) rotate(45deg);
  }
  
  .footer-list ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .footer-list.open ul {
    max-height: 300px;
  }
  
  .footer-list li {
    margin-bottom: 8px;
  }
  
  .footer-list a {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  
  .footer-list a:hover {
    color: var(--color-one);
  }
  
  .footer-services {
    margin-bottom: 30px;
  }
  
  .service-contain {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  .service-box {
    text-align: center;
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 8px;
  }
  
  .service-box img {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
  }
  
  .service-box h5 {
    font-size: 12px;
    margin: 0;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .service-contain {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .service-box {
    padding: 12px 8px;
  }
  
  .service-box h5 {
    font-size: 11px;
  }
}

/* ===== MOBILE SLIDER ENHANCEMENTS ===== */

@media (max-width: 768px) {
  .hero-banner-bottom-slider {
    padding: 15px 5px;
  }
  
  /* Enable smooth slow animation on mobile */
  .slider-track {
    animation: scroll 35s linear infinite !important;
    animation-play-state: running !important;
    will-change: transform;
    transform: translateX(0) !important;
  }
  
  /* Ensure mobile slider container is set up properly */
  .image-slider {
    overflow: hidden;
    width: 100%;
  }
  
  .slides {
    width: 120px;
    padding: 8px;
    flex-shrink: 0;
  }
  
  .slides img {
    width: 80%;
    height: auto;
    max-width: 60px;
  }
  
  .trusted-by-heading {
    font-size: 16px !important;
    margin-bottom: 15px;
  }
  
  /* Force animation restart on mobile */
  .hero-banner-bottom-slider .slider-track {
    animation-name: scroll;
    animation-duration: 20s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-play-state: running;
    transform: translateX(0);
  }
}

/* ===== MOBILE CONTACT PAGE ENHANCEMENTS ===== */

@media (max-width: 768px) {
  .contact-hero {
    padding: 80px 0 60px;
  }
  
  .info-box {
    margin-bottom: 30px;
    padding: 25px 20px;
    background: #f8f9fa;
    border-radius: 12px;
  }
  
  .info-item {
    text-align: center;
    margin-bottom: 25px;
  }
  
  .info-item:last-child {
    margin-bottom: 0;
  }
  
  .info-item i {
    font-size: 32px;
    color: var(--color-one);
    margin-bottom: 12px;
  }
  
  .info-item h4 {
    font-size: 16px;
    margin-bottom: 8px;
  }
  
  .info-item p,
  .info-item a {
    font-size: 14px;
    color: #666;
  }
}

/* ===== MOBILE BREADCRUMB ENHANCEMENTS ===== */

@media (max-width: 768px) {
  .breadcrumb {
    font-size: 14px;
    padding: 0;
    margin: 20px 0 0;
    background: transparent;
  }
  
  .breadcrumb-item {
    color: rgba(255,255,255,0.8);
  }
  
  .breadcrumb-item.active {
    color: white;
  }
  
  .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.6);
  }
}

/* ===== MOBILE UTILITY CLASSES ===== */

@media (max-width: 768px) {
  .mobile-center {
    text-align: center !important;
  }
  
  .mobile-left {
    text-align: left !important;
  }
  
  .mobile-hidden {
    display: none !important;
  }
  
  .mobile-block {
    display: block !important;
  }
  
  .mobile-mb-0 {
    margin-bottom: 0 !important;
  }
  
  .mobile-mb-1 {
    margin-bottom: 8px !important;
  }
  
  .mobile-mb-2 {
    margin-bottom: 16px !important;
  }
  
  .mobile-mb-3 {
    margin-bottom: 24px !important;
  }
  
  .mobile-p-0 {
    padding: 0 !important;
  }
  
  .mobile-p-1 {
    padding: 8px !important;
  }
  
  .mobile-p-2 {
    padding: 16px !important;
  }
  
  .mobile-p-3 {
    padding: 24px !important;
  }
}

/* ===== MOBILE PERFORMANCE OPTIMIZATIONS ===== */

@media (max-width: 768px) {
  /* Reduce animations on mobile for better performance */
  .reduce-motion {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  /* Optimize images for mobile */
  img {
    height: auto;
    max-width: 100%;
  }
  
  /* Improve touch targets */
  .btn,
  .theme-btn,
  a,
  button,
  input,
  select,
  textarea {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Better focus states for mobile */
  .btn:focus,
  .theme-btn:focus,
  a:focus,
  button:focus,
  input:focus,
  select:focus,
  textarea:focus {
    outline: 2px solid var(--color-one);
    outline-offset: 2px;
  }
}

/* ===== MOBILE ACCESSIBILITY ENHANCEMENTS ===== */

@media (max-width: 768px) {
  /* Skip to content link */
  .skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-one);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
  }
  
  .skip-to-content:focus {
    top: 6px;
  }
  
  /* Better contrast for mobile */
  .text-muted {
    color: #555 !important;
  }
  
  /* Larger click areas */
  .navbar-toggler {
    padding: 8px;
    min-width: 48px;
    min-height: 48px;
  }
}

/* ===== MOBILE DARK MODE SUPPORT ===== */

@media (max-width: 768px) and (prefers-color-scheme: dark) {
  .hero-banner.bg1,
  .hero-banner.bg5 {
    background-image: linear-gradient(80deg, #1a5a1d 0%, #2d4a2f 100%);
  }
  
  .hosting-type-card,
  .plan-one-card {
    background: #2a2a2a;
    color: #fff;
    border-color: #444;
  }
  
  .form-control,
  .form-select {
    background: #333;
    color: #fff;
    border-color: #555;
  }
}

/* ===== PRINT STYLES FOR MOBILE ===== */

@media print {
  .navbar,
  .hero-banner,
  .mobile-cta,
  .sales-notification {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  .hosting-type-card,
  .plan-one-card {
    page-break-inside: avoid;
    border: 1px solid #000;
    margin-bottom: 20pt;
  }
}