/* Responsive Footer Adjustments */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column; /* Stack columns */
        align-items: center; /* Center items */
        text-align: center;
    }
    .footer-contact-locations {
        margin-bottom: 15px; /* Space below contact/locations */
    }
    .footer-social {
        margin-left: 0; /* Remove left margin when stacked */
        margin-bottom: 15px; /* Space below social icons */
    }
    .social-link {
        margin: 0 10px; /* Adjust spacing for centered icons */
    }
    .legal-links {
        /* Links might wrap naturally, adjust if needed */
    }
    .legal-links .footer-link-divider {
        margin: 0 3px; /* Slightly reduce divider margin */
    }
}

/* Responsive Adjustments for Navbar Phone and WhatsApp */
@media (max-width: 992px) {
    .nav-container {
        /* Adjust layout for mobile */
        justify-content: space-between; /* Keep space-between */
    }
    .logo {
        order: 1; /* Logo first */
    }
    .mobile-whatsapp-button {
        display: inline-flex; /* Show the button */
        order: 2; /* WhatsApp button second */
        padding: 6px 10px; /* Smaller padding */
        font-size: 0.85rem;
    }
    .hamburger {
        order: 4; /* Hamburger last */
    }
    .navbar-phone {
        display: none; /* Ensure phone number is hidden */
        order: 5; /* Keep order consistent */
    }
    .whatsapp-button-item {
         /* This rule applied to the button when it was inside the nav-list */
         /* This rule applied to the button when it was inside the nav-list */
         /* Keep it for now in case it's used elsewhere, or remove if confirmed unused */
         /* HIDE the original button item on mobile */
        display: none;
    }
    .nav-list {
        /* Ensure nav list takes full width if needed */
        width: 100%;
    }
     .nav-menu.active .nav-list {
        /* Styles when mobile menu is active */
    }
}

@media (max-width: 768px) {
     .whatsapp-button-item {
         /* Further adjustments if needed */
    }
}

/* Ensure mobile menu background is dark */
@media (max-width: 992px) {
    body.dark-mode .nav-menu {
        background-color: #2a2a2a;
        border-top-color: var(--border-color);
    }
    body.dark-mode .nav-item {
        border-bottom-color: var(--border-color);
    }
    body.dark-mode .dropdown-menu {
        background-color: #333; /* Darker dropdown background */
    }
    body.dark-mode .nav-actions {
        border-top-color: var(--border-color);
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-menu {
        display: none; /* Hide main menu */
        position: absolute;
        top: 70px; /* Below navbar */
        left: 0;
        width: 100%;
        background-color: var(--light-text-color);
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--shadow);
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex; /* Show when hamburger is clicked */
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        margin-left: 0;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 15px 20px;
    }
    .nav-link::after {
        display: none; /* No underline effect on mobile */
    }

    .dropdown-menu {
        position: static; /* No absolute positioning */
        display: none; /* Hidden by default */
        box-shadow: none;
        border: none;
        padding-left: 20px; /* Indent sub-items */
        background-color: var(--light-gray); /* Slightly different background */
    }

    .nav-item.has-dropdown.open > .dropdown-menu {
        display: block; /* Show when parent is clicked/tapped */
    }

    .dropdown-menu li a {
        padding: 10px 20px;
    }

    .nav-actions {
        padding: 15px 20px;
        margin-left: 0;
        border-top: 1px solid var(--border-color);
        flex-direction: column; /* Stack CTA and search */
        align-items: stretch;
    }
    .nav-cta {
        margin: 0 0 10px 0; /* Stacked */
        text-align: center;
    }
    .search-toggle {
        align-self: flex-end; /* Keep search icon to the right */
        position: absolute; /* Position relative to nav container */
        top: 20px;
        right: 70px; /* Adjust position */
    }

    .hamburger {
        display: block; /* Show hamburger */
    }

    /* .hero-text styles removed as .hero-section is removed */

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Removed case-studies-grid responsive */

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Awards Grid Responsive Removed */

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-links {
        margin-bottom: 15px;
    }
    .footer-social {
        margin-left: 0; /* Reset margin */
    }
     /* Responsive adjustments for Video Slider on smaller screens */
     .video-slider-section {
        padding: 20px 0; /* Remove horizontal padding */
        margin-top: 60px; /* Adjust margin */
        overflow: hidden; /* Ensure parent clips content */
    }
    .video-slide {
        width: 85vw; /* Set width slightly less than full viewport */
        height: calc(85vw * 16 / 9); /* Maintain aspect ratio */
        margin: 0; /* Remove horizontal margins, JS will handle centering */
        box-sizing: border-box;
    }
     .background-text {
        font-size: 25vw; /* Adjust background text size */
    }
    .prev-btn {
        left: 15px;
    }
    .next-btn {
        right: 15px;
    }
}

/* Responsive adjustments for About Us page */
@media (max-width: 992px) {
    .about-content-container {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 40px;
        text-align: center;
    }
    .about-content-container.reverse-layout {
        grid-template-areas: unset; /* Reset grid areas */
    }
    .about-content-container.reverse-layout .about-image-content {
       order: -1; /* Move image above text in reverse layout on mobile */
    }
     .about-text-content {
        order: 1; /* Ensure text is below image */
    }
    .about-text-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
     .about-hero-section {
        padding: 60px 0;
    }
    .about-hero-section h1 {
        font-size: 2.5rem;
    }
     .about-hero-section .subtitle {
        font-size: 1.1rem;
    }
    .about-content-section {
        padding: 60px 0;
    }
     /* Responsive adjustments for Video Slider on smaller screens */
     .video-slider-section {
        padding: 20px 0; /* Remove horizontal padding */
        margin-top: 60px; /* Adjust margin */
        overflow: hidden; /* Ensure parent clips content */
        display: flex; /* Ensure flex properties apply */
        /* justify-content: center; */ /* Let JS handle centering */
        align-items: center; /* Align items vertically */
    }
    .video-slide {
        /* flex-basis: 90vw; */ /* Removed */
        flex-shrink: 0; /* Prevent shrinking */
        width: 85vw; /* Explicitly set width */
        aspect-ratio: 9 / 16; /* Maintain aspect ratio */
        margin: 0 10px; /* Keep small horizontal margin for spacing */
        box-sizing: border-box;
        /* Ensure visibility */
        opacity: 1;
        transform: scale(1);
    }
     .background-text {
        font-size: 30vw; /* Adjust background text size */
    }
     .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        padding: 8px;
    }
     .prev-btn {
        left: 10px;
    }
     .next-btn {
        right: 10px;
    }
}

/* Responsive adjustments for Contact Page */
@media (max-width: 992px) {
    .contact-content-grid {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
    .contact-details-container {
        margin-top: 40px; /* Add space when stacked */
    }
}

@media (max-width: 768px) {
    .page-header-section h1 {
        font-size: 2.5rem;
    }
     .page-header-section .subtitle {
        font-size: 1.1rem;
    }
}

/* Initial transform for mobile to prevent jump, will be overridden by JS */
@media (max-width: 768px) {
    .video-slider-container {
        transform: translateX(0px);
    }
}

/* Responsive Adjustments for Partners Grid */
@media (max-width: 992px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Adjust size */
        gap: 20px;
    }
    .partner-item {
        height: 100px; /* Adjust height */
    }
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Adjust size */
        gap: 15px;
    }
     .partner-item {
        height: 90px; /* Adjust height */
    }
}

@media (max-width: 576px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Adjust size */
        gap: 15px;
    }
     .partner-item {
        height: 80px; /* Adjust height */
        padding: 15px;
    }
}

/* --- Comprehensive Responsive Styles --- */

/* Tablet Styles (e.g., <= 992px) - Already partially covered, enhance */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }

    .container {
        padding: 0 15px; /* Reduce padding slightly */
    }

    section {
        padding: 50px 0; /* Reduce section padding */
    }

    .nav-container {
        height: 65px; /* Slightly smaller navbar */
    }
    body {
        padding-top: 65px; /* Adjust body padding */
    }

    .logo {
        height: 40px; /* Smaller logo */
    }
    .logo-text {
        font-size: 1.3rem;
    }

    .search-toggle {
        right: 65px; /* Adjust position relative to hamburger */
    }

    .cta-content h3 {
        font-size: 2.2rem;
    }

    .about-content-container {
        gap: 30px; /* Reduce gap */
    }

    .contact-content-grid {
        gap: 30px; /* Reduce gap */
    }

    .video-slider-section {
        padding: 30px 40px; /* Adjust padding */
        margin-top: 65px; /* Adjust margin */
    }

    /* Removed partner-card height adjustment */
    /* Removed partner-logo max-height adjustment */
}

    /* Mobile Styles (e.g., <= 768px) - Already partially covered, enhance */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }

    .nav-container {
        height: 60px; /* Even smaller navbar */
    }
    body {
        padding-top: 60px; /* Adjust body padding */
    }

    .logo {
        height: 35px; /* Smaller logo */
        display: flex; /* Use flexbox */
        align-items: center; /* Vertically align items */
        gap: 8px; /* Add space between image and text */
    }
    .logo-image { /* Ensure image doesn't take extra space */
        flex-shrink: 0;
        height: 100%; /* Make image fill the height */
        width: auto;
    }
    .logo-text {
        font-size: 1.2rem;
        display: inline; /* Ensure text is displayed */
        white-space: nowrap; /* Prevent text wrapping */
    }

    .search-toggle {
        right: 60px; /* Adjust position */
        top: 18px;
    }

    .services-grid,
    .projects-grid,
    .equipment-grid,
    .brands-grid,
    .features-grid {
        grid-template-columns: 1fr; /* Stack grid items */
        gap: 25px;
    }

    .cta-content h3 {
        font-size: 1.8rem;
    }
    .cta-main-button {
        padding: 10px 30px;
        font-size: 1rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }
    .legal-links a,
    .legal-links span {
        margin: 0 2px; /* Reduce space in legal links */
    }

    .modal-content {
        padding: 20px;
        max-width: 95%;
    }
    .modal-close {
        top: 5px;
        right: 10px;
        font-size: 1.8rem;
    }

    .contact-content-grid {
        grid-template-columns: 1fr; /* Already stacked, confirm */
    }
    .contact-details-container {
        margin-top: 30px;
    }
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea {
        padding: 10px;
    }
    .form-submit-button {
        padding: 10px 25px;
        font-size: 1rem;
    }

    .video-slider-section {
        padding: 20px 0; /* Remove horizontal padding */
        margin-top: 60px; /* Adjust margin */
        overflow: hidden; /* Ensure parent clips content */
    }
     .background-text {
        font-size: 20vw; /* Smaller background text */
    }
     .slider-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
     .prev-btn { left: 5px; }
     .next-btn { right: 5px; }

    /* Removed partner-card height adjustment */
    /* Removed partner-logo max-height adjustment */

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-content p {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .cookie-accept-button {
        margin-top: 0;
    }
}

/* Small Mobile Styles (e.g., <= 576px) */
@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1rem; }

    .container {
        padding: 0 10px; /* Further reduce padding */
    }

    section {
        padding: 40px 0; /* Further reduce section padding */
    }

    .nav-container {
        height: 55px; /* Minimum navbar height */
    }
    body {
        padding-top: 55px; /* Adjust body padding */
    }

    .logo {
        height: 30px; /* Smallest logo */
        /* Flex properties inherited from 768px breakpoint */
    }
    .logo-text {
        /* Remove display: none; to show text */
        /* Styles inherited from 768px breakpoint */
        font-size: 1.1rem; /* Slightly smaller for very small screens */
    }
    .mobile-whatsapp-button .whatsapp-text-mobile {
        display: none; /* Hide text on very small screens */
    }
    .navbar-phone {
        font-size: 0.85rem; /* Smaller phone number */
        margin-left: 8px;
    }

    .search-toggle {
        right: 55px;
        top: 16px;
        font-size: 1.1rem;
    }
    .hamburger {
        font-size: 1.3rem;
    }

    .nav-link {
        padding: 12px 15px; /* Adjust mobile nav padding */
    }
    .whatsapp-button-item {
        margin: 8px 15px;
    }
    .whatsapp-button {
        padding: 6px 12px;
        font-size: 0.8rem;
        gap: 5px;
    }
    .whatsapp-button i {
        font-size: 1rem;
    }
    .nav-actions {
        padding: 12px 15px;
    }

    .service-card,
    .project-card,
    .equipment-item,
    .brand-card,
    .feature-item { /* Removed partner-card */
        padding: 20px; /* Reduce card padding */
    }

    .cta-content h3 {
        font-size: 1.6rem;
    }
    .cta-content .cta-lead {
        font-size: 1rem;
    }

    .footer-social .social-link {
        font-size: 1.2rem;
        margin: 0 8px;
    }

    /* .video-slide rules from 768px breakpoint should cascade */
    /* No need to repeat width/margin unless specific overrides needed */
    /*
    .video-slide {
        width: 85vw;
        height: calc(85vw * 16 / 9);
        margin: 0 5px;
    }
    */

    /* Removed partner-card height adjustment */
    /* Removed partner-logo max-height adjustment */

    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 15px;
        right: 15px;
    }
}
