:root {
    color-scheme: light only;
    forced-color-adjust: none;
    --bg-color: #F3F2EE;
    --text-color: #2D2D2D;
    --text-light: #666666;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.6);
    --pill-bg: rgba(255, 255, 255, 0.7);
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --border-radius-lg: 32px;
    --border-radius-md: 32px;
    --border-radius-pill: 50px;
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.05);
}

/* Force light theme colors even if the user has a system-wide dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #F3F2EE;
        --text-color: #2D2D2D;
        --text-light: #666666;
        --glass-bg: rgba(255, 255, 255, 0.4);
        --glass-border: rgba(255, 255, 255, 0.6);
        --pill-bg: rgba(255, 255, 255, 0.7);
        --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.05);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar for Chrome, Safari and Opera globally */
::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--font-primary);
    /* Хак против MIUI и Samsung: используем SVG картинку вместо цвета */
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='%23F3F2EE'/%3E%3C/svg%3E") !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-color: #F3F2EE !important; /* Фолбэк */
    color: #2D2D2D !important;
    line-height: 1.5;
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
}

@media (min-width: 951px) {
    body {
        zoom: 0.95; /* Scale down desktop version to fit more content */
    }
    .hero-image-wrapper, .video-modal, .modal, .preloader {
        zoom: 1.05263; /* Revert scale to 1.0 (1 / 0.95) */
        width: 100vw !important;
    }
    .hero-content {
        align-self: center;
        margin-top: 0;
        margin-bottom: 20vh;
    }
    .hero-action {
        margin-bottom: 0;
    }
    .video-modal, .modal, .preloader {
        height: 100vh !important;
    }
}

a {
    text-decoration: none;
    color: inherit;
}

/* Remove default browser focus outline (black ring after closing modals) */
a:focus,
button:focus,
.btn-primary:focus,
.pill:focus {
    outline: none;
}



/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-soft);
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #EAEAEA;
    padding: clamp(8px, 0.8vw, 11px) clamp(16px, 1.6vw, 23px);
    border-radius: 100px;
    font-size: clamp(14px, 1.1vw, 15px);
    font-weight: 500;
    color: #4A4A4A;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pill:hover {
    background-color: #D5D5D5 !important;
    color: #4A4A4A !important;
}

.pill.active {
    background: #EAEAEA;
    border-color: transparent;
}

/* Active state only for portfolio filter pills */
.portfolio-filters .pill.active {
    background: #DCDCDC;
}

.pill.outline {
    background: transparent;
    border: 1px solid #D5D5D5;
}

.pill.outline:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #4A4A4A !important;
}

.mobile-only-pill {
    display: none !important;
}

.pill-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.pill-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: -20px;
    transform: translateY(-10px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: max-content;
    max-width: 95vw;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.pill-dropdown-wrapper.open .pill-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Right-aligned contacts dropdown — prevent overflow off right edge */
.contacts-dropdown-right {
    left: auto;
    right: -12px;
}

.pill-dropdown-wrapper.open .pill-dropdown-toggle i {
    transform: rotate(180deg);
}

.pill-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sub-pill-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-pill-container.open {
    max-height: 150px;
    opacity: 1;
    margin-top: 8px;
}

.pill-dropdown-menu .pill {
    white-space: nowrap;
    width: auto;
    font-size: 14px;
    padding: 8px 16px;
}

.pill.sub-dropdown-toggle.open i {
    transform: rotate(180deg);
}

.pill-dropdown-menu .pill.sub-pill {
    font-size: 13px;
    padding: 6px 14px;
    opacity: 0.9;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 35px 40px;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.logo {
    display: flex;
    gap: 5px;
}

.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo {
    height: clamp(30px, 2.8vw, 45px);
    mix-blend-mode: darken;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.custom-logo:hover {
    transform: scale(1.05);
}

/* Original circles kept for fallback if needed */
.logo-circle {
    width: clamp(32px, 2.5vw, 35px);
    height: clamp(32px, 2.5vw, 35px);
    background: #fff;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: clamp(14px, 1.2vw, 17px);
    border: 1px solid rgba(0,0,0,0.1);
}

.site-logo-img {
    width: clamp(45px, 4vw, 55px);
    height: auto;
    transition: transform 0.3s ease;
}

.custom-logo-link:hover .site-logo-img {
    transform: scale(1.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-pills {
    display: flex;
    gap: 10px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}


.social-icons {
    display: flex;
    gap: 8px;
}

.icon-circle {
    width: clamp(32px, 2.5vw, 35px);
    height: clamp(32px, 2.5vw, 35px);
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    color: var(--text-light);
    font-size: clamp(14px, 1.1vw, 15px);
}

.icon-circle:hover {
    background: #fff;
    transform: translateY(-2px);
    color: var(--text-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: clamp(140px, 10vw, 180px) 0 clamp(60px, 7vw, 100px);
    width: 100%;
    min-height: clamp(600px, 90vh, 950px);
    position: relative;
    z-index: 1; /* Establish stacking context below header */
}

.hero-content {
    flex: 1;
    max-width: clamp(300px, 35vw, 600px);
    margin-left: 0;
    margin-top: clamp(40px, 5vw, 80px);
    z-index: 2;
    transition: transform 0.1s ease-out;
}

.subtitle {
    font-size: clamp(16px, 1.5vw, 22px);
    font-weight: 400;
    color: #7A7A7A;
    margin-bottom: clamp(5px, 0.6vw, 9px);
}

.title {
    font-size: clamp(36px, 5.0vw, 70px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: clamp(20px, 3vw, 42px);
    color: #4A4A4A;
}

.experience {
    font-size: clamp(14px, 1.3vw, 18px);
    font-weight: 400;
    color: #666;
    margin-bottom: clamp(15px, 1.8vw, 25px);
}

.description {
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 400;
    color: #7A7A7A;
    line-height: 1.6;
    max-width: clamp(240px, 20vw, 280px);
}

.hero-image-wrapper {
    position: absolute;
    left: 50%;
    top: 0;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 75%;
    image-rendering: auto;
    mix-blend-mode: multiply;
    transform: translate3d(0, 0, 0) scale(1.05);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.1s ease-out;
}

.hero-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    z-index: 2;
    max-width: clamp(300px, 35vw, 500px);
    transition: transform 0.1s ease-out;
}

.btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: clamp(16px, 1.8vw, 25px) clamp(32px, 3.5vw, 49px);
    background: #F2F2F2;
    border: none;
    border-radius: 100px;
    font-size: clamp(18px, 1.9vw, 27px);
    font-weight: 500;
    color: #4A4A4A;
    transition: all 0.3s ease;
    margin-bottom: clamp(8px, 0.9vw, 13px);
    white-space: nowrap;
}

.btn-primary:hover {
    background: #D5D5D5;
}

.action-subtext {
    font-size: clamp(14px, 1.3vw, 19px);
    color: #888;
    text-align: center;
    margin-bottom: 0;
}

.scroll-down {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(8px, 0.9vw, 13px);
    font-size: clamp(16px, 1.8vw, 25px);
    font-weight: 400;
    color: #666;
}

.long-arrow {
    display: inline-block;
    width: 80px;
    height: 1px;
    background-color: #666;
    position: relative;
    transform: translateY(-2px);
}

.long-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 8px;
    height: 8px;
    border-top: 1px solid #666;
    border-right: 1px solid #666;
    transform: rotate(45deg);
}

/* Marquee */
.marquee-container {
    background: #999999;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    border: none;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
    font-size: clamp(12px, 1vw, 16px);
    font-weight: 400;
    color: #FFFFFF;
}

.marquee-content span {
    margin: 0 5px;
}

.separator {
    margin: 0 15px !important;
    opacity: 0.5;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.portfolio-page {
    padding-top: 150px;
    padding-bottom: 30px;
    position: relative;
    min-height: 100vh;
    z-index: 1;
}

.portfolio-page .description {
    max-width: 100%;
}

/* Portfolio Filters & Logic */
.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    position: relative;
    margin-bottom: 40px;
}

.container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.portfolio-subfilters {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-subfilters.open {
    max-height: 60px;
    opacity: 1;
    margin-top: 10px;
    margin-bottom: 40px;
}

.portfolio-subfilters .pill {
    font-size: 13px;
    padding: 6px 16px;
}

@media (max-width: 950px) {
    .portfolio-filters {
        justify-content: center;
    }
    .portfolio-subfilters {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Portfolio filter transition (merged — opacity restored) */

.portfolio-item.hidden-item {
    display: none !important;
}

/* Skip rendering of inactive project modals */
.project-modal:not(.active) {
    content-visibility: hidden;
}

/* Portfolio Hover Effects */
.portfolio {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px 0;
}

.portfolio-category {
    margin-bottom: clamp(30px, 4vw, 60px);
}

.portfolio-category:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    gap: 30px;
    margin-bottom: clamp(30px, 4vw, 60px);
    align-items: flex-start;
    justify-content: flex-start;
}

.tags {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.category-desc {
    font-size: clamp(14px, 1.1vw, 16px);
    color: var(--text-light);
    max-width: 600px;
    line-height: 1.5;
    margin-top: 5px;
}

.grid-2d {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2d .col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-6 {
    grid-template-columns: repeat(6, 1fr);
}



.grid-1 {
    grid-template-columns: 1fr;
}

.portfolio-item {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.5s ease;
    backface-visibility: hidden;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 9:16 aspect ratio — portfolio grid + project modals (default) */
.grid-2 .portfolio-item img,
.grid-3 .portfolio-item img,
.grid-4 .portfolio-item img,
.grid-6 .portfolio-item img,
.portfolio-page-grid .portfolio-item img,
.project-modal-grid .portfolio-item img,
.project-modal-grid > img {
    aspect-ratio: 9/16;
    object-fit: cover;
}

/* 16:9 aspect ratio — horizontal orientation override */
.portfolio-page-grid .portfolio-item.horizontal img {
    aspect-ratio: 16/9;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Video play overlay — always visible on video cards */
.portfolio-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.portfolio-play-overlay i {
    color: #fff;
    font-size: 20px;
    margin-left: 3px; /* optical centering for play icon */
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-play-overlay {
    background: rgba(0, 0, 0, 0.6);
    transform: translate(-50%, -50%) scale(1.15);
}

.portfolio-item:hover .portfolio-play-overlay i {
    transform: scale(1.1);
}

.portfolio-item.is-playing .portfolio-play-overlay {
    opacity: 0 !important;
    pointer-events: none;
}

/* Video thumbnails inside project modals */
.grid-video-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.grid-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.grid-video-play-btn i {
    color: #fff;
    font-size: 18px;
    margin-left: 2px;
}

.grid-video-thumb:hover .grid-video-play-btn {
    background: rgba(0, 0, 0, 0.6);
    transform: translate(-50%, -50%) scale(1.15);
}

/* AI Grid specific */
.ai-grid 

.ai-grid .center-col .portfolio-item {
    aspect-ratio: 1 / 1;
    width: 100%;
}

.ai-grid .center-col .portfolio-item img {
    object-position: center 15%;
}

.info-card {
    padding: 20px 40px;
    text-align: center;
    background: #EAEAEA;
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-card h4 {
    font-size: clamp(20px, 1.8vw, 24px);
    font-weight: 500;
    color: #4A4A4A;
    margin-bottom: 15px;
}

.info-card p {
    font-size: clamp(14px, 1.1vw, 16px);
    color: var(--text-light);
    line-height: 1.5;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: break-word;
}

/* Fashion Grid */
.grid-fashion {
    grid-template-columns: 1fr 1fr 2fr;
    gap: 20px;
}

.grid-fashion .col-left, .grid-fashion .col-mid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grid-fashion .col-right {
    display: flex;
}

.grid-fashion .large {
    height: 100%;
}

.footer {
    max-width: 1408px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(40px, 5vw, 60px) 40px clamp(30px, 4vw, 60px);
}

.footer-skills {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 60px;
}

.skills-text {
    padding: 30px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skills-text p {
    margin-bottom: 5px;
    font-size: clamp(13px, 1.1vw, 15px);
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(40px, 6vw, 85px);
}

.footer-avatar {
    width: clamp(240px, 22vw, 360px);
    border-radius: clamp(20px, 2.5vw, 35px);
    object-fit: cover;
}

.footer-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-action .btn-primary {
    font-size: clamp(20px, 2.2vw, 30px);
    padding: clamp(18px, 2vw, 24px) clamp(36px, 4vw, 54px);
}

.footer-socials {
    margin-top: 30px;
    justify-content: center;
}

.glass-btn {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: var(--shadow-soft);
}

/* Modal styles */
.video-modal, .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.body-no-scroll, .body-no-scroll body {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

.modal, .video-modal, .modal-content, .prices-modal-content, .about-modal-content {
    overscroll-behavior: contain !important;
}

.video-modal.active, .modal.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(235, 234, 229, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-content {
    position: relative;
    z-index: 1001;
    width: 95%;
    max-width: 1600px;
    padding: 15px;
    border-radius: var(--border-radius-lg);
    transform: scale(0.95);
    transition: transform 0.4s ease;
}

.video-modal.active .modal-content, .modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1A1A1A;
    border: none;
    box-shadow: none;
    cursor: pointer;
    font-size: 18px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    transition: all 0.3s ease;
    z-index: 1002;
}

.close-modal:hover {
    background: #000;
    transform: rotate(90deg);
}

/* Match main page close button style for Project Modal on Desktop */
@media (min-width: 951px) {
    .project-modal-content .close-modal,
    .brief-modal-content .close-modal,
    .prices-modal-content .close-modal,
    .about-modal-content .close-modal {
        width: 40px;
        height: 40px;
        font-size: 18px;
        background: rgba(255, 255, 255, 0.8) !important;
        color: #000 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    .project-modal-content .close-modal:hover,
    .brief-modal-content .close-modal:hover,
    .prices-modal-content .close-modal:hover,
    .about-modal-content .close-modal:hover {
        background: #fff !important;
        color: #000 !important;
    }
}

/* Minimalist close button for Contacts Modal */
#contactsModal .close-modal {
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: transparent;
    box-shadow: none;
    font-size: 20px;
    color: #999;
}
#contactsModal .close-modal:hover {
    background: transparent;
    color: #333;
    transform: scale(1.1);
}

.video-wrapper {
    width: 100%;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    /* Убираем жесткий aspect-ratio, чтобы видео подстраивалось */
    max-height: 85vh;
}

/* ==========================================================================
   PRICES SECTION (ACCORDION MODAL)
   ========================================================================== */
.prices-modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    padding: 50px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* Фикс для крестика: так как контейнер со скроллом, позиционируем крестик внутри */
.prices-modal-content .close-modal {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.prices-modal-content .close-modal:hover {
    background: #fff;
    color: #000;
}

/* Скрываем скроллбар для красоты, но оставляем скролл */
.prices-modal-content::-webkit-scrollbar {
    width: 6px;
}
.prices-modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.prices-modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.accordion-item {
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

.accordion-header {
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.2);
}

.accordion-header h3 {
    margin: 0;
    font-size: clamp(16px, 1.3vw, 20px);
    font-weight: 500;
    color: var(--text-color);
}

.accordion-header i {
    font-size: 16px;
    color: var(--text-light);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 30px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.1);
}

.accordion-item.active .accordion-content {
    max-height: 800px; /* Достаточно большое значение для содержимого */
    padding: 0 30px 30px 30px;
    opacity: 1;
}

.price-subheader {
    margin: 20px 0 10px 0;
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 5px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.price-row:last-child {
    border-bottom: none;
}

.price-name {
    font-size: clamp(14px, 1.1vw, 17px);
    color: var(--text-color);
    flex: 1;
    padding-right: 20px;
}

.price-value {
    font-size: clamp(14px, 1.1vw, 17px);
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

@media (max-width: 950px) {
    .prices-modal-content {
        padding: 30px 20px;
        width: 95%;
    }
    .accordion-header {
        padding: 18px 20px;
    }
    .accordion-header h3 {
        font-size: 18px;
    }
    .accordion-content {
        padding: 0 20px;
    }
    .accordion-item.active .accordion-content {
        padding: 0 20px 20px 20px;
    }
    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .price-name {
        padding-right: 0;
    }
    .price-value {
        align-self: flex-start;
        color: #666;
    }
}

/* ==========================================================================
   PORTFOLIO SECTION
   ========================================================================== */

.video-wrapper video {
    width: 100%;
    height: 100%;
    max-height: 85vh;
    object-fit: contain; /* Чтобы видео не обрезалось */
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-content, .hero-action {
        max-width: 100%;
        align-items: center;
        margin-left: 0;
    }
    
    .hero-image-wrapper {
        position: relative;
        transform: none;
        left: auto;
        top: auto;
        width: 80%;
        margin: 40px 0;
    }

    .action-subtext {
        text-align: center;
    }
    
    /* Scale down hero typography on tablet */
    .title {
        font-size: 64px;
        margin-bottom: 30px;
    }
    .subtitle {
        font-size: 22px;
    }
    .experience {
        font-size: 18px;
    }

    /* Collapsing navigation header at 1024px */
    .header-actions .pill {
        display: none;
    }
    
    .header-socials {
        display: none !important;
    }
    
    .header {
        padding: 25px 28px;
    }
    
    .nav-pills {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        position: absolute;
        top: 65px;
        left: 0;
        width: 100%;
        height: auto !important;
        max-height: calc(100vh - 65px);
        overflow-y: auto;
        background: rgba(245, 243, 240, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 12px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        box-shadow: 0 4px 20px rgba(0,0,0,0.06);
        gap: 2px;
        z-index: 1001;
    }

    .nav-pills .pill,
    .nav-pills .pill-dropdown-wrapper .pill {
        width: 100%;
        justify-content: flex-start;
        background: rgba(255, 255, 255, 0.9) !important;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 12px;
    }

    .nav-pills .pill:hover,
    .nav-pills .pill:active {
        background: rgba(255, 255, 255, 1) !important;
    }

    /* Active pill in mobile nav — same white bg, bold text */
    .nav-pills .pill.active {
        background: rgba(255, 255, 255, 0.9) !important;
        font-weight: 600;
    }

    .nav-pills .pill-dropdown-wrapper {
        width: 100%;
    }

    .nav-pills .pill-dropdown-menu {
        position: static;
        width: 100%;
        max-width: 100%;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,0.02);
        border-radius: 12px;
        margin-top: 4px;
        padding: 8px;
        /* Override desktop opacity/visibility with display */
        display: none !important;
        opacity: 1;
        visibility: visible;
        border: none;
    }

    .nav-pills .pill-dropdown-wrapper.open .pill-dropdown-menu {
        display: flex !important;
    }

    .nav-pills .pill-dropdown-menu .pill-row {
        flex-direction: column;
        gap: 4px;
    }

    .nav-pills .pill-dropdown-menu .pill {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .nav-pills.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-only-pill {
        display: inline-flex !important;
    }
    
    .pill-dropdown-wrapper.mobile-only-pill {
        display: inline-block !important;
    }
}

@media (max-width: 950px) {
    .grid-3, .grid-fashion {
        grid-template-columns: 1fr;
    }
    
    .footer-skills {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-action {
        align-items: center;
    }
    
    /* Scale down hero typography and buttons on mobile */
    .title {
        font-size: 40px;
        margin-bottom: 20px;
    }
    .subtitle {
        font-size: 18px;
        margin-bottom: 5px;
    }
    .experience {
        font-size: 16px;
        margin-bottom: 20px;
    }
    .description {
        font-size: 14px;
    }
    .btn-primary {
        padding: 16px 32px;
        font-size: 18px;
    }
    .pill {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Flow dropdown statically to wrap links and fit container width on mobile */
    .pill-dropdown-menu {
        position: static;
        width: 100%;
        max-width: 100%;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.2);
        margin-top: 10px;
        padding: 10px;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #EAEAEA;
    color: #4A4A4A;
    border: none;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #D5D5D5;
    transform: translateY(-5px);
}



/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #F2F2F2;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.preloader-content {
    text-align: center;
}

.preloader-title {
    font-size: 48px;
    font-weight: 500;
    color: #4A4A4A;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.preloader-subtitle {
    font-size: 20px;
    color: #7A7A7A;
    margin-bottom: 30px;
}

.progress-bar-container {
    width: 300px;
    height: 4px;
    background: #EAEAEA;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 15px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #4A4A4A;
    transition: width 0.1s linear;
}

.progress-text {
    font-size: 14px;
    color: #7A7A7A;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

body.loading {
    overflow: hidden;
}

.preloader.fade-out {
    opacity: 0;
    transform: translateY(-40px);
    pointer-events: none;
}

/* Inline Video Styles */
.inline-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    background: transparent;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none; /* Клики проходят сквозь видео на карточку */
    border-radius: inherit;
}

/* Fix for fullscreen cropping bug in some browsers */
.inline-video:fullscreen {
    object-fit: contain !important;
    background: #000;
}

.inline-video:-webkit-full-screen {
    object-fit: contain !important;
    background: #000;
}

/* On vertical mobile screens, stretch slightly to cover the black bars */
@media (max-aspect-ratio: 1/1) {
    .inline-video:fullscreen {
        object-fit: cover !important;
    }
    .inline-video:-webkit-full-screen {
        object-fit: cover !important;
    }
}

/* MOBILE HERO TEXT OVERLAP FIX */
@media (max-width: 1024px) {
    .hero {
        padding-top: 75px !important; /* Move text higher */
    }
}

.portfolio-item.is-playing .inline-video {
    opacity: 1;
}

.inline-fullscreen-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    z-index: 15;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item.is-playing:hover .inline-fullscreen-btn {
    opacity: 1;
}

.inline-fullscreen-btn:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* Custom Smart Animations */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: transform, opacity;
}

[data-aos="fade-up"].is-hidden-top {
    transform: translateY(-100px);
}

[data-aos="fade-up"].is-hidden-bottom {
    transform: translateY(100px);
}

[data-aos].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes preloaderPulse {
  0% { transform: scale(1); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
  50% { transform: scale(1.05); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }
  100% { transform: scale(1); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
}


/* ==========================================================================
   PROJECT MODAL (generated by builder.py)
   ========================================================================== */
.project-modal-content {
    max-width: 1200px;
    width: 95%;
    max-height: 95vh;
    padding: 40px;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 2000;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.project-modal-content::-webkit-scrollbar {
    display: none;
}

.project-modal-content--horizontal {
    max-width: 1600px;
}

.project-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #333;
    z-index: 20;
}

.project-modal-grid {
    margin-top: 20px;
    align-items: stretch;
}

.project-info-card {
    padding: 30px 22px;
    background: rgba(248, 247, 244, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: height 0.3s ease;
    border-radius: 12px;
}

.project-info-card h4 {
    font-size: clamp(17px, 1.4vw, 21px);
    margin-bottom: 10px;
    color: #333;
}

.project-info-card p {
    font-size: clamp(14px, 1.1vw, 16px);
    line-height: 1.6;
    color: #444;
    margin: 0;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: break-word;
}

.project-modal-grid img {
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.project-modal-grid img:hover {
    opacity: 0.88;
}

@media (max-width: 950px) {
    .project-modal-content {
        padding: 20px;
    }
    .project-modal-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Reviews Styles */
.review-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.review-avatar-placeholder { width: 50px; height: 50px; border-radius: 50%; background: #eee; display: flex; align-items: center; justify-content: center; color: #999; font-size: 20px; }
.swiper-pagination-bullet { background: #000; opacity: 0.2; }
.swiper-pagination-bullet-active { opacity: 0.6; }
.review-project-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 14px; margin-top: auto; padding: 8px 16px; border-radius: 20px; align-self: flex-start; }

/* Fix image modal overlapping */
#imageModal {
    z-index: 10005 !important;
}

/* Reviews swiper: fixed card size */
.reviewsSwiper .swiper-wrapper {
    align-items: flex-start;
}
.reviewsSwiper .swiper-slide {
    width: 350px !important;
    flex-shrink: 0;
    height: auto !important;
}
.reviewsSwiper .review-card {
    width: 350px;
    max-height: 600px;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 20px;
    border-radius: 16px;
    text-align: left;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
}
.review-cover-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}
.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.review-header h4 {
    font-size: 18px;
    margin: 0;
    color: #333;
}
.review-role {
    font-size: 14px;
    color: #666;
}
.review-quote-icon {
    margin-left: auto;
    font-size: 24px;
    color: #000;
    opacity: 0.1;
}
.review-text {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    flex-grow: 1;
    margin-bottom: 20px;
}


/* ==========================================================================
   BRIEF MODAL
   ========================================================================== */

.brief-modal-content {
    width: 92%;
    max-width: 820px;
    max-height: 92vh;
    padding: 50px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brief-modal-content:has(#briefServiceSelect.active) {
    max-width: 1120px;
}

.brief-modal-content .close-modal {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.brief-modal-content .close-modal:hover {
    background: #fff;
    color: #000;
}

.brief-modal-content::-webkit-scrollbar { width: 5px; }
.brief-modal-content::-webkit-scrollbar-track { background: transparent; }
.brief-modal-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }

/* Screens */
.brief-screen { display: none; width: 100%; }
.brief-screen.active { display: block; animation: briefFadeIn 0.35s ease; }

@keyframes briefFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Service Selection --- */
.brief-modal-title {
    font-size: clamp(28px, 2.4vw, 35px);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: -0.5px;
}

.brief-service-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.brief-service-card {
    padding: 28px 20px;
    border-radius: 22px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    min-height: 220px;
}

.brief-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.06);
}

.brief-service-card.selected {
    border-color: #4A4A4A;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.brief-service-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #F2F2F2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    color: #4A4A4A;
    transition: all 0.3s ease;
}

.brief-service-card:hover .brief-service-icon,
.brief-service-card.selected .brief-service-icon {
    background: #4A4A4A;
    color: white;
}

.brief-service-title {
    font-size: clamp(16px, 1.35vw, 19px);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.brief-service-desc {
    font-size: clamp(13px, 1.1vw, 15px);
    color: var(--text-light);
    line-height: 1.4;
}

/* Subtype selector */
.brief-subtype-selector {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,0.06);
    text-align: center;
    animation: briefFadeIn 0.3s ease;
}

.brief-subtype-title {
    font-size: clamp(17px, 1.4vw, 20px);
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 16px;
}

.brief-subtype-options {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.brief-subtype-btn {
    padding: 14px 28px !important;
    font-size: 15px !important;
    border-radius: 16px !important;
}

.brief-subtype-btn i { margin-right: 8px; }

/* --- Wizard --- */
.brief-wizard-header {
    margin-bottom: 30px;
}

.brief-back-link {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    font-family: var(--font-primary);
}

.brief-back-link:hover { color: var(--text-color); }

.brief-wizard-title {
    font-size: clamp(24px, 2.1vw, 30px);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.brief-progress {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brief-progress-track {
    flex: 1;
    height: 6px;
    background: #EAEAEA;
    border-radius: 10px;
    overflow: hidden;
}

.brief-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4A4A4A, #777);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.brief-step-indicator {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

/* --- Steps --- */
.brief-steps-container {
    min-height: 200px;
}

.brief-step {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.35s ease;
}

.brief-step.active {
    opacity: 1;
    transform: translateX(0);
}

.brief-step-title {
    font-size: clamp(20px, 1.8vw, 26px);
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* --- Form Fields --- */
.brief-field {
    margin-bottom: 22px;
}

.brief-label {
    display: block;
    font-size: clamp(15px, 1.25vw, 18px);
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

.brief-required { color: #c0392b; }

.brief-input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    font-size: clamp(16px, 1.35vw, 19px);
    font-family: var(--font-primary);
    background: rgba(255,255,255,0.6);
    color: var(--text-color);
    transition: all 0.25s ease;
    outline: none;
}

.brief-input:focus {
    border-color: #4A4A4A;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 0 0 3px rgba(74,74,74,0.08);
}

.brief-input.brief-error {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.brief-textarea {
    resize: vertical;
    min-height: 80px;
}

/* --- Options (Radio/Checkbox as pills) --- */
.brief-options-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.brief-option-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 50px;
    font-size: clamp(15px, 1.25vw, 17px);
    color: var(--text-color);
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.brief-option-pill input { display: none; }

.brief-option-pill:hover {
    border-color: rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.8);
}

.brief-option-pill.selected {
    background: #4A4A4A;
    color: white;
    border-color: #4A4A4A;
}

/* --- Navigation --- */
.brief-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,0.06);
    gap: 12px;
}

.btn-brief {
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-brief-outline {
    background: transparent;
    border: 1.5px solid rgba(0,0,0,0.12);
    color: var(--text-color);
}

.btn-brief-outline:hover {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.2);
}

.btn-brief-primary {
    background: #4A4A4A;
    color: white;
}

.btn-brief-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-brief-primary:disabled {
    opacity: 0.6;
    pointer-events: none;
}

.btn-brief-submit-style {
    background: linear-gradient(135deg, #4A4A4A, #666);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* --- Success Screen --- */
.brief-success-content {
    text-align: center;
    padding: 60px 20px;
}

.brief-success-icon {
    font-size: 64px;
    margin-bottom: 24px;
    animation: briefBounce 0.6s ease;
}

@keyframes briefBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.brief-success-content h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.brief-success-content p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Shake Animation --- */
@keyframes briefShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.brief-shake { animation: briefShake 0.5s ease; }


/* --- Header Pills styling (all pages) --- */
.header .pill {
    background-color: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header .pill:hover {
    background-color: #EAEAEA !important;
}

/* --- Responsive --- */
@media (max-width: 950px) {
    .brief-modal-content {
        padding: 30px 20px;
        width: 96%;
        max-height: 95vh;
    }
    .brief-service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .brief-service-card { 
        padding: 20px 14px; 
        min-height: 170px;
    }
    .brief-service-icon { width: 44px; height: 44px; font-size: 18px; }
    .brief-service-title { font-size: 13px; }
    .brief-service-desc { font-size: 11px; }
    .brief-modal-title { font-size: 22px; margin-bottom: 20px; }
    .brief-wizard-title { font-size: 20px; }
    .brief-step-title { font-size: 18px; }
    .brief-option-pill { padding: 8px 14px; font-size: 13px; }
    .btn-brief { padding: 12px 20px; font-size: 14px; }
    .brief-nav { flex-direction: column; }
    .brief-nav .btn-brief { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .brief-service-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .brief-service-card {
        flex-direction: row;
        align-items: center;
        padding: 12px 16px;
        min-height: auto;
    }
    .brief-service-icon {
        margin: 0 14px 0 0;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    .brief-service-text {
        text-align: left;
    }
    .brief-service-title {
        font-size: 14px;
        margin-bottom: 2px;
    }
    .brief-service-desc {
        font-size: 11px;
    }
}

/* =============================================================================
   REFACTORED COMPONENT STYLES (extracted from inline styles)
   ============================================================================= */

/* --- Logo --- */
.logo {
    text-decoration: none;
    cursor: pointer;
}

/* --- Dropdown chevron icon --- */
.dropdown-chevron {
    margin-left: 6px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* --- Contacts Dropdown --- */
.contacts-dropdown-menu {
    padding: 16px;
}

.contacts-list {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 220px;
    display: flex;
}
.contact-link {
    justify-content: flex-start;
    padding: 10px 20px;
}
.contact-icon {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}
.contact-icon-lg {
    font-size: 20px;
}
.phone-text {
    font-weight: 600;
}

/* --- Image Modal --- */
.image-modal-content {
    background: transparent;
    box-shadow: none;
    border: none;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.image-modal-close {
    top: 20px;
    right: 20px;
}
.image-modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.galleryLightboxSwiper {
    width: 100%;
    height: 100%;
}
.galleryLightboxSwiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}
.galleryLightboxSwiper .swiper-button-next,
.galleryLightboxSwiper .swiper-button-prev {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .galleryLightboxSwiper .swiper-button-next::after,
    .galleryLightboxSwiper .swiper-button-prev::after {
        font-size: 20px !important;
    }
    .galleryLightboxSwiper .swiper-button-next,
    .galleryLightboxSwiper .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
}
.galleryLightboxSwiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}
.galleryLightboxSwiper .swiper-pagination-bullet-active {
    opacity: 1;
}
.galleryLightboxSwiper .swiper-slide video,
.galleryLightboxSwiper .swiper-slide .lightbox-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    outline: none;
}

/* Video thumbnail in project modal grid */
.grid-video-thumb {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
}
.grid-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    pointer-events: none;
}
.grid-video-play-btn i {
    margin-left: 3px; /* optical centering for play triangle */
}
.grid-video-thumb:hover .grid-video-play-btn {
    background: rgba(0, 0, 0, 0.75);
    transform: translate(-50%, -50%) scale(1.1);
}

/* --- About Modal --- */
.about-modal-content {
    max-width: 1000px;
    padding: 60px;
    display: flex;
    gap: 50px;
    align-items: flex-start;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.about-modal-photo {
    flex: 1;
    text-align: center;
}
.about-photo {
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: all 0.5s ease;
}
.about-photo:hover {
    transform: scale(1.03);
    box-shadow: 0 25px 45px rgba(0,0,0,0.2);
}
.about-modal-text {
    flex: 1.5;
}
.about-modal-title {
    font-size: clamp(32px, 2.8vw, 40px);
    font-weight: 500;
    color: #333;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.about-modal-paragraph {
    font-size: clamp(14px, 1.1vw, 16px);
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}
.about-modal-paragraph--last {
    margin-bottom: 30px;
}
.about-modal-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.about-pill {
    background: rgba(255,255,255,0.7);
    pointer-events: none;
    font-size: 13px;
}
.about-pill i {
    margin-right: 6px;
}

/* --- Portfolio Page (replaces inline styles) --- */
.portfolio-page .portfolio-blob {
    position: absolute;
    filter: blur(60px);
    z-index: -1;
    border-radius: 50%;
}
.portfolio-blob--top {
    top: 10%;
    left: 5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(180, 190, 210, 0.4) 0%, rgba(245, 245, 245, 0) 70%);
}
.portfolio-blob--bottom {
    bottom: 10%;
    right: 5%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(220, 200, 190, 0.4) 0%, rgba(245, 245, 245, 0) 70%);
}
.portfolio-page .container {
    max-width: 1408px;
    margin: 0 auto;
    padding: 0 40px;
}
.portfolio-page .title {
    margin-bottom: 10px;
    text-align: left;
    font-size: clamp(48px, 6vw, 80px);
}
.portfolio-page .description {
    margin-bottom: 50px;
    font-size: 18px;
}
.portfolio-page .portfolio-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* --- Video Play Overlay on Portfolio Cards --- */
.portfolio-item--video {
    position: relative;
}
.portfolio-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 2;
}
.portfolio-play-overlay i {
    margin-left: 3px; /* optical centering for play triangle */
}
.portfolio-item--video:hover .portfolio-play-overlay {
    background: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.1);
}
.portfolio-item--video.is-playing .portfolio-play-overlay {
    opacity: 0;
}

/* --- Reviews Page --- */
.reviews-section {
    padding: 150px 0 20px;
    min-height: auto;
    position: relative;
    z-index: 1;
}
.reviews-blob {
    position: absolute;
    filter: blur(60px);
    z-index: -1;
    border-radius: 50%;
}
.reviews-blob--top {
    top: 10%;
    left: 5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(180, 190, 210, 0.4) 0%, rgba(245, 245, 245, 0) 70%);
}
.reviews-blob--bottom {
    bottom: 10%;
    right: 5%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(220, 200, 190, 0.4) 0%, rgba(245, 245, 245, 0) 70%);
}
.reviews-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 60px;
}
.reviews-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin: 0;
}
.reviews-swiper-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 50px 40px;
}
.reviews-swiper-btn {
    color: #333;
}

/* --- Review Form --- */
.review-form-section {
    padding: 0 0 30px;
    position: relative;
    z-index: 1;
}
.review-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}
.review-form-card {
    padding: 40px;
    border-radius: 20px;
    background: rgba(255,255,255,0.85);
}
.review-form-title {
    font-size: 22px;
    margin: 0 0 8px;
    color: #333;
}
.review-form-subtitle {
    font-size: 14px;
    color: #888;
    margin: 0 0 25px;
}
.review-form-field {
    margin-bottom: 16px;
}
.review-form-field--last {
    margin-bottom: 20px;
}
.review-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.review-form-textarea {
    resize: vertical;
}
.review-form-submit {
    width: 100%;
    padding: 14px;
    background: #222;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s;
}
.review-form-submit:hover {
    background: #444;
}
.review-form-message {
    display: none;
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
}

/* --- Mobile Layout Fixes (real devices with device-width viewport) --- */
@media (max-width: 950px) {

    /* 1. Preloader text */
    .preloader-title {
        font-size: clamp(24px, 8vw, 36px) !important;
        margin-bottom: 5px;
        letter-spacing: normal;
        line-height: 1.2;
    }
    .preloader-subtitle {
        font-size: clamp(14px, 4vw, 18px) !important;
    }


    /* 3. Category Header — switch to vertical for mobile mockup */
    .category-header {
        flex-direction: column !important;
        align-items: flex-start;
        gap: 15px !important;
    }
    .tags {
        gap: 8px;
        flex-wrap: wrap;
    }
    .category-desc {
        font-size: 13px;
        max-width: 100%;
        line-height: 1.5;
    }
    .pill {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
    
    .portfolio-category:last-child {
        margin-bottom: 5px !important;
    }
    .portfolio {
        padding-bottom: 0 !important;
    }

    /* 4. Grids: 2 columns on phones, но обложка и текст в модалке на всю ширину */
    .portfolio-item {
        border-radius: 16px !important;
    }
    
    .project-modal-content .project-modal-grid {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px !important;
    }
    .project-modal-content .project-modal-grid > img:first-child,
    .project-modal-content .project-modal-grid > .project-info-card {
        grid-column: 1 / -1 !important;
    }
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .grid-3, .grid-4, .grid-6 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* 4a. AI Grid — keep structure, reduce gaps */
    .ai-grid {
        gap: 10px !important;
    }
    .ai-grid .center-col .portfolio-item {
        aspect-ratio: 4 / 3;
    }
    .info-card {
        padding: 20px 24px;
    }
    .info-card h4 {
        font-size: 18px;
    }
    .info-card p {
        font-size: 13px;
    }

    /* 4b. Fashion Grid — 2 columns */
    .grid-fashion {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .fashion-main, .fashion-side {
        gap: 10px;
    }

    /* 5. Portfolio section padding */
    .portfolio {
        padding: 0 16px 20px;
    }
    .portfolio-category {
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
    }
    .portfolio-category .category-header {
        order: 1;
        margin-bottom: 15px;
    }
    .portfolio-category .grid {
        order: 2;
    }
    .portfolio-category .project-showcase-wrapper {
        order: 2;
    }

    /* 6. Lightbox close button */
    .image-modal-close {
        top: 12px !important;
        right: 12px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }

    /* 7. Project modal */
    .project-modal-content {
        padding: 16px;
        width: 98%;
    }
    
    .project-modal-content .close-modal,
    .brief-modal-content .close-modal,
    .prices-modal-content .close-modal,
    .about-modal-content .close-modal {
        top: 8px !important;
        right: 8px !important;
        width: 22px !important;
        height: 22px !important;
        font-size: 12px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        color: #000 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.15) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        line-height: 0 !important;
    }

    /* 8. Footer — clean, compact layout */
    .footer {
        padding: 12px 20px 24px; /* Сделал верхний отступ (12px) в точности равным нижнему */
    }
    .footer-skills {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 30px;
        align-items: flex-start;
    }
    .skills-text {
        padding: 20px;
        max-width: 100%;
    }
    .skills-text p {
        font-size: 13px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    .footer-avatar {
        margin: 0 auto;
        width: 55%;
        max-width: 220px;
        border-radius: 20px;
    }

    /* 9. Reviews */
    .reviewsSwiper .swiper-slide {
        width: 100% !important;
        padding: 0 35px; /* Зазор по бокам для стрелочек */
        box-sizing: border-box;
    }
    .reviewsSwiper .review-card {
        width: 100% !important;
        max-width: 400px;
        margin: 0 auto; /* Центрируем саму белую плашку */
    }
    .reviews-swiper-container {
        padding: 0 0 60px !important; /* Убираем боковые отступы контейнера, оставляем место внизу для точек */
    }
    .reviews-swiper-btn {
        display: flex !important;
        color: #A0A0A0 !important; /* Серый цвет */
        width: 30px !important;
        height: 40px !important;
        margin-top: -20px !important;
    }
    .reviews-swiper-btn::after {
        font-size: 16px !important; /* Миниатюрные стрелочки */
        font-weight: 300 !important;
    }
    .swiper-button-prev.reviews-swiper-btn {
        left: 5px !important;
    }
    .swiper-button-next.reviews-swiper-btn {
        right: 5px !important;
    }
    .footer-action {
        align-items: center;
    }
    .footer-action .btn-primary {
        font-size: 16px;
        padding: 14px 32px;
    }
    .footer-socials {
        margin-top: 16px;
    }

    /* 9. Marquee */
    .marquee-container {
        padding: 12px 0;
    }

    /* 10. Scroll-to-top button — smaller on mobile */
    .scroll-to-top {
        bottom: 20px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* 11. Portfolio page specific */
    .portfolio-page-header {
        padding: 80px 20px 20px;
    }
    .portfolio-page-header h1 {
        font-size: clamp(28px, 8vw, 40px);
    }
    .portfolio-page {
        padding-top: 100px; /* Чуть-чуть опустил ВЕСЬ блок вниз (было 70px) */
        padding-bottom: 0px; /* Убрал нижний отступ, чтобы прижать футер */
        min-height: auto;
    }
    .portfolio-page .title {
        margin-bottom: 0; 
    }
    .portfolio-page .description {
        display: none; 
    }
    .portfolio-page .portfolio-filters {
        margin-top: 32px !important; /* Среднее, эстетичное количество воздуха (уменьшил с 120px) */
        margin-bottom: 20px !important; 
    }
    .portfolio-page .portfolio-filters,
    .portfolio-page .portfolio-subfilters {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }
    .portfolio-page .portfolio-filters .pill,
    .portfolio-page .portfolio-subfilters .pill {
        padding: 7px 11px;
        font-size: 13px; /* Увеличил размер шрифта */
    }
}



/* ==========================================================================
   TABLET LAYOUT (between 951px and 1024px)
   ========================================================================== */
@media (min-width: 951px) and (max-width: 1024px) {
    .grid-3, .grid-4, .grid-6 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .project-modal-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}




/* Lightbox Images formatting fix v3 — supports tall vertical collages */
.image-modal-content {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw !important;
    max-width: 100% !important;
    height: 100vh !important;
}

.image-modal-img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin: 0 auto;
    display: block;
}

/* For very tall images: allow scrolling instead of extreme shrinking */
.galleryLightboxSwiper .swiper-slide--scrollable {
    align-items: flex-start !important;
    overflow-y: auto !important;
}
.galleryLightboxSwiper .swiper-slide--scrollable .image-modal-img {
    max-height: none;
    max-width: min(800px, 90vw);
    width: 100%;
    height: auto;
    margin: 0;
}

.galleryLightboxSwiper .swiper-slide--scrollable .lightbox-media-wrapper {
    max-height: none;
    margin: 20px auto;
}

.galleryLightboxSwiper {
    width: 100%;
    height: 100vh;
}

.galleryLightboxSwiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: transparent !important;
}

/* Mobile lightbox adjustments */
@media (max-width: 950px) {
    .image-modal-img {
        max-width: 98vw;
        max-height: 90vh;
        border-radius: 6px;
    }
    .galleryLightboxSwiper .swiper-slide--scrollable .image-modal-img {
        max-width: 98vw;
    }
}

.image-modal-close {
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
    position: fixed !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
    color: white !important;
    background: #1A1A1A !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
}

.image-modal-close:hover {
    background: #000 !important;
    color: white !important;
    transform: rotate(90deg) !important;
}

.lightbox-media-wrapper {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    max-width: 90vw;
    max-height: 85vh;
}

@media (max-width: 950px) {
    .lightbox-media-wrapper {
        max-width: 98vw;
        max-height: 90vh;
    }
}

.slide-close-btn {
    display: none !important;
}

@media (max-width: 950px) {
    .image-modal-close {
        display: none !important;
    }

    .slide-close-btn {
        display: flex !important;
        position: absolute !important;
        top: 5px !important;
        right: 5px !important;
        z-index: 10000 !important;
        width: 22px !important;
        height: 22px !important;
        font-size: 12px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        color: #000 !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.15) !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        line-height: 0 !important;
        transition: all 0.3s ease !important;
        border: none !important;
        cursor: pointer !important;
    }
}

.slide-close-btn:hover {
    background: #000 !important;
    color: white !important;
    transform: rotate(90deg) !important;
}

/* Image Modal Specific Overrides */
#imageModal .modal-backdrop {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

#imageModal .close-modal {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #000 !important;
}





/* ==========================================================================
   MOBILE REDESIGN v2 — Reference Design Match
   ========================================================================== */

/* Mobile description — hidden on desktop */
.mobile-description {
    display: none;
}

/* --- Mobile Bottom Tab Bar (hidden on desktop) --- */
.mobile-tab-bar {
    display: none;
}

@media (max-width: 950px) {
    /* ==========================================
       ABOUT MODAL MOBILE FIX
       ========================================== */
    .about-modal-content {
        flex-direction: column;
        padding: 15px 15px 30px;
        gap: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .about-modal-content .close-modal {
        position: sticky !important;
        top: 5px !important;
        right: -5px;
        align-self: flex-end;
        margin-bottom: -40px; /* Prevent taking up space */
        z-index: 100;
        flex-shrink: 0 !important;
        min-width: 22px !important;
        min-height: 22px !important;
        width: 22px !important;
        height: 22px !important;
        font-size: 12px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        color: #000 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.15) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        line-height: 0 !important;
    }
    
    .about-modal-photo {
        width: 100%;
    }
    
    .about-photo {
        max-width: 200px;
    }
    
    .about-modal-title {
        text-align: center;
        margin-bottom: 15px;
    }

    .about-modal-pills {
        justify-content: center;
    }

    /* ==========================================
       MOBILE TAB BAR
       ========================================== */
    .mobile-tab-bar {
        display: flex;
        position: relative;
        z-index: 10;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        margin: 0;
        padding: 10px 0;
        justify-content: space-around;
        align-items: center;
    }

    .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        text-decoration: none;
        color: #999;
        font-size: 10px;
        font-weight: 500;
        transition: color 0.2s ease;
        padding: 4px 8px;
        -webkit-tap-highlight-color: transparent;
    }

    .tab-item i {
        font-size: 20px;
        transition: transform 0.2s ease;
    }

    .tab-item.active {
        color: #2D2D2D;
    }

    .tab-item.active i {
        transform: scale(1.1);
    }

    .tab-item:active {
        color: #2D2D2D;
    }

    /* ==========================================
       HEADER — Social Icons instead of Hamburger
       ========================================== */
    .mobile-menu-btn {
        display: none !important;
    }

    .header {
        padding: 18px 20px !important;
    }

    .site-logo-img {
        width: 32px !important;
        height: auto !important;
    }


    .header-right {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .header-socials {
        display: flex !important;
        gap: 6px !important;
    }

    .header-socials .icon-circle {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
        background: rgba(255, 255, 255, 0.7) !important;
    }

    .header-actions {
        display: none !important;
    }

    .nav-pills {
        display: none !important;
    }

    /* ==========================================
       HERO SECTION — Photo as full-screen background,
       text overlaid on top (matching reference design)
       ========================================== */
    .hero {
        position: relative !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        padding: 60px 20px 20px !important;
        min-height: calc(100vh - 100px) !important;
        min-height: calc(100dvh - 100px) !important;
        text-align: left !important;
        gap: 0 !important;
        align-items: stretch !important;
        overflow: hidden !important;
    }

    .hero-content {
        position: relative !important;
        z-index: 3 !important;
        max-width: 100% !important;
        margin: 0 !important;
        text-align: left !important;
    }

    .subtitle {
        font-size: 15px !important;
        margin-bottom: 2px !important;
        color: #555 !important;
    }

    .title {
        font-size: clamp(28px, 8vw, 38px) !important;
        margin-bottom: 0 !important;
        line-height: 1.1 !important;
    }

    .description {
        display: none !important;
    }

    /* Photo as absolute background covering entire hero */
    .hero-image-wrapper {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        pointer-events: none !important;
        z-index: 1 !important;
        overflow: hidden !important;
    }

    .hero-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important;
        mix-blend-mode: normal !important;
        transform: scale(1.05) !important;
        max-height: none !important;
    }

    /* Gradient at bottom for text readability */
    .hero-image-wrapper::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 50%;
        background: linear-gradient(to bottom, transparent 0%, rgba(243, 242, 238, 0.4) 25%, rgba(243, 242, 238, 0.95) 60%, rgba(243, 242, 238, 1) 100%);
        z-index: 2;
        pointer-events: none;
    }

    .hero-action {
        position: absolute !important;
        bottom: 20px !important;
        left: 10px !important;
        right: 10px !important;
        z-index: 3 !important;
        align-items: center !important;
        align-self: center !important;
        padding: 0 !important;
    }

    /* Show mobile description overlaid on photo */
    .mobile-description {
        display: block !important;
        font-size: 14px;
        color: #444;
        line-height: 1.5;
        text-align: justify !important;
        -webkit-hyphens: auto;
        hyphens: auto;
        margin: 0 auto 20px auto;
        max-width: 220px;
        padding: 0;
    }

    .btn-wrapper {
        margin-bottom: 10px !important;
        width: 100%;
        text-align: center;
        padding: 0;
    }

    .hero .btn-primary {
        padding: 15px 40px !important;
        font-size: 16px !important;
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border: none !important;
        color: #2D2D2D !important;
        border-radius: 100px !important;
        font-weight: 500 !important;
        width: auto !important;
        display: inline-block !important;
    }

    .hero .btn-primary:hover,
    .hero .btn-primary:active {
        background: #2D2D2D !important;
        color: #fff !important;
    }

    .action-subtext {
        display: none !important;
    }

    .scroll-down {
        display: none !important;
    }

    /* Move scroll-to-top above tab bar */
    .scroll-to-top {
        bottom: 20px !important;
    }

    /* ==========================================
       MARQUEE — reduce gap above portfolio
       ========================================== */
    .marquee-container {
        margin-bottom: 30px !important;
    }
}

/* Slightly larger screens (tablets in portrait) — still hide tab bar */
@media (min-width: 951px) {
    .mobile-tab-bar {
        display: none !important;
    }
}


/* ==========================================
   PROJECT SHOWCASE LAYOUT (Mobile Mockup style)
   ========================================== */
.project-showcase {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

.project-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-title {
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-color);
    margin: 0 0 5px 0;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-align: left;
}

.project-cover {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 24px;
    overflow: hidden;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.project-thumbnails .thumb-item {
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
}

.project-thumbnails .thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================
   FASHION MOBILE LAYOUT CLASSES
   ========================================== */
.fashion-main, .fashion-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fashion-main .portfolio-item, .fashion-side .portfolio-item {
    width: 100%;
    flex: 1;
}

.fashion-main .portfolio-item img, .fashion-side .portfolio-item img {
    height: 100%;
    object-fit: cover;
}

@media (max-width: 950px) {
    .grid-fashion {
        grid-template-columns: 2fr 1fr !important;
    }
}

.center-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.center-col .info-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.center-col .portfolio-item {
    flex-shrink: 0;
}

/* PERFECT AI GRID DESKTOP */
@media (min-width: 951px) {
    .grid.ai-grid {
        grid-template-columns: 1fr minmax(300px, 400px) 1fr !important;
        gap: 30px;
        align-items: stretch !important;
    }
}
@media (max-width: 950px) {
    .grid.ai-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

.center-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.center-col .info-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.center-col .portfolio-item {
    flex-shrink: 0;
}

/* Fix for short mobile screens */
@media (max-width: 950px) and (max-height: 700px) {
    .hero {
        padding-top: 55px !important;
        min-height: calc(100vh - 80px) !important;
        min-height: calc(100dvh - 80px) !important;
    }
    .hero-image {
        object-position: center 35% !important;
    }
    .hero .title {
        font-size: clamp(20px, 6vw, 26px) !important;
        margin-bottom: 2px !important;
        line-height: 1.05 !important;
    }
    .hero .subtitle {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }
    .hero-action {
        bottom: 10px !important;
    }
    .mobile-description {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }
    .hero .btn-primary {
        padding: 12px 30px !important;
        font-size: 14px !important;
    }
}

/* Landscape Mobile Fix */
@media (max-width: 950px) and (orientation: landscape) {
    .hero {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-top: 80px !important;
        padding-bottom: 20px !important;
        min-height: calc(100vh - 80px) !important;
        min-height: calc(100dvh - 80px) !important;
    }
    .hero-content {
        width: 52% !important;
        margin: 0 !important;
        padding-right: 15px !important;
        transform: translateY(-40px) !important;
    }
    .hero-action {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 45% !important;
        align-self: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .hero .title {
        font-size: clamp(20px, 4.5vw, 28px) !important;
        line-height: 1.1 !important;
    }
    .hero .subtitle {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }
    .mobile-description {
        font-size: clamp(11px, 2.8vh, 13px) !important;
        margin-bottom: 12px !important;
        line-height: 1.4 !important;
    }
    .hero .btn-primary {
        padding: 10px 24px !important;
        font-size: 14px !important;
    }
    .grid-3, .grid-4, .grid-6, .grid-fashion, .grid.ai-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hero-image, .hero-content, .hero-action { transform: none !important; }
}


