/* ============================================
   AURORAENERGY - RESPONSIVE FRAMEWORK
   Optimalizace pro Mobile, Tablet a Desktop
   ============================================ */

/* ============================================
   BREAKPOINTY A PROMĚNNÉ
   ============================================ */
:root {
    /* Breakpointy */
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
    
    /* Touch-friendly velikosti */
    --touch-target-min: 44px;
    --touch-spacing: 8px;
    
    /* Typografie pro různá zařízení */
    --font-size-mobile: 14px;
    --font-size-tablet: 15px;
    --font-size-desktop: 16px;
    
    /* Spacing pro různá zařízení */
    --spacing-mobile: 1rem;
    --spacing-tablet: 1.5rem;
    --spacing-desktop: 2rem;
}

/* ============================================
   DEVICE-SPECIFIC BODY CLASSES
   ============================================ */

/* === MOBILE === */
.device-mobile {
    font-size: var(--font-size-mobile);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.device-mobile .container {
    padding-left: 15px;
    padding-right: 15px;
}

/* === TABLET === */
.device-tablet {
    font-size: var(--font-size-tablet);
}

.device-tablet .container {
    padding-left: 20px;
    padding-right: 20px;
}

/* === DESKTOP === */
.device-desktop {
    font-size: var(--font-size-desktop);
}

/* ============================================
   TOUCH DEVICE OPTIMALIZACE
   ============================================ */
.touch-device {
    /* Zakázat hover efekty na touch zařízeních */
    -webkit-touch-callout: none;
}

.touch-device .btn,
.touch-device .nav-link,
.touch-device a {
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
}

.touch-device .dropdown-item {
    padding: 12px 20px;
}

/* Zakázat hover efekty které způsobují problémy na touch */
.touch-device *:hover {
    transition-delay: 0s !important;
}

/* ============================================
   MOBILNÍ NAVIGACE (do 768px)
   ============================================ */
@media (max-width: 767.98px) {
    /* Skrýt desktop prvky */
    .ae-topbar {
        display: none !important;
    }
    
    /* Kompaktní navbar */
    .ae-navbar {
        padding: 0.5rem 0;
    }
    
    .ae-navbar .ae-logo-text {
        display: none;
    }
    
    .ae-navbar .ae-logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    /* Mobilní menu tlačítko */
    .navbar-toggler {
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        background: rgba(255,255,255,0.1);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
        background: rgba(255,255,255,0.2);
    }
    
    .navbar-toggler-icon {
        width: 24px;
        height: 24px;
    }
    
    /* Fullscreen mobilní menu */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        z-index: 1050;
        padding: 80px 20px 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
    }
    
    /* Zavírací tlačítko */
    .navbar-collapse::before {
        content: '✕';
        position: absolute;
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: white;
        background: rgba(255,255,255,0.1);
        border-radius: 50%;
        cursor: pointer;
    }
    
    /* Mobilní menu položky */
    .navbar-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 16px 0;
        font-size: 18px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .navbar-nav .nav-link i {
        font-size: 20px;
        margin-right: 12px;
    }
    
    /* Dropdown na mobilu */
    .navbar-nav .dropdown-menu {
        position: static;
        background: rgba(0,0,0,0.2);
        border: none;
        border-radius: 8px;
        margin: 0 0 10px 20px;
        padding: 10px;
    }
    
    .navbar-nav .dropdown-item {
        color: rgba(255,255,255,0.9);
        padding: 12px 15px;
        border-radius: 6px;
    }
    
    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        background: rgba(255,255,255,0.1);
        color: white;
    }
    
    /* Mobilní CTA tlačítka */
    .ae-navbar .btn {
        width: 100%;
        margin-top: 20px;
        padding: 14px;
        font-size: 16px;
    }
    
    /* Hero sekce na mobilu */
    .ae-hero {
        min-height: 70vh;
        padding: 60px 0 40px;
        text-align: center;
    }
    
    .ae-hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .ae-hero .lead {
        font-size: 1rem;
    }
    
    .ae-hero .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Sekce na mobilu */
    .ae-section {
        padding: 40px 0;
    }
    
    .ae-section h2 {
        font-size: 1.5rem;
    }
    
    /* Karty na mobilu */
    .ae-card {
        margin-bottom: 15px;
    }
    
    .ae-glass {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    /* Footer na mobilu */
    .ae-footer {
        text-align: center;
    }
    
    .ae-footer-main .row > div {
        margin-bottom: 30px;
    }
    
    .ae-footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .ae-footer-links li {
        width: auto;
    }
    
    .ae-footer-social {
        justify-content: center;
    }
    
    /* Cookie banner na mobilu */
    .ae-cookie-banner .ae-cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .ae-cookie-banner .ae-cookie-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .ae-cookie-banner .ae-cookie-actions .btn {
        width: 100%;
    }
    
    /* Scroll to top */
    .ae-scroll-top {
        bottom: 20px;
        right: 15px;
        width: 44px;
        height: 44px;
    }
    
    /* Formuláře na mobilu */
    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 16px; /* Zabrání zoomu na iOS */
    }
    
    .btn {
        min-height: 48px;
        padding: 12px 20px;
    }
    
    /* Tabulky - horizontální scroll */
    .table-responsive {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    /* Modální okna */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 16px;
    }
}

/* ============================================
   TABLET NAVIGACE (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Kompaktní topbar */
    .ae-topbar {
        font-size: 0.8rem;
    }
    
    .ae-topbar-right .ae-visit-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    /* Navbar pro tablet */
    .ae-navbar .nav-link {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .ae-navbar .dropdown-menu {
        min-width: 200px;
    }
    
    /* Hero na tabletu */
    .ae-hero {
        min-height: 60vh;
        padding: 80px 0 60px;
    }
    
    .ae-hero h1 {
        font-size: 2.25rem;
    }
    
    /* Sekce na tabletu */
    .ae-section {
        padding: 60px 0;
    }
    
    /* 2-column layout na tabletu */
    .ae-grid-tablet-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Footer na tabletu */
    .ae-footer-main .row {
        text-align: left;
    }
    
    .ae-footer-newsletter .col-lg-6 {
        text-align: center;
    }
    
    .ae-newsletter-form {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ============================================
   DESKTOP (992px+)
   ============================================ */
@media (min-width: 992px) {
    /* Plná navigace */
    .ae-navbar .nav-link {
        padding: 10px 15px;
    }
    
    /* Mega menu hover efekt */
    .ae-navbar .dropdown:hover .dropdown-menu {
        display: block;
        animation: fadeInDown 0.2s ease;
    }
    
    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Hero na desktopu */
    .ae-hero {
        min-height: 85vh;
    }
    
    .ae-hero h1 {
        font-size: 3rem;
    }
    
    /* Sekce na desktopu */
    .ae-section {
        padding: 80px 0;
    }
}

/* ============================================
   VELKÉ OBRAZOVKY (1400px+)
   ============================================ */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .ae-hero h1 {
        font-size: 3.5rem;
    }
    
    .ae-section h2 {
        font-size: 2.5rem;
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */
@media (max-width: 767.98px) and (orientation: landscape) {
    .ae-hero {
        min-height: 100vh;
        padding: 40px 0;
    }
    
    .ae-hero h1 {
        font-size: 1.5rem;
    }
    
    .navbar-collapse {
        padding-top: 60px;
    }
}

/* ============================================
   PORTRAIT TABLET
   ============================================ */
@media (min-width: 768px) and (max-width: 991.98px) and (orientation: portrait) {
    .ae-hero {
        min-height: 50vh;
    }
    
    .ae-grid-tablet-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   UTILITY CLASSES PRO RESPONSIVITU
   ============================================ */

/* Skrytí na specifických zařízeních */
.hide-mobile {
    display: block;
}

.hide-tablet {
    display: block;
}

.hide-desktop {
    display: block;
}

.show-mobile-only {
    display: none;
}

.show-tablet-only {
    display: none;
}

.show-desktop-only {
    display: none;
}

@media (max-width: 767.98px) {
    .hide-mobile {
        display: none !important;
    }
    .show-mobile-only {
        display: block !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hide-tablet {
        display: none !important;
    }
    .show-tablet-only {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .hide-desktop {
        display: none !important;
    }
    .show-desktop-only {
        display: block !important;
    }
}

/* Touch-friendly spacing */
.touch-device .touch-spacing {
    padding: 12px;
}

.touch-device .touch-spacing-lg {
    padding: 16px;
}

/* Safe area pro notch zařízení (iPhone X+) */
@supports (padding: env(safe-area-inset-top)) {
    .device-mobile .ae-navbar {
        padding-top: env(safe-area-inset-top);
    }
    
    .device-mobile .ae-footer-bottom {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
    
    .device-mobile .navbar-collapse {
        padding-top: calc(80px + env(safe-area-inset-top));
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ============================================
   PULL TO REFRESH INDIKÁTOR
   ============================================ */
.pull-to-refresh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ae-primary);
    color: white;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.pull-to-refresh.active {
    transform: translateY(0);
}

.pull-to-refresh .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   SWIPE INDIKÁTORY
   ============================================ */
.swipe-indicator {
    display: none;
}

.touch-device .swipe-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.05);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--ae-gray-600);
    margin-bottom: 15px;
}

.swipe-indicator i {
    animation: swipeHint 1.5s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* ============================================
   LOADING SKELETON PRO LAZY LOAD
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-image {
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
}

.skeleton-card {
    padding: 20px;
    border-radius: 12px;
}

/* ============================================
   OPTIMALIZACE VÝKONU
   ============================================ */

/* GPU akcelerace pro animace */
.ae-card,
.ae-glass,
.btn,
.dropdown-menu,
.navbar-collapse {
    will-change: transform;
    transform: translateZ(0);
}

/* ============================================
   MINIHUB STRÁNKA - RESPONSIVNÍ STYLY
   ============================================ */

/* === MOBILE (do 767px) === */
@media (max-width: 767.98px) {
    /* Hero sekce MiniHub */
    .minihub-hero-card {
        margin-top: 2rem;
    }
    
    .minihub-hero-card .fs-3 {
        font-size: 1.5rem !important;
    }
    
    /* Cenové balíčky na mobilu - plná šířka */
    .minihub-card {
        margin-bottom: 1.5rem;
    }
    
    .minihub-card .card-body {
        padding: 1.5rem !important;
    }
    
    .minihub-card .display-4 {
        font-size: 2rem !important;
    }
    
    /* 3 důvody sekce */
    .minihub-reasons .card {
        margin-bottom: 1rem;
    }
    
    /* ROI sekce */
    .minihub-roi .card {
        margin-bottom: 1rem;
    }
    
    /* Příběh zákazníka */
    .minihub-story .card-body {
        padding: 1.5rem !important;
    }
    
    .minihub-story .ps-4 {
        padding-left: 1rem !important;
    }
    
    /* Podporovaná zařízení - 2 sloupce místo 6 */
    .minihub-devices .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* FAQ */
    .minihub-faq .accordion-button {
        font-size: 0.95rem;
        padding: 1rem;
    }
    
    /* CTA sekce */
    .minihub-cta .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .minihub-cta .d-flex {
        flex-direction: column;
    }
    
    /* Hero bullets na mobilu */
    section[style*="gradient"] .list-unstyled li {
        font-size: 0.95rem;
    }
    
    section[style*="gradient"] .list-unstyled .fs-5 {
        font-size: 1.1rem !important;
    }
}

/* === TABLET (768px - 991px) === */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero sekce */
    .minihub-hero-card {
        max-width: 350px;
        margin: 2rem auto 0;
    }
    
    /* Cenové balíčky - vedle sebe */
    .minihub-card .display-4 {
        font-size: 2.5rem !important;
    }
    
    /* 3 důvody - 2 sloupce, pak 1 */
    .minihub-reasons .row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .minihub-reasons .col-md-4:nth-child(3) {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 1rem;
    }
    
    /* Podporovaná zařízení - 3 sloupce */
    .minihub-devices .col-lg-2 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
    
    /* CTA tlačítka */
    .minihub-cta .btn-lg {
        padding: 0.75rem 2rem;
    }
}

/* === DESKTOP (992px+) === */
@media (min-width: 992px) {
    /* Hero sekce */
    .minihub-hero-card {
        position: sticky;
        top: 100px;
    }
    
    /* Hover efekty na kartách */
    .minihub-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 1rem 3rem rgba(0,0,0,0.15) !important;
    }
    
    /* Smooth scroll chování */
    html {
        scroll-behavior: smooth;
    }
}

/* ============================================
   CENÍK STRÁNKA - RESPONSIVNÍ STYLY
   ============================================ */

/* === MOBILE === */
@media (max-width: 767.98px) {
    /* Toggle měsíční/roční */
    .pricing-toggle .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Cenové karty */
    .pricing-card .display-4 {
        font-size: 2rem !important;
    }
    
    /* Porovnávací tabulka - horizontální scroll */
    .pricing-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .pricing-table table {
        min-width: 600px;
    }
    
    /* Offline sekce */
    .pricing-offline .col-lg-5 {
        margin-bottom: 1.5rem;
    }
    
    .pricing-offline .display-4 {
        font-size: 1.75rem !important;
    }
    
    .pricing-offline__note {
        font-size: 0.85rem;
        padding: 0 1rem;
    }
}

/* === TABLET === */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Cenové karty - 2 sloupce */
    .pricing-cards .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Offline sekce */
    .pricing-offline .col-lg-5 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}


/* Reduce motion pro uživatele s preferencí */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .ae-floating {
        animation: none !important;
    }
}

/* Dark mode preference */
@media (prefers-color-scheme: dark) {
    .auto-dark-mode {
        --ae-body-bg: #121212;
        --ae-body-color: #e0e0e0;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .ae-btn,
    .btn {
        border-width: 2px;
    }
    
    a {
        text-decoration: underline;
    }
}
