/* =================================================================
   FB HOMEPAGE PLUGIN — FRONT-END STYLES
   Prenešeno 1:1 iz originalnog HTML-a
================================================================= */

/* --- LOCAL GOOGLE FONTS --- */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/montserrat-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/montserrat-latin-600-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/montserrat-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/oswald-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/oswald-latin-500-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/oswald-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                   U+FEFF, U+FFFD;
}

/* --- RESET SCOPED TO PLUGIN --- */
.fb-homepage-wrap,
.fb-homepage-wrap *,
.fb-homepage-wrap *::before,
.fb-homepage-wrap *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.fb-homepage-wrap {
    font-family: 'Montserrat', sans-serif;
    color: white;
    overflow-x: hidden;
    line-height: 1.5;
}
.fb-homepage-wrap a { text-decoration: none; color: white; transition: 0.3s; }
.fb-homepage-wrap img { max-width: 100%; height: auto; display: block; }


/* =================================================================
   HERO SECTION
================================================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    padding-left: 10%;
    overflow: hidden;
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.sub-headline {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.main-headline {
    font-family: 'Oswald', sans-serif;
    font-size: 64px;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cta-button {
    background: white;
    color: black !important;
    padding: 15px 40px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s;
    display: inline-block;
}

.cta-button:hover {
    transform: scale(1.05);
    background: #f2f2f2;
    color: black !important;
}


/* =================================================================
   FEATURED SECTION - DESKTOP STYLES
================================================================= */
#featured-beer {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #0098b8;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: background-color 0.8s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    touch-action: pan-y;
    padding-top: 0;
    padding-bottom: 80px;
    box-sizing: border-box;
}

/* Overlay za čitljivost teksta */
#featured-beer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

/* Sadržaj iznad overlaya */
#featured-beer .fixed-title,
#featured-beer .custom-pagination,
#featured-beer .swiper {
    position: relative;
    z-index: 1;
}

/* Fade-in animacija pozadine */
#featured-beer.bg-loaded {
    transition: background-image 0.8s ease-in-out, background-color 0.8s ease;
}

/* Fiksni naslov */
.fixed-title {
    position: absolute;
    top: 80px;
    width: 100%;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    z-index: 10;
    opacity: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Brojač */
.custom-pagination {
    position: absolute;
    top: 120px;
    right: 8%;
    z-index: 10;
    font-family: 'Oswald', sans-serif;
    text-align: right;
}
.current-num {
    font-size: 90px;
    line-height: 0.8;
    display: inline-block;
}
.total-num {
    font-size: 30px;
    opacity: 0.6;
    vertical-align: top;
    margin-left: 5px;
    position: relative;
    top: 10px;
}

/* Swiper Setup */
.fb-homepage-wrap .swiper { width: 100%; height: 70%; overflow: visible !important; }

/* --- DESKTOP SLIDE WIDTH --- */
.fb-homepage-wrap .swiper-slide {
    width: 60%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.fb-homepage-wrap .swiper-slide-active {
    z-index: 10;
}

/* Grid Layout */
.slide-content {
    display: grid;
    grid-template-columns: 1fr 300px 1fr;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin-top: -40px;
    transition: all 0.6s ease-out;
    transform: scale(0.9);
    opacity: 1;
}

.swiper-slide-active .slide-content {
    opacity: 1;
    transform: scale(1);
}

/* --- SAKRIVANJE TEKSTA NA SUSJEDNIM PIVAMA --- */
.swiper-slide:not(.swiper-slide-active) .info-left,
.swiper-slide:not(.swiper-slide-active) .info-right,
.swiper-slide:not(.swiper-slide-active) .learn-more-btn {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

/* --- LIMENKA (SLIKA) --- */
.beer-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 2;
    z-index: 5;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.beer-can-img {
    height: 350px !important;  /* !important overrides Elementor's height:auto */
    width: auto !important;    /* !important overrides Elementor's max-width:100% */
    max-width: none !important;
    transition: all 0.8s ease;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2)) grayscale(100%);
    transform: scale(0.8);
    opacity: 0.5;
}

/* 1. AKTIVNA PIVA (SREDINA) */
.swiper-slide-active .beer-can-img {
    transform: scale(1.2) translateY(0);
    filter: drop-shadow(0 30px 50px rgba(0,0,0,0.5)) grayscale(0%);
    opacity: 1;
}

/* 2. OPTIČKA VARKA - MAGNET ZA SUSJEDE */
.swiper-slide-prev .beer-image-wrapper {
    transform: translateX(65%);
}
.swiper-slide-next .beer-image-wrapper {
    transform: translateX(-65%);
}

/* Tekstovi */
.info-left {
    text-align: right;
    padding-right: 0;
    opacity: 0;
    transform: translateY(30px) translateX(60px);
    transition: all 0.5s ease;
}

.info-right {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.swiper-slide-active .info-left {
    opacity: 1;
    transform: translateY(0) translateX(60px);
    transition-delay: 0.3s;
}

.swiper-slide-active .info-right {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.beer-title {
    font-family: 'Oswald', sans-serif;
    font-size: 52px;
    line-height: 0.95;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
}
.beer-type {
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    opacity: 0.8;
    text-transform: uppercase;
}

.info-right {
    text-align: left;
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.stat-box h4 {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.stat-box p {
    font-family: 'Oswald', sans-serif;
    font-size: 32px;
    font-weight: 500;
}
.stat-line {
    width: 60px;
    height: 2px;
    background: rgba(255,255,255,0.4);
    margin-top: 15px;
}

/* Desktop Learn More Gumb */
.learn-more-btn {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: black !important;
    padding: 18px 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: 0.4s;
    display: inline-block;
    text-align: center;
}
.swiper-slide-active .learn-more-btn {
    opacity: 1;
    bottom: -100px;
    transition-delay: 0.5s;
}

/* Strelice */
.fb-homepage-wrap .swiper-button-next,
.fb-homepage-wrap .swiper-button-prev {
    color: white !important;
    opacity: 0.6;
}


/* =================================================================
   SLIDE PROGRESS BAR
================================================================= */
.slide-progress {
    position: absolute;
    bottom: 50px;
    right: 8%;
    width: 200px;
    z-index: 20;
}

.progress-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: white;
    border-radius: 2px;
    transition: left 0.5s ease, width 0.5s ease;
    width: 25%;
}

.slide-progress:hover .progress-fill {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}


/* =================================================================
   --- MOBILNA VERZIJA FEATURED ---
================================================================= */
@media (max-width: 768px) {

    #featured-beer {
        height: 100vh;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .fixed-title { display: none; }

    /* Brojač */
    .custom-pagination { top: 70px; right: 20px; z-index: 20; }
    .current-num { font-size: 36px; font-family: 'Oswald', sans-serif; line-height: 1; }
    .total-num { font-size: 16px; font-weight: 300; }

    /* Swiper */
    .fb-homepage-wrap .swiper {
        width: 100%; height: 100%;
        padding-top: 0;
        overflow: visible !important;
    }

    /* 2. POSTAVKE SLAJDA */
    .fb-homepage-wrap .swiper-slide {
        width: 60% !important;
        height: 100%;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        opacity: 0.5 !important;
        transform: scale(0.85);
        transition: all 0.4s ease-out;
        z-index: 1;
    }

    .fb-homepage-wrap .swiper-slide-active {
        opacity: 1 !important;
        transform: scale(1);
        z-index: 10;
    }

    .swiper-slide-active .info-left {
        transform: none !important;
        opacity: 1 !important;
    }

    /* 3. SADRŽAJ */
    .slide-content {
        width: 100%;
        display: flex; flex-direction: column; align-items: center;
        justify-content: center;
        transform: none !important; opacity: 1 !important;
        padding: 0; margin: 0;
    }

    /* A) NASLOV */
    .info-left {
        width: 100% !important;
        display: flex !important;
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 0 10px 0 !important;
        text-align: center !important;
        transform: none !important;
        opacity: 1 !important; visibility: visible !important;
    }

    .beer-title {
        font-family: 'Oswald', sans-serif;
        font-size: 38px; line-height: 0.95;
        text-transform: uppercase;
        width: 100% !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .beer-type { display: none; }

    /* B) SLIKA */
    .beer-image-wrapper {
        width: 100%;
        height: 45vh;
        display: flex; justify-content: center; align-items: center;
        margin: 10px 0; padding: 0;
        transform: none !important;
    }
    .beer-can-img {
        height: 100% !important; width: auto !important; object-fit: contain;
        max-width: none !important;
        transform: none !important;
        filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3)) !important;
        margin: 0 auto !important;
        display: block;
    }
    .beer-image-wrapper .learn-more-btn { display: none; }

    /* C) INFO SEKCIJA (Style | ABV) */
    .info-right {
        display: flex; flex-direction: row;
        width: 100%; margin-bottom: 20px;
        padding: 0; gap: 0;
        opacity: 1 !important; visibility: visible !important;
    }

    .stat-box {
        flex: 0 0 33.33%;
        max-width: 33.33%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        box-sizing: border-box;
        padding: 0 10px;
    }

    .stat-box:first-child,
    .stat-box:nth-child(2) {
        border-right: 1px solid rgba(255,255,255,0.4);
    }

    .stat-box:first-child {
        align-items: center;
        padding-right: 10px;
        text-align: center;
    }

    .stat-box:nth-child(2) {
        align-items: center;
        padding-left: 10px;
        text-align: center;
    }

    .stat-box:nth-child(3) {
        display: flex;
        align-items: center;
        padding-left: 10px;
        text-align: center;
    }

    .stat-line { display: none; }

    .stat-box h4 {
        font-family: 'Montserrat', sans-serif;
        font-size: 10px; margin: 0 0 2px 0; opacity: 0.7;
        text-transform: uppercase; letter-spacing: 1px;
    }
    .stat-box p {
        font-family: 'Oswald', sans-serif;
        font-size: 22px; font-weight: 500; margin: 0; line-height: 1;
    }

    /* D) GUMB */
    .mobile-cta-container {
        width: 100%; display: flex; justify-content: center;
        margin-top: 10px; padding-bottom: 0;
        opacity: 1 !important; visibility: visible !important;
    }
    .mobile-cta-btn {
        width: 100%; background: white; color: black !important;
        padding: 15px 0;
        font-family: 'Montserrat', sans-serif; font-weight: 800;
        font-size: 13px; letter-spacing: 1px;
        text-transform: uppercase; border: none; cursor: pointer;
        display: inline-block;
        text-align: center;
    }

    /* Sakrivanje susjeda */
    .swiper-slide:not(.swiper-slide-active) .info-left,
    .swiper-slide:not(.swiper-slide-active) .info-right,
    .swiper-slide:not(.swiper-slide-active) .mobile-cta-container {
        opacity: 0 !important; visibility: hidden;
    }

    /* Strelice */
    .fb-homepage-wrap .swiper-button-next,
    .fb-homepage-wrap .swiper-button-prev {
        top: 50%; width: 40px; height: 40px; margin: 0;
    }
    .fb-homepage-wrap .swiper-button-prev { left: 0px !important; }
    .fb-homepage-wrap .swiper-button-next { right: 0px !important; }

    /* Progress bar */
    .slide-progress { display: none; }

    /* Hero */
    .hero-section { padding-left: 5%; }
    .main-headline { font-size: 42px; }
}

@media (min-width: 769px) {
    .mobile-cta-btn { display: none; }
}


/* =================================================================
   FIX SMALL LAPTOP / TABLET LANDSCAPE (769px - 1023px)
================================================================= */
@media (min-width: 769px) and (max-width: 1023px) {

    .fb-homepage-wrap .swiper-slide {
        width: 85%;
    }

    .slide-content {
        grid-template-columns: 1fr 220px 1fr;
        max-width: 100%;
    }

    .beer-can-img {
        height: 280px !important;
    }

    .swiper-slide-active .beer-can-img {
        transform: scale(1.1) translateY(0);
    }

    .beer-title {
        font-size: 40px;
    }
    .beer-type {
        font-size: 18px;
    }
    .stat-box p {
        font-size: 18px;
    }

    .swiper-slide-prev .beer-image-wrapper {
        transform: translateX(40%);
    }
    .swiper-slide-next .beer-image-wrapper {
        transform: translateX(-40%);
    }

    .learn-more-btn {
        padding: 14px 35px;
        font-size: 12px;
    }
    .swiper-slide-active .learn-more-btn {
        bottom: -80px;
    }

    .slide-progress {
        width: 150px;
        bottom: 40px;
        right: 5%;
    }
}

/* =================================================================
   FIX LAPTOP (1024px - 1400px)
================================================================= */
@media (min-width: 1024px) and (max-width: 1400px) {

    .fb-homepage-wrap .swiper-slide {
        width: 75%;
    }

    .slide-content {
        grid-template-columns: 1fr 250px 1fr;
        max-width: 100%;
    }

    .beer-can-img {
        height: 300px !important;
    }

    .swiper-slide-active .beer-can-img {
        transform: scale(1.1) translateY(0);
    }

    .beer-title {
        font-size: 50px;
    }
    .beer-type {
        font-size: 20px;
    }
    .stat-box p {
        font-size: 20px;
    }

    .swiper-slide-prev .beer-image-wrapper {
        transform: translateX(45%);
    }
    .swiper-slide-next .beer-image-wrapper {
        transform: translateX(-45%);
    }

    .learn-more-btn {
        padding: 16px 40px;
        font-size: 13px;
    }
    .swiper-slide-active .learn-more-btn {
        bottom: -85px;
    }

    .slide-progress {
        width: 150px;
        bottom: 40px;
        right: 5%;
    }
}

/* =================================================================
   XL DESKTOP (1600px+)
   Malo veće na velikim monitorima
================================================================= */
@media (min-width: 1601px) {

    .beer-can-img {
        height: 380px !important;
    }

    .swiper-slide-active .beer-can-img {
        transform: scale(1.2) translateY(0);
    }

    .slide-content {
        grid-template-columns: 1fr 320px 1fr;
    }

    .beer-title {
        font-size: 80px;
    }

    .stat-box p {
        font-size: 30px;
    }
}


/* =================================================================
   SOCIAL GALLERY SECTION
================================================================= */
.gallery-section {
    padding: 40px 5%;
    background-color: #111;
    text-align: center;
}

.gallery-title {
    font-family: 'Oswald', sans-serif;
    font-size: 30px;
    text-transform: uppercase;
    margin-bottom: 40px;
    letter-spacing: 3px;
    font-weight: 700;
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 180px);
    gap: 8px;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* --- DESKTOP LAYOUT (8 slika) --- */
.item-1 {
    grid-column: 1;
    grid-row: span 2;
}
.item-2 { grid-column: 2; grid-row: 1; }
.item-3 { grid-column: 3; grid-row: 1; }
.item-4 { grid-column: 4; grid-row: 1; }
.item-5 { grid-column: 2; grid-row: 2; }
.item-6 { grid-column: 3; grid-row: 2; }
.item-7 { grid-column: 4; grid-row: 2; }
.item-8 {
    grid-column: 1 / 3;
    grid-row: 3;
    height: 200px;
}
.item-9 {
    grid-column: 3 / 5;
    grid-row: 3;
    height: 200px;
}

/* =================================================================
   MOBILNA VERZIJA GALERIJE
================================================================= */
@media (max-width: 768px) {
    .gallery-section {
        padding: 40px 10px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 180px);
        gap: 8px;
    }

    .item-1, .item-2, .item-3,
    .item-4, .item-5, .item-6,
    .item-7, .item-8, .item-9 {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        height: auto !important;
    }

    .item-7,
    .item-8,
    .item-9 {
        display: none;
    }
}
