/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
  .container {
    padding: 0 15px;
  }

  .hero-content {
    gap: 40px;
  }

  .hero-title {
    font-size: 40px;
  }

  .framework-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .nav-menu {
    gap: 20px;
  }

  .mega-menu {
    min-width: 500px;
  }

  .about-content {
    gap: 40px;
  }

  .contact-content {
    gap: 40px;
  }

  .mv-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 932px) {
  /* Ensures all elements are measured consistently */
  * {
    box-sizing: border-box;
  }

  /* Prevents horizontal scrolling */
  html,
  body {
    overflow-x: hidden;
  }

  /* Resets any fixed left margins or padding on key containers */
  .container {
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Resets padding on footer sections */
  .footer-section {
    padding-left: 20px !important;
  }

  /* Removes padding from the Quick Links list */
  .footer-section .footer-links {
    padding-left: 0 !important;
  }
}

@media (max-width: 768px) {
    /* Style for the main product sections to stack content vertically */
    .product-section .product-content {
        flex-direction: column;
        align-items: center; /* Center the image and text content */
        text-align: center; /* Center the text for a better mobile experience */
    }

    /* Reset the 'reverse' order on mobile so all images are at the top */
    .product-section .product-content.reverse {
        flex-direction: column;
    }

    /* Style for the product image container */
    .product-image {
        margin-bottom: 20px; /* Add some space below the image */
        width: 100%; /* Ensure the image container takes the full width */
    }
    
    /* Ensure all images inside the product-image container are responsive */
    .product-image img {
        max-width: 100%; /* The image will not exceed the width of its container */
        height: auto;    /* Maintain the aspect ratio */
        display: block;  /* Remove any extra space below the image */
        width: 100% !important; /* Override any inline widths to ensure it fits */
    }

    /* Style for the product information container */
    .product-info {
        width: 100%; /* Make the text content take the full width */
        padding: 0 15px; /* Add horizontal padding for better readability */
    }

    /* Adjust the feature list for mobile view */
    .feature-list {
        text-align: left; /* Keep the bullet points left-aligned for readability */
        list-style-position: inside;
        padding-left: 0;
    }

    /* Center the product title on mobile */
    .product-info h3 {
        text-align: center;
    }

    /* Adjust the product buttons to be full-width and stacked */
    .product-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px; /* Add space between the buttons */
        margin-top: 20px;
    }
    
    .product-buttons .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Remove any unnecessary side margins that might be causing content to merge */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}
/* Tablets */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .company-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .framework-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .features-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  /* CORRECTED TIMELINE RULES */
  .timeline {
    flex-direction: column;
    max-width: 100%;
    padding: 0 20px;
  }

  .timeline::before {
    left: 20px;
    transform: none;
    top: 0;
    bottom: 0;
    height: 100%;
  }

  .timeline-item {
    flex-direction: row;
    padding-left: 60px;
    width: 100%;
    margin-bottom: 20px;
  }

  .timeline-item:nth-child(odd) {
    flex-direction: row;
  }

  .timeline-year {
    position: absolute;
    left: 0;
    width: 40px;
    height: 40px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .timeline-content {
    margin: 0;
  }

  .page-header h1 {
    font-size: 32px;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .cta-content h2 {
    font-size: 28px;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
  }

  .mega-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    min-width: auto;
  }

  .mega-menu-content {
    grid-template-columns: 1fr;
  }
}

/* Mobile Phones */
@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .top-bar {
    font-size: 12px;
  }

  .contact-info {
    flex-direction: column;
    gap: 10px;
  }

  .contact-info .contact-item:nth-child(2),
  .contact-info .contact-item:nth-child(3) {
    display: none;
  }

  .hero {
    padding: 40px 0;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .device-mockup {
    height: 300px;
  }

  .desktop-mockup {
    width: 250px;
    height: 160px;
  }

  .mobile-mockup {
    width: 80px;
    height: 140px;
  }

  .framework-grid {
    grid-template-columns: 1fr;
  }

  .features-container {
    grid-template-columns: 1fr;
  }

  .framework-card,
  .feature-card {
    padding: 20px;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .page-header {
    padding: 40px 0;
  }

  .about-us,
  .mission-vision,
  .leadership-team,
  .company-history,
  .contact-section {
    padding: 40px 0;
  }

  .about-text h2 {
    font-size: 24px;
  }

  .company-stats {
    grid-template-columns: 1fr;
  }

  .mv-grid {
    grid-template-columns: 1fr;
  }

  .mv-card {
    padding: 20px;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 20px;
  }

  .contact-form h3 {
    font-size: 20px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px;
    font-size: 14px;
  }

  .floating-demo-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 10px;
  }

  .floating-demo-btn i {
    font-size: 14px;
  }

  .cta-content h2 {
    font-size: 24px;
  }

  .timeline-year {
    width: 50px;
    height: 50px;
    font-size: 12px;
  }

  .timeline-item {
    padding-left: 80px;
  }

  .timeline-content {
    padding: 15px;
  }

  .timeline-content h4 {
    font-size: 16px;
  }

  .map-placeholder {
    height: 250px;
  }

  .map-placeholder i {
    font-size: 32px;
  }

  .logo-text h1 {
    font-size: 20px;
  }

  .logo-text p {
    font-size: 12px;
  }

  .logo-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
}

/* Very Small Screens */
@media (max-width: 360px) {
  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .section-header h2 {
    font-size: 20px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .framework-card,
  .feature-card {
    padding: 15px;
  }

  .framework-icon,
  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .mv-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .contact-form {
    padding: 15px;
  }

  .floating-demo-btn {
    width: 45px;
    height: 45px;
    font-size: 9px;
  }

  .floating-demo-btn i {
    font-size: 12px;
  }

  .detail-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* Print Styles */
@media print {
  .top-bar,
  .main-header,
  .floating-demo-btn,
  .mobile-menu,
  .hero-buttons,
  .cta-section {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .hero {
    padding: 20px 0;
  }

  .section-header h2 {
    font-size: 18pt;
  }

  .framework-card,
  .feature-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo-icon,
  .framework-icon,
  .feature-icon,
  .mv-icon {
    -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;
  }

  .fade-in,
  .slide-up {
    opacity: 1;
    transform: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  /* This can be implemented if dark mode is desired */
  /* For now, we'll keep the light theme consistent */
}

/* Focus Styles for Accessibility */
.nav-link:focus,
.cta-button:focus,
.btn:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .btn-primary {
    background: #000;
    color: #fff;
    border: 2px solid #fff;
  }

  .btn-secondary {
    background: #fff;
    color: #000;
    border: 2px solid #000;
  }

  .framework-card,
  .feature-card {
    border: 1px solid #000;
  }
}