/* Responsive Design - Mobile First Approach */

/* Mobile Viewport Fix */
@media screen and (max-width: 768px) {
    html {
        --vh: 1svh;
    }
}

/* Large Desktop - 1400px and up */
@media (min-width: 1400px) {
    :root {
        --section-padding: 4rem;
        --container-padding: 2rem;
    }
    
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: var(--font-size-6xl);
    }
    
    .navbar-collapse .btn-cta {
        display: flex;
    }

    .section-title {
        font-size: var(--font-size-5xl);
    }
}

/* Desktop - 1200px to 1399px */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }

    .navbar-collapse .btn-cta {
        display: flex;
    }
}

/* Large Tablet - 992px to 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    :root {
        --section-padding: 4rem;
    }

    .container {
        max-width: 960px;
    }
    
    .navbar-collapse {

    }

    .navbar-collapse .btn-cta {
        display: none;
    }

    .service-card,
    .program-card,
    .reference-card {
        padding: var(--space-6);
    }
}

/* Tablet - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
    :root {
        --section-padding: 3rem;
        --navbar-height: 70px;
    }
    
    .logo-svg {
        height: 40px;
    }

    .navbar {
        padding-top: var(--space-3);
    }

    .container {
        max-width: 720px;
    }
    
    .hero-section {
        padding-top: calc(var(--navbar-height) + var(--space-6));
    }
    
    .navbar-collapse {
        background-color: white;
        margin-top: var(--space-4);
        padding: var(--space-4);
        box-shadow: var(--shadow-xl);
        border: 1px solid var(--gray-200);
    }
    
    .navbar-collapse .btn-cta {
        display: none;
    }

    .navbar-nav {
        /*
        margin-bottom: var(--space-4);
        padding-top: var(--space-3);
        */
    }
    
    .nav-link:hover, .nav-link:focus, .nav-link:active {
        outline: none;
    }

    .nav-link {
        padding: var(--space-2) var(--space-2) !important;
        margin: var(--space-0) 0;
        border-radius: var(--radius);
        outline: none;
    }
    
    .navbar-collapse .btn-cta {
        display: none;
    }
    
    .hero-features {
        margin-bottom: var(--space-8);
    }
    
    .trust-stats {
        margin: var(--space-6) 0;
    }
    
    .service-card,
    .program-card,
    .reference-card {
        padding: var(--space-6);
        margin-bottom: var(--space-6);
    }
    
    .fab-container {
        bottom: var(--space-6);
        right: var(--space-6);
    }
}

/* Mobile Large - 576px to 767px */
@media (min-width: 576px) and (max-width: 767px) {
    :root {
        --section-padding: 2.5rem;
        --navbar-height: 70px;
    }
    
    .logo-svg {
        height: 40px;
    }

    .navbar {
        padding-top: var(--space-3);
    }

    .navbar-collapse {
        background-color: white;
        margin-top: var(--space-4);
        padding: var(--space-4);
        box-shadow: var(--shadow-xl);
        border: 1px solid var(--gray-200);
    }

    .navbar-collapse .btn-cta {
        display: none;
    }

    .container {
        max-width: 540px;
    }
    
    .fullscreen-section {
        padding: var(--section-padding) 0;
    }
    
    .hero-section {
        padding: calc(var(--navbar-height) + var(--space-8)) 0 var(--space-8);
    }
    
    .hero-title {
        font-size: clamp(var(--font-size-3xl), 6vw, var(--font-size-6xl));
        margin-bottom: var(--space-4);
    }
    
    .hero-subtitle {
        font-size: clamp(var(--font-size-lg), 4vw, var(--font-size-xl));
        margin-bottom: var(--space-6);
    }
    
    .hero-feature {
        font-size: var(--font-size-base);
        margin-bottom: var(--space-2);
    }
    
    .section-header {
        margin-bottom: var(--space-8);
    }
    
    .section-title {
        font-size: clamp(var(--font-size-3xl), 8vw, var(--font-size-4xl));
        margin-bottom: var(--space-4);
    }
    
    .section-subtitle {
        font-size: var(--font-size-base);
    }
    
    .trust-stats {
        padding: var(--space-4);
        margin: var(--space-6) 0;
    }
    
    .stat-number {
        font-size: var(--font-size-2xl);
    }
    
    .stat-label {
        font-size: var(--font-size-xs);
    }
    
    .service-card,
    .program-card,
    .reference-card,
    .contact-item {
        padding: var(--space-6);
        margin-bottom: var(--space-6);
    }
    
    .service-icon,
    .program-icon {
        font-size: var(--font-size-4xl);
        margin-bottom: var(--space-4);
    }
    
    .quote-form {
        padding: var(--space-6);
    }
    
    .fab {
        width: 48px;
        height: 48px;
    }
    
    .fab-container {
        bottom: var(--space-4);
        right: var(--space-4);
    }
}

/* Mobile - Up to 575px */
@media (max-width: 575px) {
    :root {
        --section-padding: 2rem;
        --navbar-height: 70px;
        --container-padding: 1rem;
    }
    
    .logo-svg {
        height: 40px;
    }

    .navbar {
        padding-top: var(--space-3);
    }

    .navbar-collapse .btn-cta {
        display: none;
    }

    .navbar-collapse {
        background-color: white;
        margin-top: var(--space-4);
        padding: var(--space-4);
        box-shadow: var(--shadow-xl);
        border: 1px solid var(--gray-200);
    }

    .container {
        padding: 0 var(--container-padding);
    }
    
    .fullscreen-section {
        padding: var(--section-padding) 0;
        min-height: 100vh;
        min-height: calc(var(--vh, 1vh) * 100);
    }
    
    .hero-section {
        padding: calc(var(--navbar-height) + var(--space-6)) 0 var(--space-6);
        min-height: 100vh;
        min-height: calc(var(--vh, 1vh) * 100);
    }
    
    .hero-title {
        font-size: clamp(var(--font-size-3xl), 6vw, var(--font-size-6xl));
        margin-bottom: var(--space-3);
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: clamp(var(--font-size-base), 5vw, var(--font-size-lg));
        margin-bottom: var(--space-4);
    }
    
    .hero-feature {
        font-size: clamp(var(--font-size-sm), 4vw, var(--font-size-base));
        margin-bottom: var(--space-2);
        line-height: var(--line-height-normal);
    }
    
    .hero-features {
        margin-bottom: var(--space-6);
    }
    
    .trust-stats {
        padding: var(--space-4);
        margin: var(--space-4) 0;
    }
    
    .stat-item {
        padding: var(--space-2) 0;
    }
    
    .stat-number {
        font-size: clamp(var(--font-size-xl), 6vw, var(--font-size-2xl));
    }
    
    .stat-suffix {
        font-size: clamp(var(--font-size-lg), 5vw, var(--font-size-xl));
    }
    
    .stat-label {
        font-size: var(--font-size-xs);
        margin-top: var(--space-1);
    }
    
    .section-header {
        margin-bottom: var(--space-6);
    }
    
    .section-title {
        font-size: clamp(var(--font-size-2xl), 6vw, var(--font-size-3xl));
        margin-bottom: var(--space-3);
    }
    
    .section-subtitle {
        font-size: clamp(var(--font-size-sm), 4vw, var(--font-size-base));
        margin-bottom: var(--space-6);
    }
    
    .service-card,
    .program-card,
    .reference-card,
    .contact-item {
        padding: var(--space-5);
        margin-bottom: var(--space-4);
    }
    
    .service-icon,
    .program-icon {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--space-3);
    }
    
    .service-title,
    .program-title {
        font-size: var(--font-size-base);
        margin-bottom: var(--space-3);
    }
    
    .service-description,
    .program-description {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-4);
    }
    
    .quote-form {
        padding: var(--space-4);
    }
    
    .form-control,
    .form-select {
        padding: var(--space-3);
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .contact-icon {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--space-3);
    }
    
    .contact-item {
        padding: var(--space-4);
    }
    
    .fab {
        width: 44px;
        height: 44px;
        font-size: var(--font-size-lg);
    }
    
    .fab-container {
        bottom: var(--space-3);
        right: var(--space-3);
    }
    
    .footer {
        padding: var(--space-8) 0 var(--space-4);
        text-align: center;
    }
    
    .footer-brand,
    .footer-section {
        margin-bottom: var(--space-6);
        text-align: center;
    }
    
    .footer-logo {
        align-items: center;
    }
    
    .footer-contact li {
        justify-content: center;
        margin-bottom: var(--space-2);
    }
    
    /* Enhanced touch targets for mobile */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link:hover, .nav-link:focus, .nav-link:active {
        outline: none;
    }

    .nav-link {
        min-height: 44px;
        padding: var(--space-2) var(--space-2) !important;
        outline: none;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    .form-check-input {
        width: var(--space-5);
        height: var(--space-5);
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .fullscreen-section {
        min-height: auto;
        padding: var(--space-4) 0;
    }
    
    .hero-section {
        min-height: auto;
        padding: calc(var(--navbar-height) + var(--space-4)) 0 var(--space-4);
    }
    
    .trust-stats {
        margin: var(--space-3) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-4);
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .program-card:hover,
    .reference-card:hover,
    .contact-item:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .service-icon:hover,
    .contact-icon:hover {
        transform: none;
    }
    
    /* Enhanced tap targets */
    .btn,
    .nav-link,
    .fab {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Better form controls for touch */
    .form-control,
    .form-select {
        padding: var(--space-4);
        font-size: 16px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-placeholder,
    .service-icon,
    .program-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 0 0 2px var(--gray-900);
        --shadow-lg: 0 0 0 3px var(--gray-900);
        --shadow-xl: 0 0 0 4px var(--gray-900);
    }
    
    .service-card,
    .program-card,
    .reference-card,
    .contact-item {
        border: 2px solid var(--gray-900);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Data Mode */
@media (prefers-reduced-data: reduce) {
    .hero-section::before,
    .quote-section::before {
        display: none;
    }
    
    .animate-gradient {
        animation: none;
        background: var(--abel-red);
    }
}

/* Print Styles */
@media print {
    :root {
        --section-padding: 1rem;
    }
    
    .navbar,
    .fab-container,
    .scroll-progress,
    .scroll-indicator,
    .quote-section {
        display: none !important;
    }
    
    .fullscreen-section {
        min-height: auto;
        page-break-inside: avoid;
        padding: var(--space-4) 0;
    }
    
    .service-card,
    .program-card,
    .reference-card {
        break-inside: avoid;
        margin-bottom: var(--space-4);
        border: 1px solid var(--gray-300);
    }
    
    .hero-section {
        padding-top: var(--space-4);
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
        color: var(--gray-900) !important;
        background: none !important;
        -webkit-text-fill-color: unset !important;
    }
    
    a {
        color: var(--gray-900) !important;
        text-decoration: underline !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: var(--font-size-xs);
    }
}

/* Keyboard Navigation */
@media (prefers-reduced-motion: no-preference) {
    .focus-visible:focus {
        outline: 0px solid var(--abel-red);
        outline-offset: 0px;
        transition: outline-offset 0.2s ease;
    }
}

/* Container Queries (Future Enhancement) */
@supports (container-type: inline-size) {
    .service-card {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .service-icon {
            font-size: var(--font-size-2xl);
        }
        
        .service-title {
            font-size: var(--font-size-base);
        }
    }
}

/* Performance Optimizations for Mobile */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .animate-fade-up,
    .animate-slide-left,
    .animate-slide-right {
        transition-duration: 0.4s;
        transition-timing-function: ease-out;
    }
    
    /* Simplify gradients on mobile for better performance */
    .hero-section::before,
    .quote-section::before {
        opacity: 0.02;
    }
    
    /* Optimize images for mobile */
    img {
        image-rendering: auto;
    }
    
    /* Reduce backdrop blur on mobile for performance */
    .navbar {
        backdrop-filter: blur(8px);
        padding-top: var(--space-3);
    }
    
    .quote-form {
        backdrop-filter: blur(8px);
    }
}

/* Very Small Screens */
@media (max-width: 320px) {
    :root {
        --container-padding: 0.75rem;
    }
    
    .hero-title {
        font-size: var(--font-size-xl);
    }
    
    .service-card,
    .program-card,
    .reference-card {
        padding: var(--space-4);
    }
    
    .btn {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-xs);
    }
    
    .fab {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-base);
    }
}

































/* Tablet - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-feature {
        margin-bottom: var(--space-3);
    }
    
    .hero-feature-header {
        margin-bottom: var(--space-0);
        gap: var(--space-2);
    }
    
    .hero-feature-emoji {
        font-size: var(--font-size-lg);
    }
    
    .hero-feature-title {
        font-size: var(--font-size-base);
    }
    
    .hero-feature-description {
        font-size: var(--font-size-sm);
    }
}

/* Mobile Large - 576px to 767px */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-feature {
        margin-bottom: var(--space-3);
    }
    
    .hero-feature-header {
        margin-bottom: var(--space-0);
        gap: var(--space-2);
    }
    
    .hero-feature-emoji {
        font-size: var(--font-size-lg);
    }
    
    .hero-feature-title {
        font-size: var(--font-size-base);
        line-height: var(--line-height-normal);
    }
    
    .hero-feature-description {
        font-size: var(--font-size-sm);
        line-height: var(--line-height-normal);
    }
}

/* Mobile - Up to 575px - Popisky pod nadpisy */
@media (max-width: 575px) {
    .hero-feature {
        margin-bottom: var(--space-4);
    }
    
    .hero-feature-header {
        margin-bottom: var(--space-0);
        gap: var(--space-2);
        align-items: flex-start; /* Pro lepší zarovnání na mobilech */
    }
    
    .hero-feature-emoji {
        font-size: var(--font-size-base);
        margin-top: 2px; /* Jemné zarovnání s textem */
    }
    
    .hero-feature-title {
        font-size: var(--font-size-base);
        line-height: var(--line-height-tight);
        flex: 1; /* Zabere zbytek prostoru */
    }
    
    .hero-feature-description {
        font-size: var(--font-size-sm);
        line-height: var(--line-height-normal);
        margin-left: 0; /* Resetuje margin pro mobile */
        display: block;
        margin-top: var(--space-1);
    }
}

/* Very Small Screens - 320px and below */
@media (max-width: 320px) {
    .hero-feature {
        margin-bottom: var(--space-3);
    }
    
    .hero-feature-header {
        gap: var(--space-1);
    }
    
    .hero-feature-emoji {
        font-size: var(--font-size-sm);
    }
    
    .hero-feature-title {
        font-size: var(--font-size-sm);
    }
    
    .hero-feature-description {
        font-size: var(--font-size-xs);
        padding-left: calc(var(--font-size-sm) + var(--space-1));
    }
}

/* Landscape Mobile - Kompaktnější rozložení */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-features {
        margin-bottom: var(--space-6);
    }
    
    .hero-feature {
        margin-bottom: var(--space-2);
    }
    
    .hero-feature-header {
        margin-bottom: var(--space-0);
    }
    
    .hero-feature-description {
        margin-top: 0;
        line-height: var(--line-height-tight);
    }
}



/* Responsivní úpravy */
@media (max-width: 768px) {
    .why-choose-section .row {
        text-align: center;
    }
    
    .advantage-item {
        justify-content: center;
        text-align: center;
    }
    
    .stats-grid {
        margin-top: var(--space-4);
    }
    
    .service-cta {
        margin-top: var(--space-3);
    }
    
    .accordion-button {
        padding: var(--space-3);
        font-size: var(--font-size-base);
    }
    
    .accordion-body {
        padding: var(--space-3);
        font-size: var(--font-size-base);
    }
}