/* Mobile-First Responsive Styles */

/* Base Mobile Styles (0-576px) */
@media (max-width: 576px) {
  /* Typography */
  body {
    font-size: 14px;
    line-height: 1.4;
  }

  h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }

  h2 {
    font-size: 1.75rem !important;
  }

  h3 {
    font-size: 1.5rem !important;
  }

  /* Layout */
  .container, .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Navigation */
  .ftco_navbar {
    padding: 5px 0;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
  }
  
  .ftco-navbar-light {
    background: #000000 !important;
    position: fixed !important;
    height: auto;
  }

  .ftco_navbar .navbar-collapse {
    background: rgba(0,0,0,0.95);
    padding: 20px;
    border-radius: 5px;
  }

  .navbar-nav .nav-link {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  /* Hero Section */
  .hero {
    height: auto;
    margin-top: 0px;  /* Reduced space from header */
    margin-bottom: -5px;  /* Remove bottom margin */
  }

  .slider-item {
    height: auto !important;
    padding-top: 0 !important;  /* Remove top padding */
    padding-bottom: 1rem !important;  /* Reduced bottom padding */
  }

  #home-section {
    padding-top: 0 !important;  /* Remove section top padding */
  }

  .one-third {
    height: 300px !important;
    width: 100% !important;
    margin-bottom: 20px;
  }

  .one-forth {
    width: 100% !important;
    padding: 20px !important;
  }

  /* Slider Text */
  .slider-text {
    color: #fff !important;
    margin-top: 5rem !important;
    padding: 0 15px !important;
  }

  .slider-text h1.mb-4.mt-3 {
    color: #fff !important;
    font-size: 2rem !important;
    line-height: 1.4 !important;
    margin-top: 1rem !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
    visibility: visible !important;
    display: block !important;
  }

  /* Buttons */
  .btn {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px 20px;
  }

  /* Sections */
  .ftco-section {
    padding: 2rem 0;  /* Reduced padding from 3rem to 2rem */
  }

  .ftco-counter {
    padding: 2rem 0 !important;  /* Add specific padding for counter section */
  }

  .ftco-about .img-about {
    height: 300px;
    margin-bottom: 30px;
  }

  /* Services */
  .services {
    padding: 20px;
    margin-bottom: 30px;
  }

  .services .icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
  }

  /* Forms */
  input, textarea, select {
    font-size: 16px !important;
    padding: 10px !important;
  }

  /* Footer */
  .ftco-footer {
    padding: 3rem 0;
    text-align: center;
  }

  .ftco-footer-widget {
    margin-bottom: 30px;
  }
}

/* Small devices (576px-768px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .one-third {
    height: 350px !important;
  }

  h1 {
    font-size: 2.5rem !important;
  }
}

/* Medium devices (768px-992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .one-third {
    height: 400px !important;
  }

  .services {
    width: 50%;
    float: left;
  }
}

/* Common mobile fixes */
@media (max-width: 991.98px) {
  /* Fix overflow issues */
  html, body {
    overflow-x: hidden;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* Improve touch targets */
  .btn, .nav-link {
    min-height: 44px;
    padding: 12px 20px;
  }

  /* Make images responsive */
  img, .img {
    max-width: 100%;
    height: auto;
  }

  /* Improve form usability */
  input, select, textarea {
    margin-bottom: 15px;
    width: 100%;
  }

  /* Fix modal scrolling */
  .modal-open {
    overflow: auto !important;
  }

  /* Adjust spacing */
  .mb-4 {
    margin-bottom: 1.5rem !important;
  }

  .py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  /* Fix sticky elements */
  .sticky-top {
    position: relative !important;
  }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
  .slider-item {
    height: auto !important;
    min-height: 100vh;
  }

  .one-third {
    height: 250px !important;
  }
}