

:root {
    --bg-body: #0f0f0f;
    --bg-card: #1a1a1a;
    --text-main: #ffffff;
    --text-muted: #dddddd;
    --border-color: #333333;
    --gold: #d4af37;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-body: #f4f4f4;
        --bg-card: #ffffff;
        --text-main: #111111;
        --text-muted: #555555;
        --border-color: #dddddd;
        --gold: #b8860b;
    }
}

.portfolio-header,
.brand-header,
.project-header {
    height: 50vh;
    min-height: 350px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: -90px;
    padding-top: 90px;
    border-bottom: 3px solid var(--gold);
    background-size: cover;
    background-position: center;
}

.project-header,
.brand-header {
    height: 60vh;
    min-height: 400px;
    align-items: flex-end;
    justify-content: flex-start;
    padding-bottom: 60px;
}

.header-overlay,
.brand-overlay,
.project-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.project-header-bg {
    filter: brightness(0.5);
}

.brand-overlay {
    backdrop-filter: blur(3px);
    background: rgba(0, 0, 0, 0.6);
}

.header-content,
.brand-content,
.project-header .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.page-title,
.brand-title,
.project-title {
    color: #fff;
    font-size: clamp(2.2rem, 8vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 2px;
    word-break: break-word;
}
.brand-title {
    font-size: clamp(2.5rem, 9vw, 4.5rem);
    font-weight: 800;
}
.project-title {
    font-size: clamp(2rem, 7vw, 3.5rem);
    line-height: 1.2;
}

.filter-menu,
.gallery-filter {
    text-align: center;
    margin: 60px 0 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.filter-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    box-shadow: 0 5px 15px rgba(198, 168, 124, 0.3);
}
.filter-menu .filter-btn,
.gallery-filter .filter-btn {
    min-width: 0;
}

.brands-grid,
.branches-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: clamp(20px, 4vw, 40px);
    padding-bottom: 80px;
}

.brand-card,
.branch-card,
.gallery-item {
    display: block;
    position: relative;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    text-decoration: none;
    background: var(--bg-card);
    transition: 0.4s;
}

.brand-card::after,
.branch-card::after,
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.08));
}

.brand-card:hover,
.branch-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.brand-img,
.branch-img,
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.brand-img {
    height: 65%;
    filter: grayscale(30%);
}

.brand-card:hover .brand-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.brand-info {
    padding: 20px;
    text-align: center;
    height: 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    color: var(--text-main);
    font-size: 1.5rem;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.brand-cat {
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.branch-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    z-index: 2;
    transition: 0.4s;
    opacity: 1;
    
    transform: translateY(0);
}

.branch-card:hover .branch-info {
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.8) 80%, transparent);
}

.branch-name {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 0 0 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 700;
}

.branch-loc {
    display: block;
    color: var(--gold);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

.view-btn {
    display: inline-block;
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 5px;
}

.project-details-section {
    padding: 80px 0;
    background: var(--bg-body);
}

.details-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: clamp(24px, 4vw, 60px);
    margin-bottom: 60px;
}

.project-description h3 {
    color: var(--text-main);
    font-size: 2rem;
    margin-bottom: 20px;
}

.project-description p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 15px;
    white-space: pre-line;
}

.info-sidebar {
    background: var(--bg-card);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--gold);
}

.info-item {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.info-label {
    color: var(--gold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border: 2px solid var(--gold);
    margin-bottom: 80px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hide {
    display: none;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s all ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    .page-title,
    .brand-title {
        font-size: 2.5rem;
    }

    .project-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .portfolio-header,
    .brand-header,
    .project-header {
        min-height: 320px;
        height: auto;
        padding-bottom: 48px;
    }
    .filter-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        align-items: stretch;
    }
    .filter-menu .filter-btn {
        width: 100%;
        margin: 0;
        padding: 12px 14px;
        font-size: 10px;
        letter-spacing: 1px;
        line-height: 1.25;
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-radius: 18px;
    }
    .gallery-filter {
        gap: 10px;
    }
    .gallery-filter .filter-btn {
        flex: 1 1 calc(33.333% - 10px);
        min-width: 90px;
        padding: 10px 14px;
        font-size: 10px;
        letter-spacing: 1px;
    }
    .brands-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .brand-card {
        height: auto;
    }
    .gallery-item {
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .gallery-item img {
        height: 100%;
    }
    .brand-img {
        height: 260px;
    }
    .branches-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .branch-card {
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .branch-img {
        height: 250px;
        flex-shrink: 0;
    }

    .branch-info {
        position: relative;
        opacity: 1;
        background: var(--bg-card);
        padding: 15px;
        transform: none;
    }

    .branch-name {
        font-size: 1.3rem;
        color: var(--text-main);
        text-shadow: none;
    }

    .branch-loc {
        color: var(--gold);
        text-shadow: none;
        margin-bottom: 10px;
    }

    .view-btn {
        display: none;
    }
}
@media (max-width: 420px) {
    .filter-menu .filter-btn {
        padding: 10px 12px;
        font-size: 9px;
        letter-spacing: 0.8px;
        min-height: 48px;
    }
    .gallery-grid {
        gap: 10px;
    }
}
.brand-card { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); transform: scale(1); opacity: 1; }
.brand-card.hidden { opacity: 0; transform: scale(0.9); pointer-events: none; }
.brand-card.visible { opacity: 1; transform: scale(1); }
