/* ==========================================================================
   1. BASE & TYPOGRAPHY
   ========================================================================== */
@font-face {
    font-family: 'Tw Cen MT';
    src: local('Tw Cen MT'), local('TwCenMT');
}

html, body {
    height: 100vh !important;
    margin: 0;
    padding: 0;
    /*overflow: hidden !important;*/
    background-color: #ffffff;
    color: #000000;
    font-family: "Tw Cen MT", "Tw Cen MT Bold", "Futura", sans-serif;
}

/* Прилага се към бодито на страницата в Laravel проекта */
.project-page-body {
    height: 100vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

/* Обвивката заема точно височината на екрана МИНУС хедъра (около 75px) */
.project-main-wrapper {
    height: calc(100vh - 75px) !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    width: 100%;
}

/* Центрира съдържанието перфектно в оставащото празно пространство */
.main-content-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.uppercase {
    text-transform: uppercase;
}

/* ==========================================================================
   2. NAVIGATION (HEADER)
   ========================================================================== */
.navbar a, .navbar button {
    cursor: default !important;
}

.navbar-brand img {
    height: 45px;
}

.nav-link {
    font-size: 1rem;
    color: #000 !important;
    margin-left: 2rem;
    letter-spacing: 1px;
    text-transform: capitalize;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.6;
}

.custom-minimal-toggler {
    border: none !important;
    background: transparent !important;
    padding: 0;
    outline: none !important;
    box-shadow: none !important;
}

.toggler-icon-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    padding: 10px 0;
}

.line {
    display: block;
    width: 25px;
    height: 1px;
    background-color: #000;
    transition: all 0.3s ease;
}

.line:nth-child(2) {
    width: 18px;
}

.line:nth-child(3) {
    width: 22px;
}

.custom-minimal-toggler:hover .line {
    width: 25px;
}

/* ==========================================================================
   3. INDEX / WORK (MASONRY GRID)
   ========================================================================== */
.project-masonry {
    column-count: 1;
    column-gap: 1rem;
    width: 100%;
}

.project-masonry a {
    cursor: default !important;
}

.project-item {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.project-card {
    text-decoration: none;
    color: #000;
    display: block;
    position: relative;
}

.gallery-img {
    width: 100%;
    height: auto;
    transition: opacity 0.3s;
}

.project-title {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
    /*text-transform: uppercase;*/
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-title {
    opacity: 1;
}

.gallery-img:hover {
    opacity: 0.85;
}

/* ==========================================================================
   4. PROJECT VIEWPORT & CAROUSEL (DESKTOP)
   ========================================================================== */
.project-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.click-area-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 5;
}

.click-area {
    flex: 1;
}

.click-area-left {
    cursor: url('images/cursor/24x24-left-gray-thin.png') 16 16, w-resize;
}

.click-area-right {
    cursor: url('images/cursor/24x24-right-gray-thin.png') 16 16, e-resize;
}

/* --- КОНТРОЛ НА СЛАЙДЕРА ОТ ТРИТЕ МЕСТА С VH --- */
#projectCarousel {
    width: 100%;
    height: 60vh;       /* <-- МЕСТО 1 (Тук променяш размера, напр. на 55vh или 80vh) */
    max-height: 60vh;   /* <-- МЕСТО 2 (Трябва да съвпада със стойността горе) */
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-inner {
    height: 100%;
    max-height: 100%;
    width: 100%;
}

.carousel-item {
    height: 100%;
    max-height: 100%;
    text-align: center;
}

.carousel-item img {
    height: 100% !important;     /* Снимката заема точно височината на карусела */
    max-height: 100% !important; /* Гарантиран лимит */
    width: auto !important;      /* Запазва правилна пропорция без разтегляне */
    max-width: 100%;
    object-fit: contain !important;
    display: inline-block;
}
/* ----------------------------------------------- */

/* Страничен панел с информация */
.project-description-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -400px;
    width: 400px;
    background: rgba(255, 255, 255, 0.98);
    z-index: 10;
    display: flex;
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 40px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    flex-direction: column;
    pointer-events: auto;
}

.project-description-panel.active {
    left: 0;
    visibility: visible;
    opacity: 1;
}

.mobile-info-container {
    display: none;
    padding: 25px;
}

/* Футер */
.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    color: #333;
    background: white;
    width: 100%;
    flex-shrink: 0;
    cursor: default !important; /* Форсираме стрелката за целия футер (вкл. името на проекта) */
}

.read-more {
    text-decoration: none;
    color: #888;
    margin-left: 15px;
    transition: color 0.3s;
    cursor: default !important; /* Променено от pointer на default, за да остане обикновена стрелка */
}

/* ==========================================================================
   5. ABOUT US & CONTACTS
   ========================================================================== */
.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    letter-spacing: 0.5px;
    text-align: justify;
}

.cert-link {
    display: block;
    text-decoration: none;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 5px;
    transition: color 0.3s;
    cursor: pointer;
}

.cert-link:hover {
    color: #000;
}

.cert-preview-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.preview-img {
    max-width: 100%;
    height: auto;
}

.cert-fixed-preview {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 5px;
}

.cert-fixed-preview.active {
    opacity: 1;
    visibility: visible;
}

.cert-fixed-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (min-width: 1200px) {
    .project-masonry {
        column-count: 3;
        column-gap: 1.5rem;
    }

    #closeInfoBtn {
        display: none !important;
    }

    .project-description-panel {
        pointer-events: none;
    }

    .project-description-panel.active {
        pointer-events: auto;
    }

    .cert-fixed-preview {
        width: 650px;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .project-masonry {
        column-count: 2;
    }

    .project-description-panel {
        width: 100% !important;
        left: -100% !important;
        pointer-events: auto !important;
    }

    .project-description-panel.active {
        left: 0 !important;
    }

    #closeInfoBtn {
        display: block !important;
    }

    .cert-fixed-preview {
        width: 550px;
    }
}

@media (max-width: 767.98px) {
    html, body, .project-page-body {
        height: auto !important;
        overflow: auto !important;
    }

    .project-main-wrapper {
        height: auto !important;
        overflow: visible !important;
    }

    .project-viewport {
        max-height: none !important;
        flex-direction: column !important;
    }

    #projectCarousel {
        height: auto !important;
        max-height: none !important;
        flex-shrink: 0 !important;
        width: 100% !important;
    }

    .carousel-inner, .carousel-item {
        height: auto !important;
        max-height: none !important;
    }

    .carousel-item img {
        height: auto !important;
        max-height: 70vh !important;
        width: 100% !important;
        object-fit: contain !important;
    }

    .project-masonry {
        column-count: 1;
    }

    .cert-fixed-preview {
        display: none !important;
    }

    .click-area-wrapper, .project-footer {
        display: none !important;
    }

    .mobile-info-container {
        display: block !important;
        width: 100% !important;
    }

    #projectCarousel {
        cursor: zoom-in;
    }

    .cert-preview-container {
        margin-top: 30px;
        justify-content: center;
    }
}

@media (max-width: 991.98px) {
    .navbar-nav {
        margin-left: calc(1.5rem + 12px) !important;
    }

    .navbar-nav .nav-link {
        padding-left: 0 !important;
        margin-left: 0;
    }
}