/**
 * eXprese.cz – Mobilní styly
 * Načítá se pouze na zařízeních s max-width: 768px
 * <link rel="stylesheet" href="css/mobile.css" media="(max-width: 768px)">
 */


/* ============================================
   HAMBURGER TLAČÍTKO
   ============================================ */

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ============================================
   MOBILNÍ NAVIGACE
   ============================================ */

.nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: auto;
    min-width: 200px;
    height: auto;
    background: rgba(26, 26, 26, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    flex-direction: column;
    display: flex;
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
    z-index: 1000;
    margin: var(--spacing-xs) var(--spacing-sm);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

.nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.nav-link {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: left;
    color: var(--text-primary);
    text-decoration: none;
    box-sizing: border-box;
}

.nav-link.active {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}

body.nav-open {
    overflow: hidden;
}


/* ============================================
   HEADER
   ============================================ */

.header {
    overflow: visible;
}

.header .container {
    padding: 0 var(--spacing-sm);
}

.logo {
    display: none;
}

.header-controls {
    display: none;
}


/* ============================================
   USER MENU (zjednodušení na mobilu)
   ============================================ */

.user-menu {
    gap: var(--spacing-xs);
}

.user-menu .nav-link {
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs);
    border: none;
    width: auto;
}

.user-avatar {
    flex-shrink: 0;
}


/* ============================================
   GALERIE – LAYOUT
   ============================================ */

.gallery-layout {
    height: auto;
    overflow: visible;
    flex-direction: column;
}

.gallery-main {
    overflow: visible;
}


/* ============================================
   GALERIE – MŘÍŽKA FOTEK
   ============================================ */

.photo-grid.grid-3x3,
.photo-grid.grid-3x4,
.photo-grid.grid-4x3,
.photo-grid.grid-4x4,
.photo-grid.grid-4x5,
.photo-grid.grid-5x3,
.photo-grid.grid-5x4,
.photo-grid.grid-5x5,
.photo-grid.grid-6x4,
.photo-grid.grid-7x4 {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
}

.photo-item {
    aspect-ratio: auto !important;
    height: auto !important;
}

.photo-grid .photo-item img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

.author-grid.grid-3x3,
.author-grid.grid-4x4,
.author-grid.grid-5x5 {
    grid-template-columns: repeat(2, 1fr);
}


/* ============================================
   GALERIE – SIDEBAR (FILTRY)
   ============================================ */

.gallery-sidebar {
    display: none;
}


/* ============================================
   GALERIE – MOBILNÍ STRÁNKOVÁNÍ
   ============================================ */

.mobile-pagination {
    display: block;
    padding: var(--spacing-md) 0;
    text-align: center;
}

.mobile-pagination .photo-nav-sidebar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
}

.mobile-pagination .pagination-total {
    margin-top: var(--spacing-sm);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}


/* ============================================
   DETAIL FOTKY
   ============================================ */

.photo-detail {
    flex-direction: column;
}

.photo-detail-sidebar {
    width: 100%;
}


/* ============================================
   PROFIL AUTORA
   ============================================ */

.author-banner {
    flex-direction: column;
    padding: var(--spacing-md);
}

.author-banner-left {
    gap: var(--spacing-md);
}

/* Avatar + jméno vedle sebe */
.author-identity {
    gap: var(--spacing-md);
}

.author-identity .author-avatar-square {
    width: 80px;
    height: 80px;
    font-size: 28px;
}

.author-info .author-name {
    font-size: var(--font-size-lg);
}

/* Lokace - kraj na jednom řádku, detail na dalším pokud se nevejde */
.author-location {
    flex-direction: column;
    gap: 0;
}

.author-location-kraj::after {
    content: '';
}

/* Statistiky - kompaktní řádek s ikonami */
.author-stats {
    flex-wrap: nowrap;
    justify-content: center;
    gap: var(--spacing-sm);
}

.author-stat {
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-xs);
    flex-shrink: 0;
    white-space: nowrap;
}

.author-stat-icon {
    display: inline !important;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.author-stat-value {
    font-size: var(--font-size-sm);
}

.author-stat-label {
    display: none;
}

.author-banner-right {
    padding-left: 0;
    padding-top: var(--spacing-md);
    border-left: none;
    border-top: 1px solid var(--border-color);
    max-height: none;
}

.author-my-stats {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
}


/* ============================================
   PROFIL – EDITACE
   ============================================ */

.profile-header {
    flex-direction: column;
    text-align: center;
}

.profile-stats {
    justify-content: center;
}

.profile-avatar-section {
    flex-direction: column;
    align-items: flex-start;
}


/* ============================================
   EDITACE FOTKY
   ============================================ */

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

.edit-photo-preview {
    max-width: 300px;
}


/* ============================================
   VYBAVENÍ
   ============================================ */

.equipment-grid {
    grid-template-columns: 1fr;
}

.equipment-selects {
    flex-direction: column;
}


/* ============================================
   FORMULÁŘE
   ============================================ */

.form-row,
.form-row-3 {
    grid-template-columns: 1fr;
}

.auth-box {
    padding: var(--spacing-lg);
}


/* ============================================
   KOMENTÁŘE
   ============================================ */

.comment-block {
    flex-direction: column;
}

.comment-block-right {
    align-self: flex-end;
}


/* ============================================
   STATICKÉ STRÁNKY
   ============================================ */

.static-page {
    padding: var(--spacing-md);
}

.static-section {
    padding: 1.2rem 1.4rem;
}

.static-page h1 {
    font-size: 1.8rem;
}

.static-section h2 {
    font-size: 1.2rem;
}


/* ============================================
   FOOTER
   ============================================ */

.footer .container {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-sm);
}

.footer .footer-text {
    display: none;
}

.footer .footer-text:last-child {
    display: none;
}
