/* style.css */
:root {
    --bg-color: #f8f9fa;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.07);
    --bg-pos-y: -360px;
    --bg-fade-start: 60%;
    --global-font-size: 18px; /* Global Font Parameter */
    --card-shadow: 0 6px 12px rgba(0,0,0,0.15); /* Darker shadow */
}
html { font-size: var(--global-font-size); }
body {
    background-color: var(--bg-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}
html { overflow-y: scroll; }
body.modal-open { padding-right: 0 !important; }
.background-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: -1; overflow: hidden;
}
.background-wrapper img {
    width: 100%; height: auto; position: absolute; top: var(--bg-pos-y); left: 0;
    mask-image: linear-gradient(to bottom, black var(--bg-fade-start), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black var(--bg-fade-start), transparent 100%);
}
.text-shadow { text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.text-shadow-dark { text-shadow: 0 3px 6px rgba(0,0,0,1); }
.hero-row { margin-top: -100px; }
.hero-header { padding-top: 0; }
.hero-title { font-size: 2.2rem; line-height: 1.2; }

/* Navigation */
.navbar-custom {
    background: rgba(7, 10, 16, 0.35) !important;
    backdrop-filter: blur(8px);
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
}

.navbar-brand-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.navbar-brand-subtitle {
    font-size: 0.65rem;
    font-weight: 400;
    text-transform: none;
    line-height: 1.2;
    color: rgba(255,255,255,0.8);
    margin-top: -2px;
}

.navbar-custom::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -2px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(88, 189, 255, 0.8), rgba(255, 214, 102, 0.8), transparent);
    filter: blur(6px);
    opacity: 0.7;
    animation: navGlow 6s ease-in-out infinite;
    pointer-events: none;
}

/* Hero Social Icons & Author Contact */
.hero-social-icons, .author-contact-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}
.hero-social-icons .social-tile, 
.author-contact-wrapper .social-tile {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-social-icons .social-tile:hover, 
.author-contact-wrapper .social-tile:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.social-tile.author-contact {
    background: linear-gradient(135deg, #0088cc, #00aaff) !important;
    color: white !important;
    border: 2px solid rgba(255,255,255,0.3);
}
.author-contact-text {
    font-size: 1rem;
    text-align: left;
    line-height: 1.1;
}

@media (max-width: 991.98px) {
    .navbar-brand-subtitle { font-size: 0.55rem; }
    .hero-header {
        text-align: center;
    }
    .hero-social-icons, .author-contact-wrapper {
        justify-content: center;
        width: 100%;
        margin-top: 20px; /* Регулировка отступа между элементами в мобильной версии */
    }
    .author-contact-text {
        font-size: 0.9rem;
    }
}
/* ... existing remaining ... */
.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
    position: relative;
}
.navbar-custom .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(130, 206, 255, 0.9), rgba(255, 218, 121, 0.9));
    transition: width 0.25s ease;
}
.navbar-custom .nav-link:hover::after {
    width: 100%;
}
.navbar-custom .navbar-brand:hover {
    text-shadow: 0 0 14px rgba(120, 200, 255, 0.7);
}
.navbar-toggler {
    border: 2px solid rgba(255,255,255,0.8);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
/* Mobile Menu Styling - Scoped to mobile only */
@media (max-width: 991.98px) {
    .offcanvas-custom {
        background: rgba(7, 10, 16, 0.98) !important; /* Darker, more solid background */
        backdrop-filter: blur(15px);
        color: white;
        width: 80vw !important;
        max-width: 320px !important;
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    .offcanvas-custom .nav-link {
        color: rgba(255,255,255,0.9) !important;
        font-size: 1.15rem;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .offcanvas-custom .nav-link:hover { color: #58bdff !important; }
}
.offcanvas-backdrop { z-index: 1040; } /* Lower than fixed navbar */
.offcanvas { z-index: 1050; }
.navbar-custom { z-index: 1045; } /* Make sure navbar items don't overlap offcanvas */

/* Navigation Links on Desktop (Ensure visibility) */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav .nav-link {
        color: rgba(255,255,255,0.9);
        font-weight: 500;
        padding-left: 1rem;
        padding-right: 1rem;
        transition: color 0.2s;
    }
    .navbar-expand-lg .navbar-nav .nav-link:hover {
        color: #fff;
    }
}

/* Tiles & Cards */
.social-tiles-container { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 30px; }
.social-tile {
    width: 86px; height: 86px; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.9); border-radius: 14px; font-size: 2.3rem;
    box-shadow: var(--card-shadow); cursor: pointer; transition: transform 0.25s ease, box-shadow 0.25s ease;
    color: #333; /* Default icon color */
}
.social-tile:hover { transform: translateY(-4px) scale(1.1); color: #0d6efd; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

.custom-card {
    border: none; border-radius: 12px; box-shadow: var(--card-shadow);
    background: rgba(255, 255, 255, 0.95); transition: 0.2s; cursor: pointer;
    overflow: hidden;
}
.custom-card:hover { transform: translateY(-3px); }
.custom-card .card-body { padding: 1.5rem; text-align: left; }
.topic-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.topic-card:hover { transform: translateY(-3px) scale(1.1); box-shadow: 0 14px 28px rgba(0,0,0,0.25); }
.topic-title { font-size: 1.1rem; font-weight: 700; }
.topic-status { font-size: 0.95rem; margin-bottom: 8px; }
.topic-actions { display: grid; gap: 10px; }
.topic-icons .icon-btn { font-size: 1.35rem; }
.topic-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.topic-action-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.04);
}
.topic-action-left.is-empty {
    padding: 0;
    background: transparent;
}
.topic-action-right {
    display: inline-flex;
    align-items: center;
}
.icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #212529;
    padding: 4px;
    transition: transform 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { transform: scale(1.1); color: #0d6efd; }
.icon-btn.voted { color: #198754; }
.icon-count { font-size: 0.95rem; }
.submission-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transform-origin: center top;
}
#submission-form-container.is-expanded .submission-card {
    transform: scale(1.06);
    box-shadow: 0 18px 40px rgba(0,0,0,0.3);
}
#submission-form-container.is-expanded input,
#submission-form-container.is-expanded textarea,
#submission-form-container.is-expanded select {
    font-size: 1.1rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}
#submission-form-container.is-expanded textarea {
    min-height: 140px;
}
.form-focus-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1;
}
.form-focus-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}
body.form-focus-active .background-wrapper img {
    filter: brightness(0.7);
}
#submission-form-container { position: relative; z-index: 2; }
.type-toggle-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.type-toggle-group .type-toggle.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

@keyframes navGlow {
    0%, 100% { opacity: 0.4; transform: translateX(-6%); }
    50% { opacity: 0.9; transform: translateX(6%); }
}

/* GLOW BORDERS */
.border-glow-green {
    border: 3px solid #198754 !important;
    box-shadow: 0 0 20px rgba(25, 135, 84, 0.6) !important;
}
.border-glow-yellow {
    border: 3px solid #ffc107 !important;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.7) !important;
}

/* Modals */
/* Modals - Base styles */
.modal-content { border-radius: 16px; border: none; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.modal-xl-custom { width: 95%; margin-left: auto !important; margin-right: auto !important; }

/* Desktop Modal Width */
@media (min-width: 992px) {
    .modal-xl-custom { max-width: 80%; }
}

.modal-70 .modal-dialog { max-width: 70vw; margin-left: auto; margin-right: auto; }
.topic-content-full { font-size: 1.1rem; line-height: 1.8; color: #212529; }
.topic-content-full img { max-width: 100%; height: auto; border-radius: 8px; }
.modal-status { font-size: 1.15rem; text-align: center; }
.modal-icons .icon-btn { font-size: 1.5rem; }

/* Donation Button Styling */
.btn-donate-gold {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #000 !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}
.btn-donate-gold:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.4);
    background: linear-gradient(45deg, #ffed4a, #ff9100);
}
.btn-donate-gold i { font-size: 1.4rem; }

.btn-donate-paypal {
    background: #0070ba;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}
.btn-donate-paypal:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 112, 186, 0.4);
    background: #005ea6;
    color: #fff !important;
}
.btn-donate-paypal i { font-size: 1.4rem; }

/* Crypto Tile Styling */
.crypto-tile {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.crypto-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.15);
}
.crypto-tile .icon-circle {
    width: 70px; height: 70px;
    background: rgba(0,0,0,0.03);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s ease;
}
.crypto-tile:hover .icon-circle {
    background: rgba(0,0,0,0.06);
}
.crypto-tile h6 { font-size: 1.1rem; color: #333; }
.crypto-tile small { font-size: 0.9rem; }

/* QR Overlay transition */
#qrOverlay { transition: opacity 0.3s ease; }
#qrOverlay.d-none { opacity: 0; pointer-events: none; }
#qrOverlay:not(.d-none) { opacity: 1; pointer-events: auto; }

.site-footer {
    margin-top: 60px;
    padding: 24px 0 36px;
    background: rgba(7, 10, 16, 0.55);
    color: rgba(255,255,255,0.85);
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
}
.site-footer .footer-copy {
    font-weight: 600;
    margin-bottom: 6px;
}
.site-footer .footer-sign {
    font-style: italic;
    color: rgba(255,255,255,0.7);
}
.section-divider--lifted { margin-top: -45px; }

#topics-grid { margin-top: -115px; }
.topics-grid--main { margin-top: -64px !important; }
.topics-grid--paged { margin-top: 0; }

/* Pagination */
.pagination .page-link { color: #333; background: rgba(255,255,255,0.9); }
.pagination .page-item.active .page-link { background: #212529; border-color: #212529; color: #fff; }
 
/* TABLET / SMALL LAPTOP ADJUSTMENTS (< 992px) */
@media (max-width: 991.98px) {
    /* FORCE FLUID WIDTH to avoid empty space and shifting */
    .container, .container-lg, .container-md, .container-sm {
        max-width: 95% !important; /* Use almost full width */
        width: 95% !important;
        padding-left: 10px;
        padding-right: 10px;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Fix Hero Title size to prevent breaking */
    .hero-row {
        margin-top: -44px; /* Reduced since header is hidden on mobile */
        text-align: center;
    }

    /* Ensure form is centered and full width */
    .submission-card { 
        padding: 1.5rem !important;
        width: 100%;
    }
    
    .social-tiles-container { gap: 10px; justify-content: center; }
}

@media (max-width: 768px) {
    :root { --global-font-size: 15px; } /* Slightly larger base font for mobile readability */
    .navbar-custom { padding-top: 6px; padding-bottom: 6px; }
    .navbar-custom::before { left: 4%; right: 4%; }
    .navbar-brand { font-size: 1.05rem; }
    .navbar-toggler { padding: 0.2rem 0.45rem; }
    .offcanvas-custom .nav-link { font-size: 1rem; margin-bottom: 6px; }
    
    /* Show Hero Header on mobile */
    .hero-header { 
        display: flex !important; 
    }
    

    .hero-social-icons .social-tile, 
    .author-contact-wrapper .social-tile { 
        width: 48px; 
        height: 48px; 
        font-size: 1.4rem; 
    }
    .hero-social-icons .social-tile:hover, 
    .author-contact-wrapper .social-tile:hover { transform: translateY(-2px) scale(1.06); }
    .topic-card:hover { transform: translateY(-2px) scale(1.03); }
    .topic-title { font-size: 1rem; }
    .topic-preview { font-size: 0.95rem; }
    .topic-action-bar { flex-direction: row; gap: 8px; flex-wrap: wrap; } /* Keep row but wrap if needed */
    .topic-action-left { padding: 4px 8px; }
    .topic-icons { flex-wrap: wrap; }
    
    /* Fix overlap issues */
    .topics-grid--main { margin-top: 0 !important; }
    .section-divider--lifted { margin-top: 0; }
    
    /* ЗДЕСЬ РЕГУЛИРУЙТЕ ВЕРХНИЙ ОТСТУП ДЛЯ МОБИЛЬНЫХ ( узкий режим ) */
    .hero-row { margin-top: -37px; } 
    
    #submission-form-container.is-expanded .submission-card { transform: scale(1.02); }
    #submission-form-container.is-expanded textarea { min-height: 120px; }
    .modal-70 .modal-dialog { max-width: 94vw; }
}
