/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 3rem;
    }

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

/* Medium Devices */
@media (max-width: 992px) {
    :root {
        font-size: 95%;
    }

    .hero {
        padding-top: 125px;
    }

    .tech-stack {
        gap: 1.5rem;
    }

    .tech-icon {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contact-info {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small Devices */
@media (max-width: 768px) {
    :root {
        font-size: 90%;
    }

    .navbar {
        padding: 1rem 5%;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem 0;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        margin: 0.5rem 0;
        font-size: 1.1rem;
    }

    .menu-btn {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .hero {
        padding: 125px 20px;
        /* Add more padding to the top for better visibility */
    }

    .hero-content h1 {
        font-size: 2.2rem;
        /* Adjust font size for smaller screens */
        margin-bottom: 15px;
        /* Add spacing below the heading */
    }

    .hero-content p {
        font-size: 1.1rem;
        /* Keep paragraph font size readable */
        margin-bottom: 20px;
        /* Add spacing below the paragraph */
    }

    .cta-buttons {
        flex-direction: column;
        /* Stack buttons vertically */
        gap: 1rem;
        /* Add spacing between buttons */
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        /* Center the buttons */
    }

    .services-grid,
    .features-grid {
        grid-template-columns: 1fr;
        /* Stack service and feature cards vertically */
        gap: 2rem;
        /* Add spacing between cards */
    }

    .service-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        /* Ensure responsive grid layout */
        gap: 1.5rem;
        /* Add spacing between portfolio items */
    }

    .portfolio-item {
        min-height: 250px;
        padding: 1.5rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
        /* Adjust font size for page headers */
        margin-bottom: 1rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
        /* Stack contact info vertically */
        gap: 2rem;
        /* Add spacing between contact cards */
    }

    .portfolio-overlay {
        transform: translateY(0);
        background: rgba(0, 0, 0, 0.8);
    }

    .portfolio-item:hover img {
        transform: none;
    }

    .about-story h2,
    .values-section h2 {
        font-size: 2rem;
        /* Adjust font size for section headings */
    }

    .about-story p {
        font-size: 1rem;
        /* Keep paragraph font size readable */
    }

    .value-item i {
        font-size: 2rem;
        /* Adjust icon size for value items */
    }

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

    .process-steps {
        grid-template-columns: 1fr;
    }

    .service-info i {
        font-size: 2.5rem;
    }

    .service-info h2 {
        font-size: 1.5rem;
    }

    .quote-btn {
        text-align: center;
        margin: 10px 0;
    }

    .quote-btn .btn.quote {
        display: inline-block;
    }
}

/* Extra Small Devices */
@media (max-width: 576px) {
    :root {
        font-size: 85%;
    }

    .hero {
        padding: 125px 20px;
        /* Adjust padding for extra small screens */
    }

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

    .tech-stack {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        /* Add spacing between tech icons */
    }

    .tech-icon {
        font-size: 1.8rem;
        /* Adjust icon size for smaller screens */
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        padding: 0 1rem;
    }

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

    .footer-section p {
        justify-content: center;
    }

    .portfolio-page,
    .contact-page {
        padding: 140px 3% 40px;
        /* Adjust padding for portfolio and contact pages */
    }

    .portfolio-item {
        min-height: 200px;
        /* Reduce minimum height for portfolio items */
    }

    .tech-tags span {
        font-size: 0.8rem;
        /* Adjust font size for tech tags */
    }

    .contact-form-container {
        padding: 1.5rem;
        /* Add padding to the contact form container */
    }

    .about-page {
        padding: 140px 3% 40px;
    }

    .values-grid {
        grid-template-columns: 1fr;
        /* Stack value items vertically */
    }

    .about-story {
        margin-bottom: 3rem;
        /* Add spacing below the about story section */
    }

    .services-page {
        padding: 140px 3% 40px;
        /* Adjust padding for the services page */
    }

    .process-section h2 {
        font-size: 2rem;
        /* Adjust font size for process section headings */
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 120px 5% 2rem;
        min-height: auto;
    }

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

    .tech-stack {
        margin-top: 2rem;
    }
}

/* High-resolution Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .services-grid,
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-bg: #0a0a0a;
        --light-text: #ffffff;
        --gray-text: #b3b3b3;
    }
}

/* Print Styles */
@media print {

    .background-animation,
    .nav-links,
    .menu-btn,
    .cta-buttons,
    .social-links {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero-content h1 {
        color: black;
        -webkit-text-fill-color: black;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {

    .btn:hover,
    .nav-links a:hover,
    .service-card:hover,
    .tech-icon:hover {
        transform: none;
    }
}

/* Mobile-only Styles */
@media screen and (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .desktop-menu {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .desktop-menu.active {
        display: block;
        background: #0c1111;
    }

    .desktop-menu a {
        display: block;
        padding: 0.5rem 0;
    }
}