/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .slide-content h1 {
        font-size: 2.8rem;
    }

    .slide-content p {
        font-size: 1.3rem;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .about-content,
    .infrastructure-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mission-vision {
        grid-template-columns: 1fr;
    }

    .infrastructure-features {
        grid-template-columns: 1fr;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        overflow-y: auto;
        /* scroll the whole panel when content is tall */
        -webkit-overflow-scrolling: touch;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transition: left 0.3s ease;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .dropdown-menu {
        display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0, 48, 73, 0.06);
        margin-top: 0;
        border-radius: 6px;
        padding: 0.25rem 0;
        width: 100%;
    }

    .dropdown-menu.open {
        display: block;
    }

    .dropdown-menu li a {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        display: block;
    }

    .submenu {
        display: none;
        padding-left: 1rem;
        background: rgba(0, 48, 73, 0.05);
        border-radius: 4px;
        max-height: 220px;
        /* cap height so it never fills the whole screen */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    .submenu.open {
        display: block;
    }

    /* Arrow indicator on dropdown/submenu parents */
    .dropdown-toggle::after,
    .dropdown-menu>li>a::after {
        content: ' ▸';
        font-size: 0.7rem;
        opacity: 0.6;
        transition: transform 0.2s;
        display: inline-block;
    }

    .dropdown-toggle.open::after,
    .dropdown-menu>li>a.open::after {
        transform: rotate(90deg);
    }



    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-slider {
        height: 100vh;
        min-height: 600px;
    }

    .slide-content h1 {
        font-size: 2.2rem;
    }

    .slide-content p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .why-choose-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .floating-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        right: 20px;
        bottom: 20px;
    }

    .floating-call {
        display: flex;
        position: static;
        width: 60px;
        height: 60px;
        padding: 0;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        animation: callPulse 2s infinite;
    }

    .floating-call span {
        display: none;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .nav-brand .logo {
        height: 40px;
    }

    .hero-slider {
        height: 100vh;
        min-height: 500px;
    }

    .slide-content {
        padding: 0 15px;
    }

    .slide-content h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    section {
        padding: 60px 0;
    }

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

    .section-subtitle {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-card {
        padding: 1.5rem;
    }

    .product-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .industry-item {
        padding: 1.5rem 1rem;
    }

    .industry-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .why-choose-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .why-item {
        padding: 1.5rem;
    }

    .why-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

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

    .mission,
    .vision {
        padding: 1rem;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .slider-controls {
        padding: 0 10px;
    }

    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .floating-call {
        padding: 10px 15px;
        font-size: 14px;
        border-radius: 20px;
    }

    .floating-whatsapp {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .testimonial-item {
        padding: 1.5rem;
    }

    .testimonial-item p {
        font-size: 1rem;
    }
}

/* Extra Small Mobile Phones */
@media (max-width: 320px) {
    .slide-content h1 {
        font-size: 1.5rem;
    }

    .slide-content p {
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .product-card,
    .industry-item,
    .why-item {
        padding: 1rem;
    }

    .contact-form {
        padding: 1rem;
    }

    .floating-call {
        /* flex-direction: column;
        align-items: center;
        padding: 8px 12px;
        border-radius: 15px;
        min-width: 120px; */
        display: flex;
        /* Added to ensure flex properties work */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        /* Centers content vertically */

        /* The Magic Sauce for Circles */
        width: 50px;
        /* Width and Height must match */
        height: 50px;
        border-radius: 50%;
        /* Makes it a perfect circle */

        padding: 0;
        /* Heavy padding can distort the circle */
    }
}

.floating-call span {
    font-size: 12px;
}


/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-slider {
        height: 150vh;
        min-height: 400px;
    }

    .slide-content {
        padding-top: 2rem;
    }

    .slide-content h1 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .nav-brand .logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-whatsapp {
        animation: none;
    }
}

/* Print Styles */
@media print {

    .header,
    .floating-buttons,
    .slider-controls,
    .slider-dots,
    .nav-toggle,
    .cta-buttons,
    .contact-form {
        display: none !important;
    }

    .hero-slider {
        height: auto;
        min-height: auto;
    }

    .slide {
        position: relative;
        opacity: 1;
    }

    .slide-overlay {
        display: none;
    }

    .slide-content {
        color: var(--black);
        text-align: left;
        padding: 2rem 0;
    }

    section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }

    .product-card,
    .industry-item,
    .why-item {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}