/* Desktop Nav Scaling between 901px and 1200px */
@media (min-width: 901px) and (max-width: 1200px) {
    .nav-container {
        padding: 0 25px;
    }
    .nav-links {
        gap: 14px;
    }
    .nav-links li a {
        font-size: 0.76rem;
        letter-spacing: 0.5px;
    }
    .nav-cta {
        padding: 8px 16px;
        font-size: 0.78rem;
    }
}

/* Tablet and Mobile (Below 900px) */
@media (max-width: 900px) {

    html {
        scroll-padding-top: 75px;
    }

    .nav-container {
        padding: 0 20px;
    }

    #themeToggle {
        margin-left: auto;
        margin-right: 16px;
    }

    .desktop-nav, .nav-btn-wrapper {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }

.desktop-only { display: none; }
    .mobile-only { display: flex; }
    
    #process-section .container {
        height: auto; 
        display: flex;
        flex-direction: column;
    }


    .process-text-block {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;       
        text-align: center;
        margin-bottom: 50px; 
    }


    .mobile-timeline {
        display: flex;
        flex-direction: column;
        gap: 25px; 
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }


    .m-step {
        background: var(--m-step-bg);
        padding: 20px;
        border-radius: 12px;
        border-left: 5px solid var(--m-step-border); 
        display: flex;
        align-items: flex-start;
        gap: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        
        opacity: 0;
        animation: slideUpFade 0.6s ease-out forwards;
        animation-delay: var(--delay); 
    }

    /* The Big Number */
    .m-number {
        font-size: 2.5rem;
        font-weight: 900;
        color: var(--m-number-color);
        opacity: 0.85;
        line-height: 1;
        min-width: 60px;
    }

    /* The Text Content */
    .m-content h4 {
        font-size: 1.2rem;
        color: var(--text-heading);
        font-weight: 700;
        margin-bottom: 5px;
    }

    .m-content p {
        font-size: 0.95rem;
        color: var(--text-muted);
        line-height: 1.4;
        margin: 0;
    }
    
    /* Animation Keyframes */
    @keyframes slideUpFade {
        from {
            opacity: 0;
            transform: translateY(20px); /* Start slightly lower */
        }
        to {
            opacity: 1;
            transform: translateY(0); /* End in place */
        }
    }


    
    .values-grid {
        grid-template-columns: 1fr; 
        max-width: 450px;
        margin: 0 auto;
    }
    
    .value-card {
        padding: 30px;
        align-items: center; 
        text-align: center;
    }


    .services-grid {
        grid-template-columns: 1fr; 
        max-width: 450px; 
        margin: 0 auto;  
        gap: 40px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    /* Make cards slightly more compact on mobile */
    .service-panel {
        padding: 30px 20px;
    }

    .logos-wrapper {
        gap: 40px;
    }
    
    .partner-logo {
        max-height: 50px;
    }

    /* Standardize Section Spacing on Mobile */
    #process-section,
    #values-section,
    #about-highlight,
    #services-section,
    #partners-section,
    #features-info-section,
    #contact-section {
        padding: 60px 20px;
    }

    /* Prevent Contact Form Bleed into Section Above */
    #contact-section {
        min-height: auto;
        align-items: stretch;
    }

    #features-info-section .container {
        grid-template-columns: 1fr; /* Stack vertically */
        gap: 40px;
    }

    /* On mobile, center the text for better balance */
    .info-content-left {
        height: auto;
        text-align: center; 
    }

    .section-desc {
        text-align: center; 
    }


    .image-wrapper {
        max-width: 100%;
        margin-top: 20px;
    }

 
    .cert-card {
        padding: 20px;
    }


    #main-footer .container {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 80px; /* Make room for the button */
    }

    .contact-grid {
        flex-direction: column;
        gap: 20px;
    }

    /* Position the scroll button absolute on mobile so it sits bottom-right */
    .scroll-top-btn {
        position: absolute;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
   
    
    /* Header Font Size */
    .section-header-center h2 {
        font-size: 2rem;
    }

    .about-card {
        padding: 30px 20px; /* Less padding on mobile to save space */
        gap: 30px;
    }

    .about-label {
        font-size: 0.9rem;
    }

    .about-text-top p {
        font-size: 0.95rem;
    }

    .about-text-bottom p {
        font-size: 1rem; /* Scale down the big bold text slightly */
    }

    /*------------------ Partners Section Adjustments ------------------*/

    
    .logos-wrapper {
        gap: 30px; /* Smaller gap for mobile */
        justify-content: center;
    }

    .partner-logo {
        height: 35px; /* Smaller height for small screens */
        max-width: 140px; 
    }
    
    .partners-header h2 {
        font-size: 1.5rem;
    }
    
    .partners-header p {
        font-size: 0.95rem;
        padding: 0 10px; /* Prevents text hitting the edge */
    }
    
    /*------------------ Contact Form Adjustments ------------------*/
    .form-row-three {
        flex-direction: column; 
        gap: 30px; /* Add breathing room between Name, Phone, and Email */
    }

    /* Ensure the inputs take full width */
    .input-group {
        width: 100%; 
    }

    /* Reduce padding on the glass card for small screens */
    .glass-card {
        padding: 30px 20px;
    }

    .contact-header h2 {
        font-size: 1.8rem; 
    }

}

@media (max-width: 500px) {
    /* Compact Section Spacing on Small Screens */
    #process-section,
    #values-section,
    #about-highlight,
    #services-section,
    #partners-section,
    #features-info-section,
    #contact-section {
        padding: 50px 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .cert-card {
        flex-direction: column; /* Stack vertically on small phones */
        align-items: flex-start;
        gap: 15px;
    }
    
    .pdf-btn {
        width: 100%; /* Full width button on mobile */
        justify-content: center;
    }
}

