/* ОБЩИЕ СТИЛИ */
:root {
    /* Шрифты */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Cormorant Garamond', serif;
    
    /* Цвета */
    --color-gold-light: #f2e6d0;
    --color-gold: #d4b483;
    --color-gold-dark: #b59a6d;
    --color-gold-darker: #a88752;
    --color-bg-dark: #0a050f;
    --color-bg-medium: rgba(15,8,25,0.5);
    --color-text-light: #e6d5b8;
    --color-text-medium: #c9b79c;
    --color-text-dark: #7a6a4f;
    
    /* Размеры шрифтов для планшетов */
    --font-size-xs: 14px;
    --font-size-sm: 16px;
    --font-size-md: 18px;
    --font-size-lg: 20px;
    --font-size-xl: 22px;
    --font-size-xxl: 24px;
    --font-size-xxxl: 26px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--color-bg-dark);
    color: var(--color-text-light);
    font-family: var(--font-body);
    font-size: var(--font-size-sm); /* Увеличили базовый размер */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНЫХ */
body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Фикс для Safari на iOS */
@supports (-webkit-touch-callout: none) {
    .page-container {
        height: -webkit-fill-available;
    }
}

/* СТИЛИ ДЛЯ СКРОЛЛБАРА */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 5, 15, 0.9);
    border-left: 1px solid rgba(168,125,61,0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--color-gold-dark), var(--color-gold));
    border-radius: 6px;
    border: 2px solid rgba(10, 5, 15, 0.9);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--color-gold), var(--color-gold-light));
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(to bottom, var(--color-gold-darker), #c9a769);
}

/* Для Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold-dark) rgba(10, 5, 15, 0.9);
}

/* КАРКАС ИНТЕРФЕЙСА */
.page-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ХЕДЕР */
.tablet-header {
    height: 80px;
    min-height: 80px;
    background: var(--color-bg-dark);
    border-bottom: 1px solid rgba(168,125,61,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1000;
}

.header-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 30px;
}

.gold-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold-dark));
    margin: 0 25px;
}

.gold-line.left {
    background: linear-gradient(90deg, var(--color-gold-dark), transparent);
}

.header-logo {
    height: 64px;
    width: auto;
    animation: subtle-glow 4s ease-in-out infinite;
}

/* ЦЕНТРАЛЬНЫЙ КОНТЕЙНЕР */
.content-frame {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

#content-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

/* ФУТЕР С КНОПКАМИ - КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ */
.tablet-footer {
    height: auto;
    min-height: 80px;
    padding: 10px 0;
    background: var(--color-bg-dark);
    border-top: 1px solid rgba(168,125,61,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1000;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.8);
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
}

.footer-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    padding: 0 5px;
    width: 100%;
    margin: 0 auto;
    flex-wrap: nowrap;
    overflow: visible;
}

.footer-btn {
    flex: 1;
    min-width: 60px;
    min-height: 70px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 5, 15, 0.9);
    border: 1px solid rgba(168,125,61,0.2);
    color: var(--color-gold-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-heading); /* Исправлено на переменную */
    font-size: var(--font-size-sm); /* Увеличили размер */
    letter-spacing: 1px;
    border-radius: 8px;
    text-align: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    overflow: visible;
    position: relative;
}

.footer-btn:hover {
    background: rgba(181,154,109,0.15);
    color: var(--color-gold-light);
    transform: translateY(-2px);
    border-color: rgba(168,125,61,0.4);
}

.footer-btn.active {
    background: rgba(181,154,109,0.2);
    color: var(--color-gold);
    border-bottom: 3px solid var(--color-gold);
    box-shadow: 0 0 10px rgba(212, 180, 131, 0.3);
}

.footer-btn i {
    font-size: 22px;
    margin-bottom: 6px;
    display: block;
    height: 24px;
    line-height: 24px;
}

.footer-btn span {
    font-size: var(--font-size-sm); /* Увеличили с 12px */
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
    line-height: 1.2;
}

/* ГРАДИЕНТНЫЕ ЭФФЕКТЫ */
.gold-gradient {
    background: linear-gradient(135deg, var(--color-gold-dark) 0%, var(--color-gold) 50%, var(--color-gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* АНИМАЦИИ */
@keyframes subtle-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(212, 180, 131, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(212, 180, 131, 0.6));
    }
}

/* ОСНОВНЫЕ СТИЛИ ДЛЯ КОНТЕНТА */
.sections-container {
    max-width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 100px;
}

.section-item {
    margin-bottom: 20px;
    border: 1px solid rgba(168,125,61,0.1);
    background: var(--color-bg-medium);
    overflow: hidden;
    border-radius: 8px;
}

.section-header {
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
    text-align: center;
}

.section-header:hover {
    background: rgba(181,154,109,0.05);
}

/* ЗАГОЛОВКИ - все используют Playfair Display */
.section-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-xxxl); /* Увеличили с 24px */
    color: var(--color-gold);
    letter-spacing: 6px;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease, opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.section-item.active .section-content {
    opacity: 1;
    transform: translateY(0);
}

.section-inner {
    padding: 0 40px 40px;
}

/* ТИПОГРАФИЯ И ТЕКСТ */
.title-main {
    font-family: var(--font-heading);
    font-size: var(--font-size-xxxl);
    color: var(--color-gold);
    letter-spacing: 6px;
    text-align: center;
    text-transform: uppercase;
}

.title-category {
    font-family: var(--font-heading);
    font-size: var(--font-size-xxl);
    color: var(--color-gold);
    text-align: center;
    margin: 40px 0 30px;
    letter-spacing: 4px;
    position: relative;
}

.title-category::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold-dark), transparent);
}

.title-secondary {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 3px;
}

.title-tertiary {
    font-family: var(--font-heading); /* Исправлено с Cormorant на Playfair */
    font-size: var(--font-size-lg);
    color: var(--color-gold);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.text-description {
    font-size: var(--font-size-md); /* Увеличили с 16px */
    color: var(--color-gold-dark);
    line-height: 1.5;
    font-style: italic;
}

.text-main {
    font-size: var(--font-size-md); /* Увеличили с 17px */
    color: var(--color-text-medium);
    line-height: 1.6;
}

.text-note {
    font-size: var(--font-size-sm); /* Увеличили с 14px */
    color: var(--color-text-dark);
    margin-top: 8px;
    font-style: italic;
}

.text-free {
    color: var(--color-gold-dark);
    font-size: var(--font-size-md);
    font-style: italic;
}

.text-unit {
    font-size: var(--font-size-sm);
    color: var(--color-gold-dark);
    margin-left: 5px;
}

/* МЕНЮ И ПРОДУКТЫ */
.menu-category {
    margin: 40px 0 30px;
}

.menu-items {
    list-style: none;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid rgba(181,154,109,0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.section-item.active .menu-item {
    opacity: 1;
    transform: translateY(0);
}

.menu-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
    padding-right: 20px;
}

.item-name {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    color: var(--color-gold);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.item-price {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    color: var(--color-gold);
    white-space: nowrap;
    min-width: 120px;
    text-align: right;
}

/* КАЛЬЯНЫ */
.hookah-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.hookah-category {
    padding: 25px;
    border: 1px solid rgba(181,154,109,0.2);
    background: rgba(10,5,15,0.7);
}

/* ТАБЫ */
.tabs-container {
    margin: 30px 0 40px;
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 25px;
    font-family: var(--font-heading);
    font-size: var(--font-size-md); /* Увеличили с 16px */
    color: var(--color-gold-dark);
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--color-gold-light);
}

.tab-btn.active {
    color: var(--color-gold);
    border-bottom-color: var(--color-gold);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-gold);
    box-shadow: 0 0 10px rgba(212,180,131,0.5);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* СПЕЦИАЛЬНЫЕ БЛОКИ */
.special-block {
    text-align: center;
    padding: 30px;
    margin: 40px 0;
    border: 2px solid rgba(168,125,61,0.3);
    border-radius: 2px;
}

.special-block.warning {
    background: rgba(40,10,20,0.7);
}

.special-block.info {
    background: rgba(20,30,40,0.7);
    border-color: rgba(168,125,61,0.2);
}

.special-block.featured {
    background: rgba(20,10,30,0.6);
    border: 1px solid rgba(181,154,109,0.3);
}

.special-list {
    list-style: none;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.special-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(168,125,61,0.2);
}

.special-item:last-child {
    border-bottom: none;
}

.special-name {
    font-family: var(--font-heading); /* Исправлено - теперь соответствует item-name */
    font-size: var(--font-size-lg); /* Исправлено - теперь соответствует item-name */
    color: var(--color-text-light); /* Исправлено - теперь соответствует заголовкам */
}

.special-price {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    color: var(--color-gold);
    white-space: nowrap;
}

/* СПЕЦПРЕДЛОЖЕНИЯ */
.special-offers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.special-offer {
    padding: 25px;
    border: 1px solid rgba(181,154,109,0.2);
    background: rgba(15,8,25,0.7);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.section-item.active .special-offer {
    opacity: 1;
    transform: translateY(0);
}

/* ПРОГРАММЫ */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.program-card {
    border: 1px solid rgba(181,154,109,0.2);
    padding: 25px;
    background: rgba(10,5,15,0.7);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.tab-content.active .program-card {
    opacity: 1;
    transform: translateY(0);
}

.program-card:hover {
    transform: translateY(-5px);
    border-color: rgba(181,154,109,0.4);
}

.program-features {
    list-style: none;
    margin-bottom: 25px;
}

.program-features li {
    font-size: var(--font-size-sm);
    color: var(--color-text-medium);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.program-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-gold-dark);
}

.program-features li.featured {
    color: var(--color-gold);
    font-weight: 500;
}

.program-features li.featured::before {
    content: '★';
    color: var(--color-gold);
}

.program-duration {
    display: inline-block;
    padding: 6px 15px;
    background: rgba(181,154,109,0.1);
    border: 1px solid rgba(181,154,109,0.3);
    font-size: var(--font-size-sm);
    color: var(--color-gold);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.program-price {
    font-family: var(--font-heading);
    font-size: var(--font-size-xxl);
    color: var(--color-gold);
    text-align: right;
    letter-spacing: 1px;
}

/* QR-КОДЫ И ОПЛАТА */
.qr-container {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    border: 1px solid rgba(181,154,109,0.2);
    background: rgba(10,5,15,0.7);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.section-item.active .qr-container {
    opacity: 1;
    transform: translateY(0);
}

.qr-code {
    width: 66.67%;
    max-width: 400px;
    height: auto;
    border: 2px solid rgba(181,154,109,0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.instruction {
    text-align: center;
    padding: 30px;
    margin: 40px 0;
    border: 1px solid rgba(181,154,109,0.3);
    background: rgba(20,10,30,0.6);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.section-item.active .instruction {
    opacity: 1;
    transform: translateY(0);
}

.instruction-steps {
    list-style: none;
    text-align: left;
    max-width: 600px;
    margin: 30px auto;
}

.instruction-steps li {
    font-size: var(--font-size-md);
    color: var(--color-text-medium);
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
}

.instruction-steps li:before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-gold-dark);
    font-size: 20px;
}

/* АНИМАЦИИ */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.active .fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* АДАПТИВНОСТЬ ДЛЯ КНОПОК */
@media (max-width: 1200px) {
    .footer-btn {
        min-width: 80px;
        min-height: 65px;
    }
    
    .footer-btn i {
        font-size: 20px;
    }
    
    .footer-btn span {
        font-size: var(--font-size-sm);
    }
}

@media (max-width: 768px) {
    /* Обновляем размеры шрифтов для планшетов */
    :root {
        --font-size-xs: 13px;
        --font-size-sm: 15px;
        --font-size-md: 17px;
        --font-size-lg: 19px;
        --font-size-xl: 21px;
        --font-size-xxl: 23px;
        --font-size-xxxl: 25px;
    }
    
    .tablet-header {
        height: 70px;
        min-height: 70px;
    }

    .header-logo {
        height: 56px;
    }

    .tablet-footer {
        min-height: 70px;
        padding: 8px 0;
    }
    
    .footer-buttons {
        gap: 5px;
        padding: 0 3px;
    }

    .footer-btn {
        min-width: 70px;
        min-height: 60px;
        padding: 8px 3px;
        font-size: var(--font-size-sm);
    }

    .footer-btn i {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .footer-btn span {
        font-size: var(--font-size-sm);
        letter-spacing: 0.5px;
    }

    /* Увеличиваем отступы и размеры текста для лучшей читаемости */
    .sections-container {
        padding: 15px;
        padding-bottom: 80px;
    }

    .section-header {
        padding: 20px;
    }

    .section-title, .title-main {
        font-size: var(--font-size-xxl);
        letter-spacing: 4px;
    }

    .section-inner {
        padding: 0 20px 30px;
    }

    .menu-item {
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
    }

    .item-price {
        text-align: left;
        min-width: auto;
    }

    .tabs-header {
        gap: 10px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: var(--font-size-sm);
    }

    .hookah-category {
        padding: 20px;
    }

    .special-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .programs-grid,
    .hookah-categories,
    .special-offers {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .program-card {
        padding: 20px;
    }

    .special-block,
    .instruction,
    .qr-container {
        padding: 25px 20px;
        margin: 30px 0;
    }

    .title-category,
    .title-secondary,
    .title-tertiary {
        font-size: var(--font-size-xl);
    }

    .text-main,
    .instruction-steps li {
        font-size: var(--font-size-md);
        line-height: 1.7; /* Увеличили межстрочный интервал */
    }

    .qr-code {
        max-width: 90%;
    }

    .instruction-steps li {
        padding-left: 25px;
        margin-bottom: 12px;
    }
    
    /* Увеличиваем мелкий текст для читаемости */
    .text-note {
        font-size: var(--font-size-sm);
    }
    
    .program-features li {
        font-size: var(--font-size-sm);
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    /* Еще больше увеличиваем шрифты для мобильных */
    :root {
        --font-size-xs: 12px;
        --font-size-sm: 14px;
        --font-size-md: 16px;
        --font-size-lg: 18px;
        --font-size-xl: 20px;
        --font-size-xxl: 22px;
        --font-size-xxxl: 24px;
    }
    
    .tablet-header {
        height: 60px;
        min-height: 60px;
    }

    .header-logo {
        height: 48px;
    }

    .header-logo-container {
        padding: 0 15px;
    }

    .gold-line {
        margin: 0 15px;
    }

    .tablet-footer {
        min-height: 65px;
        padding: 6px 0;
    }
    
    .footer-buttons {
        gap: 3px;
        padding: 0 2px;
    }

    .footer-btn {
        min-width: 60px;
        min-height: 55px;
        padding: 6px 2px;
        font-size: var(--font-size-xs);
    }

    .footer-btn i {
        font-size: 16px;
        margin-bottom: 3px;
    }

    .footer-btn span {
        font-size: var(--font-size-xs);
        letter-spacing: 0.3px;
    }

    .footer-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: space-between;
    }
    
    .footer-btn {
        flex: 0 0 auto;
        width: 30%;
    }

    .section-title,
    .title-main {
        font-size: var(--font-size-xl);
        letter-spacing: 3px;
    }

    .qr-code {
        max-width: 100%;
    }

    .tabs-header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .tab-btn {
        width: 100%;
        max-width: 250px;
        font-size: var(--font-size-sm);
        padding: 12px 20px;
    }

    .instruction-steps li {
        font-size: var(--font-size-md);
        padding-left: 20px;
        line-height: 1.7;
    }

    .item-name {
        font-size: var(--font-size-lg);
    }

    .item-price {
        font-size: var(--font-size-xl);
    }
    
    /* Увеличиваем все мелкие тексты */
    .text-unit,
    .program-duration,
    .text-note {
        font-size: var(--font-size-sm);
    }
}

/* Для очень старых устройств */
@media (max-width: 320px) {
    .footer-btn {
        min-width: 55px;
        min-height: 50px;
        padding: 4px 1px;
    }
    
    .footer-btn i {
        font-size: 14px;
    }
    
    .footer-btn span {
        font-size: 10px;
    }
}

/* Дополнительные стили для лучшей читаемости на планшетах */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Планшеты в горизонтальной ориентации */
    :root {
        --font-size-xs: 15px;
        --font-size-sm: 17px;
        --font-size-md: 19px;
        --font-size-lg: 21px;
        --font-size-xl: 23px;
        --font-size-xxl: 25px;
        --font-size-xxxl: 28px;
    }
    
    /* Увеличиваем отступы для удобства тапа */
    .footer-btn {
        min-height: 75px;
        padding: 12px 8px;
    }
    
    .footer-btn i {
        font-size: 26px;
        margin-bottom: 8px;
    }
    
    .footer-btn span {
        font-size: var(--font-size-md);
    }
    
    /* Увеличиваем межстрочный интервал для длинных текстов */
    .text-main,
    .instruction-steps li,
    .program-features li {
        line-height: 1.8;
    }
    
    /* Увеличиваем отступы между элементами */
    .menu-item {
        padding: 25px 0;
    }
    
    .special-item {
        padding: 20px 0;
    }
}