/* Responsive Design Styles */

/* Base styles for all devices */
:root {
  --container-width: 1200px;
  --header-height: 80px;
  --mobile-header-height: 60px;
  --section-padding: 80px 0;
  --section-padding-mobile: 40px 0;
}

/* General responsive container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Media Queries */

/* Large Desktops (1200px and up) */
@media (min-width: 1200px) {
  .container {
    padding: 0 30px;
  }
}

/* Medium Desktops and Laptops (992px to 1199px) */
@media (max-width: 1199px) {
  :root {
    --container-width: 960px;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .service-grid, 
  .resources-grid, 
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablets and Small Desktops (768px to 991px) */
@media (max-width: 991px) {
  :root {
    --container-width: 720px;
    --section-padding: 60px 0;
  }
  
  .site-header {
    height: var(--header-height);
  }
  
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .cta-button {
    display: none;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .service-grid, 
  .resources-grid, 
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .footer-logo {
    grid-column: 1 / -1;
    text-align: center;
  }
  
  /* Mobile Menu Styles */
  .mobile-menu-active .main-nav {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: #fff;
    z-index: 100;
    padding: 20px;
    overflow-y: auto;
  }
  
  .mobile-menu-active .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .mobile-menu-active .main-nav li {
    width: 100%;
    margin: 0;
    border-bottom: 1px solid #eee;
  }
  
  .mobile-menu-active .main-nav a {
    display: block;
    padding: 15px 0;
  }
  
  .mobile-menu-active .dropdown {
    position: static;
    box-shadow: none;
    width: 100%;
    padding: 0 0 0 20px;
    display: none;
  }
  
  .mobile-menu-active .has-dropdown.active .dropdown {
    display: block;
  }
}

@media (max-width: 767px) {
    /* Existing rules */
    .site-header {
        position: static !important;
        top: auto !important;
    }
    .logo img {
        max-height: 60px !important;
    }
    .content {
        padding-top: 20px !important;
    }
    
  }
  
  .hero-section {
    padding: 60px 0;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    margin: 5px 0;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .service-grid, 
  .resources-grid, 
  .blog-grid,
  .contact-grid,
  .payment-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .newsletter-featured-content {
    flex-direction: column;
  }
  
  .newsletter-text,
  .newsletter-form-container {
    width: 100%;
  }
  
  .annual-service-banner {
    flex-direction: column;
    text-align: center;
  }
  
  .annual-service-banner .btn {
    margin-top: 10px;
  }
  
  .faq-categories {
    flex-wrap: wrap;
  }
  
  .faq-category-btn {
    margin: 5px;
    font-size: 0.9rem;
  }
  
  .blog-sidebar {
    margin-top: 40px;
  }
  
  .featured-content {
    flex-direction: column;
  }
  
  .featured-image,
  .featured-text {
    width: 100%;
  }
  
  .featured-image {
    margin-bottom: 20px;
  }
}

/* Small Mobile Devices (Up to 575px) */
@media (max-width: 575px) {
  :root {
    --container-width: 100%;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .service-card,
  .resource-card,
  .blog-post-card {
    padding: 15px;
  }
  
  .testimonial-card {
    padding: 15px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-bottom p {
    margin: 5px 0;
  }
  
  .newsletter-modal {
    width: 95%;
  }
  
  .modal-header h3 {
    font-size: 1.3rem;
  }
}

/* Mobile Menu Toggle Animation */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  height: 40px;
  width: 40px;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: #333;
  position: absolute;
  left: 7.5px;
  transition: all 0.3s;
}

.mobile-menu-toggle span:nth-child(1) {
  top: 12px;
}

.mobile-menu-toggle span:nth-child(2) {
  top: 19px;
}

.mobile-menu-toggle span:nth-child(3) {
  top: 26px;
}

.mobile-menu-active .mobile-menu-toggle span:nth-child(1) {
  transform: rotate(45deg);
  top: 19px;
}

.mobile-menu-active .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-active .mobile-menu-toggle span:nth-child(3) {
  transform: rotate(-45deg);
  top: 19px;
}

/* Responsive Table Styles */
@media (max-width: 767px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .responsive-table {
    display: block;
  }
  
  .responsive-table thead {
    display: none;
  }
  
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }
  
  .responsive-table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
  }
  
  .responsive-table td {
    text-align: right;
    padding: 10px;
    position: relative;
    border-bottom: 1px solid #eee;
  }
  
  .responsive-table td:last-child {
    border-bottom: none;
  }
  
  .responsive-table td:before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
  }
}

/* Touch-friendly Improvements for Mobile */
@media (max-width: 991px) {
  .btn, 
  a.btn,
  button,
  input[type="submit"],
  .nav-link,
  .dropdown-toggle {
    min-height: 44px; /* Minimum touch target size */
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  input, 
  select, 
  textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  /* Improve dropdown usability on touch devices */
  .has-dropdown > a:after {
    content: '\f107'; /* FontAwesome down arrow */
    font-family: 'Font Awesome 5 Free';
    margin-left: 5px;
  }
  
  .has-dropdown.active > a:after {
    content: '\f106'; /* FontAwesome up arrow */
  }
}
