/* Responsive Styles */

/* Large Screens (1200px and below) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content h1 {
        font-size: 40px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Service page improvements */
    .service-features {
        grid-gap: 20px;
    }
}

/* Medium Screens (992px and below) */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .hero-section .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 50px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        margin-bottom: 30px;
        width: 100%;
    }
    
    .about-section-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .mission-vision-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .about-stats {
        justify-content: space-around;
    }
    
    .mission-content {
        flex-direction: column;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Screens (768px and below) */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    /* About section responsive styles */
    .about-section {
        padding: 60px 0;
    }
    
    .about-section-content {
        grid-template-columns: 1fr;
    }
    
    /* About columns responsive styles */
    .about-columns {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 5px;
    }
    
    .about-column-card {
        padding: 25px 20px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    }
    
    .about-column-card h4 {
        font-size: 18px;
        margin-bottom: 12px;
        line-height: 1.4;
    }
    
    .about-column-card p {
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* Mission & Vision responsive styles */
    .mission-vision-content {
        grid-template-columns: 1fr;
    }
    
    .mission-vision-card {
        padding: 5px;
        margin-bottom: 15px;
    }
    
    .about-card {
        padding: 20px;
    }
    
    .about-text h3 {
        font-size: 24px;
        text-align: center;
    }
    
    /* Overlay for mobile menu */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.1); /* Much lighter overlay */
        z-index: 1000;
        transition: opacity 0.3s ease;
        pointer-events: none; /* Ensure overlay doesn't block interactions */
    }
    
    .menu-overlay.active {
        display: block;
        pointer-events: auto; /* Allow clicks on overlay to close menu */
        z-index: 999; /* Ensure overlay is below the menu */
    }
    
    #navbar {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 80px 0 30px;
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        pointer-events: all;
        display: flex;
        flex-direction: column;
        -webkit-overflow-scrolling: touch; /* Improve scrolling on iOS */
    }
    
    #navbar.active {
        right: 0;
    }
    
    #navbar ul {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #navbar ul li {
        margin: 0;
        width: 100%;
    }
    
    #navbar ul li a {
        display: block;
        padding: 15px 30px;
        border-bottom: 1px solid var(--border-color);
        position: relative;
        z-index: 5;
        pointer-events: auto !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        cursor: pointer !important;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        width: 100%;
        max-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        transition: max-height 0.3s ease;
        z-index: 2;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 40vh; /* Limit height to 40% of viewport height */
        overflow-y: auto; /* Make scrollable */
    }
    
    .dropdown-menu a {
        display: block;
        padding: 12px 30px 12px 45px !important;
        color: var(--text-color) !important;
        font-size: 14px;
        z-index: 6;
        position: relative;
        pointer-events: auto;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(76, 175, 80, 0.2);
    }
    
    .mobile-menu-btn {
        display: block;
        z-index: 1002;
        cursor: pointer;
        width: 44px;
        height: 44px;
        text-align: center;
        line-height: 44px;
        background-color: rgba(255, 255, 255, 0.9);
        border-radius: 4px;
        -webkit-tap-highlight-color: rgba(76, 175, 80, 0.3);
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .mobile-menu-btn i {
        font-size: 24px;
        color: #333;
    }
    
    .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 24px;
        cursor: pointer;
        z-index: 1005;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: white;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content h2 {
        font-size: 20px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .hero-section {
        padding: 120px 0 80px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 15px;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    /* Service Pages Responsive Styles */
    .service-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-item {
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .feature-icon {
        margin-bottom: 15px;
    }
    
    .feature-text h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .service-section h2 {
        font-size: 24px;
        text-align: center;
    }
    
    .service-banner h1 {
        font-size: 28px;
        text-align: center;
    }
    
    .service-banner p {
        font-size: 16px;
    }
    
    .service-keyword-tags {
        gap: 8px;
    }
    
    .service-keyword-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .cta-section h2 {
        font-size: 24px;
    }
    
    .cta-section p {
        font-size: 16px;
    }
}

/* Extra Small Screens (576px and below) */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .floating-call,
    .floating-whatsapp {
        width: 50px;
        height: 50px;
    }
    
    .floating-call {
        left: 20px;
        bottom: 20px;
    }
    
    .floating-whatsapp {
        right: 20px;
        bottom: 20px;
    }
    
    /* Ensure back to top button is visible on mobile */
    .back-to-top {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
        z-index: 1000;
    }
    
    .back-to-top.active {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Service page specific improvements */
    .service-banner {
        padding: 60px 0 30px;
    }

    .service-banner p {
        font-size: 14px;
        padding: 0 10px;
    }

    .service-content {
        padding: 30px 0;
    }

    .service-section {
        margin-bottom: 30px;
    }

    .service-section p, 
    .service-section li,
    .about-column-card p {
        font-size: 15px;
        text-align: left;
    }
    
    .about-column-card strong {
        font-weight: 600;
    }

    .service-features {
        margin: 20px 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .feature-item {
        margin-bottom: 15px;
    }

    .faq-question h3 {
        font-size: 16px;
        padding-right: 30px;
        line-height: 1.4;
    }

    .faq-toggle {
        right: 10px;
    }

    .service-keyword-tags {
        flex-wrap: wrap;
        justify-content: center;
    }

    .service-card {
        padding: 15px;
        margin-bottom: 15px;
        width: 100%;
    }

    .cta-section {
        padding: 25px 15px;
        text-align: center;
    }

    .cta-section .btn {
        width: 100%;
        margin-top: 15px;
    }
}