/* ==========================================================================
   SHARED UI COMPONENTS & BUTTONS
   ========================================================================== */

/* Statistics Section */
.stats-section {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    padding: 2.8rem 0;
    position: relative;
    z-index: 10;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 22px 14px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.stat-number {
    font-size: 2.3rem;
    font-weight: 900;
    color: #fef08a;
    line-height: 1.1;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.stat-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-number {
        font-size: 1.8rem;
    }
}

/* Universal Button Base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    min-height: 44px;
    min-width: 44px;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

/* Primary Sunny Gold CTA Button */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--gold-color) 100%);
    color: var(--text-dark);
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(255, 208, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 208, 0, 0.55);
}

/* VK Branded Hero Button */
.btn-vk-hero {
    background: linear-gradient(135deg, #0077ff 0%, #0056d6 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 10px 25px rgba(0, 119, 255, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.btn-vk-hero:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 35px rgba(0, 119, 255, 0.65) !important;
    background: linear-gradient(135deg, #1a85ff 0%, #0062eb 100%) !important;
}

.btn-vk-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Secondary White Glassmorphism Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.2);
}

.btn-contact {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

.btn-contact:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

/* Selection Button Shimmer */
.btn-select {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    background-size: 400% 400%;
    color: #FFFFFF;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media (max-width: 600px) {
    .home-presentation-page .btn.btn-secondary {
        max-width: 100%;
        white-space: normal;
        text-align: center;
        justify-content: center;
    }
}

/* Section Header Base */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-gray);
    max-width: 650px;
    margin: 0 auto;
}

/* Statistics Grid */
.stats-section {
    padding: 3rem 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-light);
    border: 1px solid rgba(124, 58, 237, 0.1);
    transition: transform var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-gray);
}

/* Value Cards Grid */
.values-section {
    padding: 5rem 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.value-card {
    background: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(124, 58, 237, 0.08);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.value-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.value-icon-box {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
}

.value-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.value-card-desc {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    z-index: 2010;
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 75vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 1rem;
    color: #FFFFFF;
    font-size: 1.2rem;
}

.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 2020;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
}
/* Decorative raccoons generated by script.js stay inside their section. */
.page-decor-raccoon {
    position: absolute;
    z-index: 0;
    z-index: 2;
    width: clamp(90px, 10vw, 160px);
    height: auto;
    max-width: 18vw;
    opacity: 0.3;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.05));
    pointer-events: none;
    user-select: none;
    object-fit: contain;
}

.stats-section,
.raccoon-diary-section,
.holiday-gallery-section,
.team-section,
.values-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.stats-section > :not(.page-decor-raccoon),
.raccoon-diary-section > :not(.page-decor-raccoon),
.holiday-gallery-section > :not(.page-decor-raccoon),
.team-section > :not(.page-decor-raccoon),
.values-section > :not(.page-decor-raccoon) {
    position: relative;
    z-index: 3;
}

@media (max-width: 1200px) {
    .page-decor-raccoon {
        width: 120px;
        opacity: 0.18;
    }
}

@media (max-width: 768px) {
    .page-decor-raccoon {
        width: 90px;
        opacity: 0.14;
    }
}

/* ==========================================================================
   FLOATING MULTI-MESSENGER ACTION WIDGET (FAB)
   ========================================================================== */
.fab-messenger-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fab-main-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #d946ef 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.fab-main-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(217, 70, 239, 0.5);
    animation: fabPulse 2s infinite;
}

@keyframes fabPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.fab-main-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 36px rgba(124, 58, 237, 0.6);
}

.fab-icon-chat {
    font-size: 1.6rem;
    line-height: 1;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.fab-icon-close {
    position: absolute;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.fab-messenger-widget.is-open .fab-icon-chat {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.fab-messenger-widget.is-open .fab-icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.fab-messenger-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.fab-messenger-widget.is-open .fab-messenger-menu {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fab-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab-item:hover {
    transform: scale(1.12);
}

.fab-vk { background: linear-gradient(135deg, #0077ff 0%, #0055d4 100%); }
.fab-telegram { background: linear-gradient(135deg, #229ed9 0%, #1789c4 100%); }
.fab-whatsapp { background: linear-gradient(135deg, #25d366 0%, #1da851 100%); }
.fab-phone { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.fab-tooltip {
    position: absolute;
    right: 58px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fab-item:hover .fab-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 600px) {
    .fab-messenger-widget {
        bottom: 18px;
        right: 16px;
    }
    .fab-main-btn {
        width: 52px;
        height: 52px;
    }
    .fab-item {
        width: 44px;
        height: 44px;
    }
    .fab-tooltip {
        display: none;
    }
}
