/* Custom Stylesheet for Reverevol Header & Footer */

:root {
    --rev-primary: #6366f1;
    /* Indigo */
    --rev-primary-hover: #4f46e5;
    --rev-text-main: #1f2937;
    /* Dark Gray */
    --rev-text-muted: #6b7280;
    --rev-bg-glass: rgba(255, 255, 255, 0.85);
    --rev-border-glass: rgba(229, 231, 235, 0.6);
    --rev-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    --rev-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header Container */
.rev-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--rev-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rev-border-glass);
    box-shadow: var(--rev-shadow);
    transition: var(--rev-transition);
}

.rev-header__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.rev-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.rev-logo__text {
    font-size: 22px;
    font-weight: 800;
    color: var(--rev-text-main);
    letter-spacing: -0.5px;
}

.rev-logo__accent {
    color: var(--rev-primary);
}

.rev-logo__tag {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.1);
    color: var(--rev-primary);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Navigation Menu */
.rev-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.rev-nav__link {
    font-size: 15px;
    font-weight: 500;
    color: var(--rev-text-main);
    text-decoration: none;
    position: relative;
    padding: 8px 0;
    transition: var(--rev-transition);
}

.rev-nav__link:hover {
    color: var(--rev-primary);
}

.rev-nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--rev-primary);
    transition: var(--rev-transition);
}

.rev-nav__link:hover::after {
    width: 100%;
}

.rev-nav__link--active {
    color: var(--rev-primary);
}

.rev-nav__link--active::after {
    width: 100%;
}

/* Region Selector Dropdown */
.rev-region {
    position: relative;
    font-family: 'Inter', sans-serif;
}

.rev-region__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--rev-border-glass);
    padding: 8px 14px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rev-text-main);
    cursor: pointer;
    transition: var(--rev-transition);
}

.rev-region__btn:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.rev-region__arrow {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: var(--rev-transition);
}

.rev-region:hover .rev-region__arrow {
    transform: rotate(180deg);
}

.rev-region__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--rev-border-glass);
    border-radius: 16px;
    padding: 8px;
    width: 260px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--rev-transition);
    z-index: 1010;
}

.rev-region:hover .rev-region__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rev-region__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 10px;
    transition: var(--rev-transition);
}

.rev-region__row:hover {
    background: rgba(99, 102, 241, 0.04);
}

.rev-region__country {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--rev-text-main);
}

.rev-region__langs {
    display: flex;
    gap: 6px;
}

.rev-lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--rev-text-muted);
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
    transition: var(--rev-transition);
}

.rev-lang-badge:hover {
    background: rgba(99, 102, 241, 0.15);
    color: var(--rev-primary);
}

.rev-lang-badge.active {
    background: var(--rev-primary);
    color: #ffffff;
}

/* Flags styling using CSS gradients/representation (fallback for images) */
.rev-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: inline-block;
    flex-shrink: 0;
}

.rev-flag--ru {
    background: linear-gradient(to bottom, #fff 33.3%, #0039a6 33.3%, #0039a6 66.6%, #d52b1e 66.6%);
}

.rev-flag--kz {
    background: #00afca;
    position: relative;
}

/* Gold sun emblem in actual flag */
.rev-flag--by {
    background: linear-gradient(to bottom, #e02424 66.6%, #31985a 66.6%);
    border-left: 3px solid #e02424;
}

.rev-flag--ge {
    background: #fff;
    position: relative;
    border: 1px solid #eee;
}

/* White with red crosses */
.rev-flag--tr {
    background: #e30a17;
    position: relative;
}

/* Red with white crescent */

/* Right contacts section */
.rev-contacts {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rev-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--rev-text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--rev-transition);
}

.rev-phone:hover {
    color: var(--rev-primary);
}

.rev-phone__dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: rev-pulse 2s infinite;
}

@keyframes rev-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.rev-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--rev-border-glass);
    color: var(--rev-text-muted);
    transition: var(--rev-transition);
}

.rev-social-btn:hover {
    color: #fff;
    transform: translateY(-2px);
}

.rev-social-btn--tg:hover {
    background-color: #229ed9;
    border-color: #229ed9;
}

.rev-social-btn--wa:hover {
    background-color: #25d366;
    border-color: #25d366;
}

/* Custom Footer styles */
.rev-footer {
    background: #0f172a;
    /* Slate 900 */
    color: #f8fafc;
    padding: 64px 0 32px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Inter', sans-serif;
}

.rev-footer__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.rev-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width: 768px) {
    .rev-footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .rev-header__container {
        padding: 0 16px;
    }

    .rev-nav {
        display: none;
        /* Mobile menu can toggle */
    }
}

.rev-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rev-footer__logo {
    color: #fff;
}

.rev-footer__desc {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

.rev-footer__title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.rev-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rev-footer__link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: var(--rev-transition);
}

.rev-footer__link:hover {
    color: #fff;
    padding-left: 4px;
}

.rev-footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rev-footer__contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #94a3b8;
}

.rev-footer__contact-item a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.rev-footer__socials {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.rev-footer__bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #64748b;
}

@media (max-width: 640px) {
    .rev-footer__bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* SEO Text Block in Footer */
.rev-seo-text {
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 32px;
}

.rev-seo-text h1,
.rev-seo-text h2,
.rev-seo-text h3 {
    color: #fff;
    margin-bottom: 12px;
    font-family: 'Outfit', sans-serif;
}

.rev-seo-text p {
    margin-bottom: 16px;
}

.rev-seo-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Interactive Demo Viewer (Device Simulator)
   ========================================================================== */
.demo-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: #0f0f11;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, sans-serif;
    color: #ffffff;
}

.demo-viewer-header {
    height: 60px;
    background: #18181c;
    border-bottom: 1px solid #282830;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.demo-viewer-title {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
    max-width: 30%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Device Selectors */
.demo-viewer-devices {
    display: flex;
    background: #0f0f11;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #282830;
}

.demo-device-btn {
    background: transparent;
    border: none;
    color: #71717a;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.demo-device-btn:hover {
    color: #e2e8f0;
}

.demo-device-btn.active {
    background: #282830;
    color: #38bdf8;
    /* Accent light blue */
}

/* Action Controls */
.demo-viewer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.demo-action-btn {
    background: #282830;
    border: 1px solid #3f3f46;
    color: #a1a1aa;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.demo-action-btn:hover {
    background: #3f3f46;
    color: #ffffff;
    border-color: #52525b;
}

.demo-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
}

/* Viewer Body & Simulator Frames */
.demo-viewer-body {
    flex-grow: 1;
    background: #09090b;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow: hidden;
}

.demo-iframe-container {
    position: relative;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.4s ease,
        border 0.4s ease;
    overflow: hidden;
}

.demo-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

/* Size Classes */
.demo-iframe-container.desktop {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
}

.demo-iframe-container.tablet {
    width: 768px;
    height: 100%;
    max-height: 900px;
    border-radius: 24px;
    border: 12px solid #18181c;
}

.demo-iframe-container.mobile {
    width: 375px;
    height: 100%;
    max-height: 780px;
    border-radius: 36px;
    border: 14px solid #18181c;
}

/* Sidebar for pages */
.demo-viewer-sidebar {
    width: 240px;
    height: 100%;
    background: #121214;
    border-right: 1px solid #282830;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.demo-sidebar-title {
    padding: 16px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #71717a;
    font-weight: 700;
    border-bottom: 1px solid #1f1f23;
}

.demo-sidebar-list {
    display: flex;
    flex-direction: column;
}

.demo-sidebar-item {
    padding: 14px 20px;
    font-size: 13px;
    color: #a1a1aa;
    background: transparent;
    border: none;
    border-bottom: 1px solid #1f1f23;
    border-left: 3px solid transparent;
    text-align: left;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    font-weight: 500;
}

.demo-sidebar-item:hover {
    background: #18181c;
    color: #ffffff;
}

.demo-sidebar-item.active {
    background: #1f1f23;
    color: #38bdf8;
    border-left-color: #38bdf8;
}

/* Make sure container has room and centers correctly with sidebar */
.demo-viewer-body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.demo-iframe-workspace {
    flex-grow: 1;
    background: #09090b;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.demo-iframe-container {
    position: relative;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.4s ease,
        border 0.4s ease;
    overflow: hidden;
}

/* Size Classes */
.demo-iframe-container.desktop {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
}

.demo-iframe-container.tablet {
    width: 768px;
    height: 100%;
    max-height: 90%;
    border-radius: 24px;
    border: 12px solid #18181c;
}

.demo-iframe-container.mobile {
    width: 375px;
    height: 100%;
    max-height: 90%;
    border-radius: 36px;
    border: 14px solid #18181c;
}

/* --- Projects Shortcode Styles --- */
.projects-shortcode-wrapper {
    margin: 30px 0;
    width: 100%;
}

.projects-shortcode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.project-shortcode-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    color: #333333;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.3s ease;
}

.project-shortcode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #d1d1d1;
    color: #000000;
}

.project-shortcode-card__img-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f7;
}

.project-shortcode-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-shortcode-card:hover .project-shortcode-card__image {
    transform: scale(1.05);
}

.project-shortcode-card__content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
}

.project-shortcode-card__title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #1d1d1f;
}

.project-shortcode-card__desc {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #86868b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-shortcode-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid #f1f1f4;
}

.project-shortcode-card__more {
    font-weight: 600;
    font-size: 14px;
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-shortcode-card__more:hover {
    color: #4f46e5;
}

.project-shortcode-card__demo {
    background: #0f0f11;
    color: #38bdf8;
    border: 1px solid #282830;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.project-shortcode-card__demo:hover {
    background: #18181c;
    color: #ffffff;
    border-color: #38bdf8;
}

@media (max-width: 600px) {
    .projects-shortcode-grid {
        grid-template-columns: 1fr;
    }
}