/* =========================================
   REFERENCE / REALIZACIJE PAGE STYLES
   ========================================= */

/* ---------- HERO ---------- */
.reference-hero {
    padding-top: 150px;
    padding-bottom: 80px;
    min-height: auto;
}

.reference-hero .hero-content {
    position: relative;
    z-index: 2;
}

.reference-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}
.reference-hero .breadcrumb a:hover { color: var(--teal); }
.reference-hero .breadcrumb .separator,
.reference-hero .breadcrumb .current { color: rgba(255, 255, 255, 0.45); }

.reference-hero .hero-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(199, 241, 230, 0.15);
    border: 1px solid rgba(199, 241, 230, 0.4);
    color: var(--mint);
    font-size: 0.813rem;
    font-weight: 600;
    border-radius: 100px;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.reference-hero h1 {
    font-size: 3.25rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1.1;
    margin: 0 0 20px;
}
.reference-hero h1 .highlight { color: var(--teal); }

.reference-hero .hero-desc {
    font-size: 1.075rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
    max-width: 660px;
    margin: 0;
}

.reference-stats {
    display: flex;
    gap: 40px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    flex-wrap: wrap;
}
.reference-stats .stat-item { display: flex; flex-direction: column; }
.reference-stats .stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--teal);
    line-height: 1.05;
}
.reference-stats .stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

@media (max-width: 1024px) { .reference-hero h1 { font-size: 2.5rem; } }
@media (max-width: 768px)  { .reference-hero h1 { font-size: 2rem; } .reference-stats .stat-number { font-size: 2rem; } }

/* ---------- GALLERY SECTION ---------- */
.reference-gallery-section {
    padding: 72px 0 90px;
    background-color: var(--light-bg, #f6f8f9);
}

/* Filters */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 44px;
    justify-content: center;
}
.filter-btn {
    padding: 10px 22px;
    border: 1px solid var(--border-color, #e2e8e9);
    background: #fff;
    color: var(--text-light, #5a6b6e);
    border-radius: 100px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.filter-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- BRAND CARDS GRID ---------- */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.brand-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 42, 51, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(15, 42, 51, 0.04);
    outline: none;
}
.brand-card:hover,
.brand-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(15, 42, 51, 0.14);
}
.brand-card:focus-visible { box-shadow: 0 0 0 3px rgba(16,185,129,0.4), 0 18px 36px rgba(15,42,51,0.14); }

.brand-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e9eeef;
}
.brand-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.brand-card:hover .brand-card-media img { transform: scale(1.06); }

/* photo count badge */
.card-count {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 42, 51, 0.78);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.02em;
}

/* zoom indicator */
.card-zoom {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--teal-dark, #0f6b5c);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.brand-card:hover .card-zoom { opacity: 1; transform: scale(1); }

.brand-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.brand-card-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--navy, #102a33);
    margin: 0;
    line-height: 1.25;
}
.brand-card-country {
    font-size: 0.875rem;
    color: var(--text-light, #5a6b6e);
    display: flex;
    align-items: center;
    gap: 7px;
}
.brand-card-country::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    display: inline-block;
}

.gallery-empty {
    text-align: center;
    color: var(--text-light, #5a6b6e);
    padding: 40px 0;
    font-size: 1rem;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(8, 20, 24, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-content {
    position: relative;
    max-width: 92%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 84vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
    color: #fff;
    margin-top: 18px;
    font-size: 1.125rem;
    text-align: center;
}
.lightbox-caption .lb-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-left: 4px;
}

.lightbox-close {
    position: absolute;
    top: 22px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 10000;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: background 0.2s ease;
}
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .reference-hero { padding-top: 120px; }
    .brand-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
    .lightbox-prev { left: 14px; }
    .lightbox-next { right: 14px; }
    .lightbox-prev, .lightbox-next { width: 44px; height: 44px; font-size: 22px; }
    .lightbox-close { top: 14px; right: 18px; }
    .card-zoom { opacity: 1; transform: scale(1); }
}

@media (max-width: 480px) {
    .brand-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .brand-card-body { padding: 12px 12px 14px; }
    .brand-card-name { font-size: 0.95rem; }
    .brand-card-country { font-size: 0.78rem; }
    .reference-stats { gap: 24px; }
    .gallery-filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .filter-btn { white-space: nowrap; flex-shrink: 0; }
}

/* ---------- CTA SECTION (scoped to reference page) ---------- */
.reference-gallery-section + .suppliers + .cta-section,
.cta-section {
    padding: 90px 0;
    background: var(--light-bg, #f6f8f9);
}

.cta-section .cta-card {
    background: linear-gradient(135deg, #0f2a33 0%, #16414c 100%);
    border-radius: 24px;
    padding: 64px 48px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15, 42, 51, 0.18);
    position: relative;
    overflow: hidden;
}

.cta-section .cta-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(16,185,129,0.22) 0%, rgba(16,185,129,0) 70%);
    pointer-events: none;
}

/* override inherited grid layout from rjesenja.css */
.cta-section .cta-content {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-section .cta-content h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 16px;
}

.cta-section .cta-content p {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
    margin: 0 auto 32px;
    max-width: 560px;
}

.cta-section .cta-content .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 200px;
    padding: 15px 38px;
    background: var(--teal, #10b981);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.32);
}

.cta-section .cta-content .btn-primary:hover {
    transform: translateY(-2px);
    background: #0ea271;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.42);
}

@media (max-width: 768px) {
    .cta-section { padding: 60px 0; }
    .cta-section .cta-card { padding: 44px 24px; }
    .cta-section .cta-content h2 { font-size: 1.6rem; }
    .cta-section .cta-content p { font-size: 1rem; }
}

