/*=============================================
  RESPONSIVE CSS STYLES
  This file contains all responsive styles for the website
  Organized by device size from smallest to largest
=============================================*/

/*---------------------------------------------
  Extra Small Devices (phones, 480px and below)
---------------------------------------------*/
@media (max-width: 480px) {
  /* Grid Layouts */
  .related-clients-slider,
  .portfolio-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .client-logo {
    flex: 0 0 250px;
    height: 200px;
  }

  /* Quote Form Specific Styles */
  .quote-form h2 {
    font-size: 1.6rem;
  }
  
  .form-step {
    padding-left: 30px;
  }
  
  .form-step .step-number {
    width: 25px;
    height: 25px;
    font-size: 0.9rem;
  }

  /* FIX: Ensure form inputs are full width */
  .quote-form-section .form-container {
    padding: 20px 10px;
    width: 100%;
    max-width: 100%;
  }
  
  .quote-form {
    width: 100%;
  }
  
  .quote-form .form-group {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }
  
  .form-control,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix margin issues in quote form */
  .quote-form-section .container,
  .quote-form-section .form-container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
 
}

/*---------------------------------------------
  Small Devices (phones, 576px and below)
---------------------------------------------*/
@media (max-width: 576px) {
  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .slide-content h1 {
    color: var(--white-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 100%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
  
  /* Components */
  .btn { width: 100%; }
  
  /* Forms */
  .form-steps { margin-left: 12px; }
  
  /* Cards and Grid Layouts */
  .value-card {
    max-width: 320px;
    margin: 0 auto;
  }
  
  /* Specific Page Layouts */
  .masonry-gallery { columns: 1; }
  
  .meta-info { grid-template-columns: 1fr; }
  
  .gallery-section h2, 
  .section-heading { font-size: 1.75rem; }
  
  .service-card {
    max-width: 320px;
    margin: 0 auto;
  }
  
  .testimonial-content {
    padding: 2rem;
  }
  
  .testimonial-content blockquote {
    font-size: 1rem;
  }
  
  /* Clients grid */
  .clients-grid {
    grid-template-columns: 1fr; /* 1 item per row on mobile */
  }
      .consent-section {
        margin: 10px 0 20px;
    }
    
.form-check {
        padding-left: 28px;
    }
    
    .form-check-label {
        font-size: 0.9rem;
    }
    
    .form-check-label::before {
        width: 18px;
        height: 18px;
    }
    
    .form-check-label::after {
        left: 6px;
        top: 10px;
        width: 5px;
        height: 9px;
    }

  /* FIX: Container width for proper form display */
  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }
  
  /* FIX: Even stronger override for form inputs */
  .quote-form .form-control,
  .quote-form input,
  .quote-form select,
  .quote-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* FIX: Better stack portfolio cards */
  .portfolio-grid .portfolio-item {
    margin-bottom: 1.5rem;
  }
  
  /* FIX: Make portfolio filter buttons vertical */
  .portfolio-filter {
    flex-direction: column;
    align-items: center;
  }
  
  .portfolio-filter .filter-button {
    margin-bottom: 0.5rem;
    width: 100%;
  }
}

/*---------------------------------------------
  Medium Devices (tablets, 768px and below)
---------------------------------------------*/
@media (max-width: 768px) {
  /* Typography */
  .hero-content h1 { font-size: 2.25rem; }
  
  .page-header h1,
  .contact-header h1,
  .clients-section-title h1 { font-size: 2rem; }
  
  .page-header p,
  .rich-text { font-size: 1rem; }
  
  /* Header and Footer */
  .page-header {
    padding: var(--spacing-lg) 0;
  }
  
  .page-header.with-bg-image {
    padding: var(--spacing-xl) 0;
  }
  
  .footer-widgets { flex-direction: column; }
  
  .widget {
    width: 100%;
    padding-right: 0;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    margin-top: var(--spacing-md);
  }
  
  .footer-links a {
    margin: 0 var(--spacing-sm);
  }
  
  /* Breadcrumbs */
  .breadcrumbs li { font-size: 13px; }
  
  .breadcrumbs .separator { margin: 0 6px; }
  
  /* Grid Layouts */
  .services-grid,
  .portfolio-carousel,
  .project-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .benefits-grid { 
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  
  .experience-counter {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .counter-item { margin-bottom: var(--spacing-md); }
  
  .image-gallery { grid-template-columns: repeat(2, 1fr); }
  
  /* Forms */
  .form-steps {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 20px;
  }
  
  .form-steps::before {
    top: 0;
    left: 20px;
    width: 2px;
    height: 100%;
  }
  
  .form-step {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: var(--spacing-md);
    text-align: left;
    flex-direction: row;
  }
  
  .step-number { margin: 0 var(--spacing-md) 0 0; }
  
  .form-step::after {
    top: auto;
    right: auto;
    bottom: -50%;
    left: 20px;
    width: 2px;
    height: 100%;
  }
  
  .form-actions {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .review-grid {
    grid-template-columns: 1fr;
  }
  
  .review-item.wide { grid-column: auto; }
  
  .service-meta {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  /* Contact and Quote Form Styles */
  .quote-form-section .container {
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal overflow */
  }
  
  .form-container { 
    padding: 20px 15px;
    width: 100%;
    max-width: 100%; 
    overflow-x: hidden;
  }
  
  .contact-cards { grid-template-columns: 1fr; }
  
  .form-row { 
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .form-group {
    width: 100%;
    margin-bottom: 15px;
    padding: 0;
    margin-right: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Enhanced form controls for full width and prevent right overflow */
  .form-control,
  .form-control[type="text"],
  .form-control[type="email"],
  .form-control[type="tel"],
  .form-control[type="select"],
  .form-control textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 0.75rem !important;
    right: 0 !important;
  }
  
  /* Fix for quote form fields stretching too far to the right */
  .quote-form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .step-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Reset any potential transforms or positioning causing overflow */
  .quote-form * {
    transform: none !important;
    max-width: 100% !important;
  }
  
  /* Fix for uneven form margins - center the form properly */
  .quote-form-section .container,
  .quote-form-section .form-container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .quote-form {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .step-content {
    padding: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
  }
  
  /* This targets the inputs directly to ensure they're centered */
  .form-group {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
  }
  
  /* Target the form labels to align them properly */
  .form-label {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
  
  .form-actions .btn {
    width: 100%;
    padding: 12px;
  }
  
  .file-upload-wrapper {
    flex-direction: column;
  }
  
  .file-upload-button {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .quote-form h2 {
    font-size: 1.8rem;
    margin-top: 40px !important;
  }
  
  .quote-form .step-description {
    font-size: 0.9rem;
  }
  

  /* CTA and Other Sections */
  .cta-buttons,
  .action-buttons {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .cta-content h2 { font-size: 2rem; }
  
  .social-links { justify-content: center; }
  
  .item-header { flex-direction: column; }
  
  .item-header-image {
    padding-left: 0;
    margin-top: var(--spacing-lg);
    width: 100%;
    max-width: 100%;
  }
  
  .clients-filter {
    flex-direction: column;
    align-items: center;
  }
  
  .filter-button {
    width: 100%;
    max-width: 300px;
  }
  
  .client-header-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .client-logo {
    margin: 0 auto;
    max-width: 220px;
  }
  
  .related-clients-slider {
    grid-template-columns: 1fr 1fr;
  }
  
  .tab-button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .tab-content { padding: 1.5rem; }
  
  .project-navigation {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .nav-placeholder, 
  .all-projects { grid-column: 1; }
  
  .prev-project, 
  .next-project { width: 100%; }
  
  .thank-you-content h1 { font-size: 2.2rem; }
  
  .thank-you-content p { font-size: 1rem; }
  
  .section-heading { font-size: 2rem; }
  
  .steps-grid { grid-template-columns: 1fr; }
  
  .client-header { padding: 3rem 0; }
  
  .client-info h1 { font-size: 2rem; }
  
  .section-title h2 { font-size: 1.8rem; }
  
  .portfolio-image { height: 200px; }
  
  /* Clients grid */
  .clients-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 items per row on tablets */
  }
  
  /* Fix for About page layout on mobile */
  /* Make two-column layouts stack vertically */
  .intro-grid,
  .mission-vision-wrapper,
  .values-grid,
  .equipment-carousel,
  .testimonials-carousel {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-lg);
  }
  
  /* Fix ordering of image and content in intro section */
  .intro-content {
    order: 2;
  }
  
  .intro-image {
    order: 1;
    margin-bottom: var(--spacing-lg);
  }
  
  /* Adjust values grid to fit mobile better */
  .value-card {
    text-align: center;
    padding: var(--spacing-lg);
  }
  
  /* Center value icons */
  .value-icon {
    margin: 0 auto var(--spacing-md);
  }
  
  /* Contact page fixes */
  .contact-content {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  
  .contact-form, 
  .faq-section {
    width: 100%;
  }
  
  /* Services page fixes */
  .process-flow {
    flex-direction: column;
  }
  
  .process-flow::before {
    display: none;
  }
  
  .process-step {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  .quality-grid {
    grid-template-columns: 1fr !important;
  }
  
  .quality-image {
    order: 1;
    margin-bottom: 2rem;
  }
  
  .quality-content {
    order: 2;
  }
  
  /* Portfolio page fixes */
  .portfolio-filter {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .filter-button {
    margin-bottom: 0.5rem;
  }
  
  .pagination .page-item {
    margin-bottom: 0.5rem;
  }
}

/*---------------------------------------------
  Large Devices (desktops, 992px and below)
---------------------------------------------*/
@media (max-width: 992px) {
  /* Typography */
  .section-title {
    font-size: 2rem;
  }
  
  /* Grid Layouts */
  .intro-grid,
  .mission-vision-wrapper {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .intro-content {
    padding-right: 0;
    order: 2;
  }
  
  .intro-image {
    order: 1;
  }
  
  .equipment-carousel,
  .testimonials-carousel {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .features-grid,
  .values-grid,
  .services-grid,
  .portfolio-carousel,
  .benefits-grid,
  .project-grid,
  .contact-cards {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  /* Service Details */
  .service-detail-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .service-meta {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Process Section */
  .timeline-track {
    display: none;
  }
  
  .process-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .step-marker {
    margin-right: 0;
    margin-bottom: var(--spacing-md);
  }
  
  /* Forms */
  .form-container {
    padding: var(--spacing-lg);
  }
  
  /* Portfolio Detail Page */
  .portfolio-showcase {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .detail-card {
    height: auto;
  }
  
  .masonry-gallery {
    columns: 2 250px;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .meta-info {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Client Details Page v2 */
  .client-header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .client-logo {
    margin: 0 auto;
  }
  
  .portfolio-grid,
  .related-clients-slider {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/*---------------------------------------------
  Extra Large Screens (1200px and below)
---------------------------------------------*/
@media (max-width: 1200px) {
  /* Portfolio Detail Page */
  .masonry-gallery {
    columns: 3 200px;
  }
  
  /* Clients grid */
  .clients-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 items per row on medium screens */
  }
}

/*---------------------------------------------
  Desktop (1025px and up)
---------------------------------------------*/
@media (min-width: 993px) {
  /* Hide Mobile Elements */
  .mobile-cta {
    display: none;
  }
  
  .nav-toggle {
    display: none;
  }
  
  /* Desktop Dropdown */
  .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: var(--z-dropdown);
    min-width: 220px;
    padding: var(--spacing-md) 0;
    background-color: var(--white-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
  }
  
  .has-dropdown:hover .dropdown-menu {
    display: block;
  }
  
  .has-dropdown {
    position: relative;
  }
  
  .has-dropdown > a::after {
    content: '▼';
    font-size: 8px;
    margin-left: 5px;
    vertical-align: middle;
  }
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background-color: var(--white-color);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md) 0;
    width: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    max-width: 200px;
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.main-nav li a {
    display: block;
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--dark-color);
    font-weight: 500;
    transition: color var(--transition-fast);
    text-decoration: none;
}

.main-nav li a:hover,
.main-nav li a.active {
    color: var(--secondary-color);
}

.header-cta {
    margin-left: var(--spacing-md);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-sm);
}

/* Responsive styles */
@media (max-width: 992px) {
    .header-inner {
        position: relative;
        padding: 0.5rem 0;
        flex-wrap: wrap;
    }
    
    .logo {
        order: 1;
        flex: 0 0 50%;
    }
    
    .header-cta {
        order: 2;
        width: 100%;
        margin: var(--spacing-sm) 0;
        display: block;
    }
    
    .header-cta .btn {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    /* Position the hamburger in the top right corner absolutely */
    .nav-toggle {
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        order: 3;
        z-index: 1000; /* Ensure it's above other elements */
        cursor: pointer;
        pointer-events: auto; /* Explicitly ensure it's clickable */
    }
    
    .main-nav {
        flex-basis: 100%;
        order: 4;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-medium);
    }
    
    .main-nav.active {
        max-height: 500px;
    }
    
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        padding: var(--spacing-md) 0;
    }
    
    .main-nav li a {
        padding: var(--spacing-sm) 0;
    }
    
    /* Dropdown styles for mobile */
    .dropdown-menu {
        position: static;
        display: none;
        min-width: auto;
        box-shadow: none;
        border-left: 2px solid var(--primary-color);
        margin-left: 10px;
        padding-left: 10px;
    }
    
    .dropdown-menu.active {
        display: block;
    }
    
    .dropdown-toggle {
        position: absolute;
        top: 5px;
        right: 0;
        background: none;
        border: none;
        font-size: 0.8rem;
        color: var(--gray-color);
        cursor: pointer;
        padding: 5px 10px;
        z-index: 2;
    }
    
    .dropdown-toggle.active .dropdown-arrow {
        transform: rotate(180deg);
    }
}

@media (max-width: 576px) {
    .header-inner {
        justify-content: space-between;
    }
    
    .logo {
        max-width: 150px;
    }
    
    /* Ensure the hamburger remains visible on smaller screens */
    .nav-toggle {
        top: 10px;
        right: 10px;
    }
}

/* Social links styling with light background and secondary color */
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--secondary-color); /* Light background with secondary color influence */
    color: var(--secondary-color); /* Using secondary color for the icons */
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

/* Fix for clients page on mobile */
@media (max-width: 768px) {
  .client-card {
    margin-bottom: 1.5rem;
  }
  
  .client-page-logo {
    height: 150px;
    padding: 1rem;
  }
  
  .client-page-logo img {
    max-height: 120px;
  }
}