/* Responsive Design */

/* Mobile First Approach */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tech-card {
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .floating-card {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .card-icon {
        font-size: 1.5rem;
    }
    
    .card-text {
        font-size: 0.8rem;
    }
    
    .hero-image-container {
        width: 300px;
        height: 300px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        z-index: var(--z-dropdown);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .nav-menu li:last-child {
        border-bottom: 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, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: var(--spacing-2xl) 0;
        text-align: center;
    }
    
    .hero-visual {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        margin-top: var(--spacing-2xl);
        flex-direction: row;
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    /* Features Section */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .tech-stack {
        grid-template-columns: 1fr;
    }
    
    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Button adjustments */
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Form adjustments */
    .form {
        padding: var(--spacing-lg);
    }
    
    /* Policy page adjustments */
    .page-title {
        font-size: var(--font-size-3xl);
    }
    
    .page-subtitle {
        font-size: var(--font-size-base);
    }
    
    .policy-wrapper {
        margin: 0 var(--spacing-md);
    }
    
    .policy-section {
        padding: var(--spacing-lg);
    }
    
    .policy-section h2 {
        font-size: var(--font-size-xl);
    }
    
    .policy-section h3 {
        font-size: var(--font-size-lg);
    }
    
    .breadcrumb-list {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .breadcrumb-list li:not(:last-child)::after {
        display: none;
    }
    
    /* Utility classes for mobile */
    .d-sm-none {
        display: none;
    }
    
    .d-sm-block {
        display: block;
    }
    
    .d-sm-flex {
        display: flex;
    }
    
    .text-sm-center {
        text-align: center;
    }
    
    .mt-sm-0 { margin-top: 0; }
    .mt-sm-1 { margin-top: var(--spacing-xs); }
    .mt-sm-2 { margin-top: var(--spacing-sm); }
    .mt-sm-3 { margin-top: var(--spacing-md); }
    .mt-sm-4 { margin-top: var(--spacing-lg); }
    .mt-sm-5 { margin-top: var(--spacing-xl); }
    
    .mb-sm-0 { margin-bottom: 0; }
    .mb-sm-1 { margin-bottom: var(--spacing-xs); }
    .mb-sm-2 { margin-bottom: var(--spacing-sm); }
    .mb-sm-3 { margin-bottom: var(--spacing-md); }
    .mb-sm-4 { margin-bottom: var(--spacing-lg); }
    .mb-sm-5 { margin-bottom: var(--spacing-xl); }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .about-content {
        gap: 2.5rem;
    }
    
    .hero-image-container {
        width: 350px;
        height: 350px;
    }
    
    .hero-visual {
        flex-direction: row;
        gap: var(--spacing-md);
    }
    
    .floating-card {
        padding: var(--spacing-md);
    }
    
    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding: 0 2rem;
    }
    
    .nav-container {
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.25rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 2rem;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
    
    .hero-image-container {
        width: 380px;
        height: 380px;
    }
    
    /* Hide hamburger on tablet and up */
    .hamburger {
        display: none;
    }
    
    .nav-menu {
        display: flex !important;
        position: static;
        width: auto;
        background: none;
        box-shadow: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        flex-direction: row;
        padding: 0;
    }
    
    .nav-menu li {
        width: auto;
        text-align: left;
        padding: 0;
        border-bottom: none;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-title {
        font-size: 3.25rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-visual {
        right: 15%;
    }
    
    .floating-card {
        padding: var(--spacing-xl);
    }
    
    .card-icon {
        font-size: var(--font-size-4xl);
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-visual {
        display: none;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: var(--spacing-xl);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero::before {
        background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="grain-hd" width="200" height="200" patternUnits="userSpaceOnUse"><circle cx="100" cy="100" r="2" fill="white" opacity="0.1"/></pattern></defs><rect width="200" height="200" fill="url(%23grain-hd)"/></svg>');
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-visual,
    .hero-buttons,
    .social-links,
    .hamburger {
        display: none !important;
    }
    
    .hero {
        background: white !important;
        color: black !important;
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-title,
    .hero-description {
        color: black !important;
    }
    
    .highlight {
        background: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
        color: var(--primary-color) !important;
    }
    
    .feature-card,
    .contact-item,
    .form {
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
    }
    
    .btn {
        border: 1px solid var(--text-color) !important;
        background: white !important;
        color: var(--text-color) !important;
    }
    
    .footer {
        background: white !important;
        color: var(--text-color) !important;
    }
    
    .footer-links a {
        color: var(--text-color) !important;
    }
    
    /* Ensure good contrast for printing */
    * {
        color: black !important;
        background: white !important;
    }
    
    /* Page breaks */
    .section {
        page-break-inside: avoid;
    }
    
    .hero {
        page-break-after: always;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    
    .hero-visual {
        animation: none;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-on-scroll.animate {
        opacity: 1;
        transform: none;
    }
}

/* High contrast mode - removed to fix visibility issues */
/* Dark mode support - removed to fix visibility issues */

/* Focus styles for better accessibility */
@media (any-hover: hover) {
    .btn:hover {
        transform: translateY(-2px);
    }
    
    .feature-card:hover {
        transform: translateY(-8px);
    }
    
    .tech-item:hover {
        transform: translateY(-4px);
    }
}

@media (any-hover: none) {
    .btn:active {
        transform: translateY(0);
    }
    
    .feature-card:active {
        transform: translateY(-4px);
    }
    
    .tech-item:active {
        transform: translateY(-2px);
    }
}

/* Container queries support (future) */
@supports (container-type: inline-size) {
    .container-query {
        container-type: inline-size;
    }
    
    @container (min-width: 400px) {
        .container-query .hero-buttons {
            flex-direction: row;
        }
    }
    
    @container (max-width: 399px) {
        .container-query .hero-buttons {
            flex-direction: column;
        }
    }
}

/* Grid support */
@supports (display: grid) {
    .features-grid {
        display: grid;
    }
}

@supports not (display: grid) {
    .features-grid {
        display: flex;
        flex-wrap: wrap;
    }
    
    .feature-card {
        flex: 1 1 300px;
        margin: var(--spacing-md);
    }
}

/* Flexbox support */
@supports (display: flex) {
    .hero-buttons {
        display: flex;
    }
}

@supports not (display: flex) {
    .hero-buttons {
        display: block;
    }
    
    .hero-buttons .btn {
        display: block;
        margin-bottom: var(--spacing-md);
    }
} 