/* ========== RESPONSIVE DESIGN ========== */

/* Tablets (768px and up) */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: linear-gradient(135deg, #1E88E5 0%, #42A5F5 100%) !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
        z-index: 999 !important;
        display: none !important;
    }

    .nav-menu.active {
        display: flex !important;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 18px 20px;
        font-size: 16px;
        width: 100%;
        transition: background-color 0.2s ease;
    }

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.15);
    }

    .nav-link.active::after {
        display: none;
    }

    .cta-btn {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    .excellence-content {
        grid-template-columns: 1fr;
    }

    .excellence-stats {
        grid-template-columns: 1fr;
    }

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

    .mission-text {
        grid-column: 1;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: 100%;
        margin-left: 30px;
        margin-right: 0;
    }

    .timeline-date {
        left: 0;
        transform: none;
        top: -35px;
    }

    footer .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .contact-form {
        max-width: 100%;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}

/* Mobile (480px and down) */
@media (max-width: 480px) {
    .nav-container {
        height: 60px;
    }

    .nav-menu {
        top: 60px;
    }

    .nav-logo span {
        font-size: 16px;
    }
    
    .nav-logo svg {
        width: 28px;
        height: 28px;
    }

    .hero {
        padding: 60px 15px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 16px;
    }

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

    .btn-large {
        padding: 12px 24px;
        font-size: 14px;
    }

    section {
        padding: 40px 15px;
    }

    .products-grid,
    .products-grid-main,
    .advantage-grid,
    .infrastructure-grid,
    .contact-grid,
    .why-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-category-card,
    .product-category-card-large {
        padding: 20px;
    }

    .excellence-stats {
        gap: 15px;
    }

    .stat {
        padding: 20px;
    }

    .stat h3 {
        font-size: 28px;
    }

    .advantage-card {
        padding: 20px;
    }

    .mission-highlights {
        gap: 15px;
    }

    .highlight {
        padding: 15px;
    }

    .contact-grid {
        gap: 20px;
    }

    .contact-form-section {
        padding: 40px 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 13px;
    }

    .hero-badge {
        font-size: 11px;
        padding: 6px 12px;
    }

    .excellence-text {
        font-size: 14px;
    }

    .breadcrumb {
        padding: 15px;
        font-size: 12px;
    }

    .footer-content {
        gap: 30px;
    }

    .footer-column h4 {
        font-size: 15px;
    }

    .footer-column p,
    .footer-column a {
        font-size: 13px;
    }

    .footer-bottom {
        font-size: 11px;
    }

    .category-hero,
    .page-hero {
        padding: 40px 15px;
    }

    .page-hero h1 {
        font-size: 28px;
    }

    .page-hero p {
        font-size: 14px;
    }

    .cta-section {
        padding: 40px 15px;
    }

    .cta-section h2 {
        font-size: 24px;
        color: var(--white);
    }

    .cta-section p {
        font-size: 14px;
    }

    .infrastructure-detail-section {
        padding: 40px 15px;
    }

    .infrastructure-text {
        font-size: 14px;
    }

    .timeline-item {
        margin-bottom: 40px;
    }

    .timeline-date {
        font-size: 12px;
        padding: 5px 10px;
    }

    .timeline-content {
        padding: 15px;
    }

    .timeline-content h3 {
        font-size: 15px;
    }

    .timeline-content p {
        font-size: 13px;
    }
}

/* Extra small devices (360px and below) */
@media (max-width: 360px) {
    .hero-text h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .btn {
        padding: 9px 16px;
        font-size: 12px;
    }

    .section-subtitle {
        font-size: 13px;
    }

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

    section {
        padding: 30px 10px;
    }

    .product-category-card,
    .product-category-card-large {
        padding: 15px;
    }

    .contact-card {
        padding: 20px;
    }

    .contact-card h3 {
        font-size: 16px;
    }

    .contact-card p {
        font-size: 13px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 40px 20px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    section {
        padding: 40px 20px;
    }

    h2 {
        font-size: 28px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .cta-section,
    .hamburger,
    .btn {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    a {
        text-decoration: none;
    }

    section {
        page-break-inside: avoid;
        padding: 20px 0;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .product-category-card,
    .product-category-card-large {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn {
        padding: 14px 28px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
