/* ========================================
   NIO ARIES - MOBILNÍ & TABLET ŠABLONA
   Profesionální responzivní design
   ======================================== */

/* ========================================
   CSS PROMĚNNÉ PRO MOBIL
   ======================================== */
:root {
    --mobile-header-height: 60px;
    --mobile-nav-width: 300px;
    --touch-target-min: 44px;
    --mobile-padding: 16px;
    --tablet-padding: 24px;
}

/* ========================================
   NAVIGACE IKONY (desktop skryté)
   ======================================== */
.nav-icon {
    display: none;
    font-size: 1.2rem;
    margin-right: 8px;
}

.nav-buttons-mobile {
    display: none;
}

/* ========================================
   MOBILNÍ NAVIGACE - Hamburger Menu
   ======================================== */

/* Hamburger tlačítko */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.nav-toggle span:nth-child(1) {
    transform: translateY(-7px);
}

.nav-toggle span:nth-child(3) {
    transform: translateY(7px);
}

/* Hamburger animace - otevřeno */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(0);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(0);
}

/* ========================================
   MOBILNÍ SLIDE-OUT MENU
   ======================================== */
@media (max-width: 992px) {
    .nav-toggle {
        display: flex;
    }
    
    /* Zobrazit ikony v mobilním menu */
    .nav-icon {
        display: inline;
    }
    
    /* Na tabletu ještě zobrazit tlačítka v hlavičce */
    .nav-buttons {
        display: flex;
        gap: 8px;
    }
    
    .nav-buttons .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .nav-buttons-mobile {
        display: none;
    }
    
    .nav-buttons-mobile .btn {
        width: 100%;
        justify-content: center;
        min-height: var(--touch-target-min);
        font-size: 1rem;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(var(--mobile-nav-width), 85vw);
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        background: linear-gradient(180deg, #0a0a0a 0%, #1a1a2e 100%);
        flex-direction: column;
        align-items: stretch;
        padding: calc(var(--mobile-header-height) + 20px) 0 30px;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1001;
        overflow-y: auto;
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    }
    
    .nav.nav-open {
        right: 0;
    }
    
    .nav-link {
        padding: 16px 24px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--gray-300);
        transition: all 0.3s ease;
    }
    
    .nav-link:hover,
    .nav-link:active {
        background: rgba(0, 212, 255, 0.1);
        color: var(--primary-color);
        padding-left: 32px;
    }
    
    /* Overlay při otevřeném menu */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        backdrop-filter: blur(4px);
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-overlay {
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }
    
    /* Header úpravy */
    .header-container {
        padding: 0 var(--mobile-padding);
    }
}

/* ========================================
   TABLET LAYOUT (769px - 992px)
   ======================================== */
@media (max-width: 992px) and (min-width: 769px) {
    .container {
        padding: 0 var(--tablet-padding);
        max-width: 100%;
    }
    
    /* Hero sekce */
    .hero {
        padding: 120px 0 80px;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1.1rem;
        max-width: 600px;
        margin: 0 auto 30px;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Gridy */
    .grid-2,
    .features-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Pricing karty */
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 20px;
    }
    
    /* Stats */
    .hero-stats {
        justify-content: center;
        gap: 30px;
        flex-wrap: wrap;
    }
}

/* ========================================
   MOBIL - VELKÝ (577px - 768px)
   ======================================== */
@media (max-width: 768px) and (min-width: 577px) {
    .container {
        padding: 0 var(--mobile-padding);
    }
    
    /* Hero */
    .hero {
        padding: 100px 0 60px;
        text-align: center;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.25;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Stats */
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .hero-stats .stat {
        min-width: 100px;
    }
    
    /* Sections */
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Gridy */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
        gap: 24px;
    }
    
    .pricing-card {
        padding: 30px 24px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    /* Visitor counter */
    .visitor-counter {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .counter-divider {
        display: none;
    }
}

/* ========================================
   MOBIL - STANDARDNÍ (do 576px)
   ======================================== */
@media (max-width: 576px) {
    :root {
        --mobile-padding: 12px;
    }
    
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 0 var(--mobile-padding);
    }
    
    /* Header */
    .header {
        height: var(--mobile-header-height);
    }
    
    .header-container {
        height: var(--mobile-header-height);
    }
    
    /* Na malých mobilech skrýt tlačítka v hlavičce - zobrazí se v menu */
    .nav-buttons {
        display: none !important;
    }
    
    .nav-buttons-mobile {
        display: flex;
        flex-direction: column;
        padding: 24px;
        gap: 12px;
        margin-top: auto;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-buttons-mobile .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        font-size: 1rem;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo-icon {
        font-size: 1.4rem;
    }
    
    /* Hero - optimalizováno pro mobil */
    .hero {
        padding: 80px 0 50px;
        text-align: center;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 1.6rem;
        line-height: 1.3;
        margin-bottom: 16px;
    }
    
    .hero p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 24px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    /* Hero stats */
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 30px;
        padding: 16px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 12px;
    }
    
    .hero-stats .stat {
        text-align: center;
        padding: 8px 4px;
    }
    
    .hero-stats .stat-value {
        font-size: 1.4rem;
        font-weight: 700;
    }
    
    .hero-stats .stat-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Sekce */
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 16px;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    /* Gridy - vše na 1 sloupec */
    .grid-2,
    .grid-3,
    .grid-4,
    .features-grid,
    .benefits-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Feature karty */
    .feature-card,
    .benefit-card {
        padding: 20px;
    }
    
    .feature-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
    
    /* Pricing karty */
    .pricing-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .pricing-card.featured {
        transform: none;
        padding: 28px 20px;
    }
    
    .pricing-name {
        font-size: 1.2rem;
    }
    
    .pricing-price {
        font-size: 2rem;
    }
    
    .pricing-features li {
        font-size: 0.9rem;
        padding: 8px 0;
    }
    
    /* Tlačítka */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        min-height: var(--touch-target-min);
    }
    
    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    .footer-brand {
        margin-bottom: 20px;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .footer-links h4 {
        margin-bottom: 8px;
        font-size: 1rem;
    }
    
    .footer-links a {
        padding: 8px 0;
        font-size: 0.95rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        padding-top: 20px;
        text-align: center;
    }
    
    /* Visitor counter - kompaktní */
    .visitor-counter {
        display: flex;
        justify-content: center;
        gap: 8px;
        width: 100%;
        margin: 16px 0;
    }
    
    .counter-item {
        flex: 1;
        max-width: 100px;
        padding: 10px 8px;
        min-width: auto;
    }
    
    .counter-icon {
        font-size: 1rem;
    }
    
    .counter-value {
        font-size: 1.1rem;
    }
    
    .counter-label {
        font-size: 0.65rem;
    }
    
    .counter-divider {
        display: none;
    }
}

/* ========================================
   MOBIL - MALÝ (do 375px)
   ======================================== */
@media (max-width: 375px) {
    :root {
        --mobile-padding: 10px;
    }
    
    .hero h1 {
        font-size: 1.4rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .pricing-price {
        font-size: 1.8rem;
    }
    
    .pricing-card {
        padding: 20px 16px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    /* Counter ještě kompaktnější */
    .counter-item {
        padding: 8px 6px;
    }
    
    .counter-value {
        font-size: 1rem;
    }
    
    .counter-label {
        font-size: 0.6rem;
    }
}

/* ========================================
   TOUCH OPTIMALIZACE
   ======================================== */
@media (pointer: coarse) {
    /* Větší touch targets */
    .btn,
    .nav-link,
    a {
        min-height: var(--touch-target-min);
    }
    
    /* Odstranění hover efektů na touch zařízeních */
    .btn:hover,
    .nav-link:hover,
    .card:hover,
    .feature-card:hover {
        transform: none;
    }
    
    /* Active stavy místo hover */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .nav-link:active {
        background: rgba(0, 212, 255, 0.2);
    }
    
    /* Lepší scrollování */
    .nav {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* ========================================
   LANDSCAPE MODY - MOBIL
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 40px;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .nav {
        padding-top: 60px;
    }
    
    .nav-link {
        padding: 12px 24px;
    }
}

/* ========================================
   SAFE AREA - NOTCH SUPPORT (iPhone X+)
   ======================================== */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(var(--mobile-padding), env(safe-area-inset-left));
        padding-right: max(var(--mobile-padding), env(safe-area-inset-right));
    }
    
    .nav {
        padding-bottom: max(30px, env(safe-area-inset-bottom));
    }
    
    .footer {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .cookie-consent {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* ========================================
   DARK MODE PREFERENCE (systémová)
   ======================================== */
@media (prefers-color-scheme: dark) {
    /* Aplikace již používá tmavé téma, 
       tyto styly jsou pro případné světlé sekce */
    .card-light,
    .section-light {
        background: var(--gray-900);
        color: var(--white);
    }
}

/* ========================================
   REDUCED MOTION - Přístupnost
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .nav {
        transition: none;
    }
    
    .nav-toggle span {
        transition: none;
    }
}

/* ========================================
   HIGH CONTRAST MODE
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #00e5ff;
        --gray-300: #ffffff;
        --gray-400: #e0e0e0;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .card,
    .pricing-card,
    .feature-card {
        border: 2px solid var(--gray-300);
    }
}

/* ========================================
   PRINT STYLES - Mobil/Tablet
   ======================================== */
@media print {
    .nav,
    .nav-toggle,
    .nav-overlay,
    .visitor-counter,
    .cookie-consent,
    .footer-links {
        display: none !important;
    }
    
    .hero {
        padding: 20px 0;
        min-height: auto;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}
