/* ========================================
   MATERIJALI PAGE - Split Screen Editorial Design
   ======================================== */

/* Override global #primary constraints for full-width layout */
.page-template-template-materijali #primary {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.materijali-page-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ========================================
   HERO SECTION - Full Width Image with Bottom Content
   (Matching Homepage before-slider style)
   ======================================== */

.materijali-hero-section {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

/* Height is capped to part of the viewport so the title and text sit in the first view;
   the photo is cropped by object-fit instead of setting the height by its own ratio. */
.materijali-hero-section > img {
    width: 100%;
    height: clamp(420px, 62vh, 640px);
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Dark overlay */
.materijali-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

/* Content overlay - positioned at bottom like homepage */
.materijali-hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    text-align: center;
    padding-bottom: 60px;
}

.materijali-hero-content-inner {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    color: #fff;
}

/* Hero content - positioned at bottom like homepage */
.materijali-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    text-align: center;
    padding-bottom: 50px;
}

.materijali-hero-content-inner {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    color: #fff;
}

.materijali-hero-subtitle {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
    margin-bottom: 15px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.materijali-hero-title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0 0 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.materijali-hero-description {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 550px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.materijali-hero-description p {
    margin: 0;
}

/* ========================================
   LEATHER TYPES SECTION - Split Screen
   ======================================== */

.materijali-leather-section {
    width: 100%;
    background: #fafafa;
}

/* Section Header */
.leather-section-header {
    text-align: center;
    padding: 100px 40px 80px;
    max-width: 800px;
    margin: 0 auto;
}

.leather-section-header h2 {
    font-size: 32px;
    letter-spacing: 6px;
    text-transform: uppercase;
    font-weight: 300;
    margin: 0 0 24px;
    color: #1a1a1a;
}

.leather-section-header .leather-section-description {
    font-size: 15px;
    line-height: 1.9;
    color: #666;
}

.leather-section-header .leather-section-description p {
    margin: 0;
}

/* Split Container - Desktop */
.leather-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* Sticky Image Side */
.leather-images-wrapper {
    position: relative;
    background: #111;
}

.leather-images-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.leather-image-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.leather-image-item.is-active {
    opacity: 1;
}

.leather-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Scrolling Content Side */
.leather-content-wrapper {
    background: #fff;
}

.leather-content-item {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px;
    border-bottom: 1px solid #eee;
}

.leather-content-item:last-child {
    border-bottom: none;
}

.leather-content-inner {
    max-width: 480px;
}

.leather-number {
    display: block;
    font-size: 13px;
    letter-spacing: 3px;
    color: #999;
    margin-bottom: 20px;
    font-weight: 400;
}

.leather-content-inner h3 {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin: 0 0 28px;
    color: #1a1a1a;
    line-height: 1.2;
}

.leather-content-inner .leather-description {
    font-size: 15px;
    line-height: 1.9;
    color: #555;
}

.leather-content-inner .leather-description p {
    margin: 0;
}

/* Mobile Container - Hidden on Desktop */
.leather-mobile-container {
    display: none;
}

/* ========================================
   TWO LINKED IMAGES SECTION
   ======================================== */

.page-template-template-materijali .two-linked-images-section {
    padding: 80px 0;
    width: 100%;
    background: #fff;
}

.page-template-template-materijali .two-linked-images-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
    box-sizing: border-box;
}

.page-template-template-materijali .linked-image-card {
    position: relative;
    display: block;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    height: 500px;
}

.page-template-template-materijali .linked-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-template-template-materijali .linked-image-card:hover img {
    transform: scale(1.05);
}

.page-template-template-materijali .linked-image-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-template-template-materijali .linked-image-content h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 300;
}

.page-template-template-materijali .linked-image-content .btn {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.6);
    padding: 14px 30px;
    border-radius: 0;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.page-template-template-materijali .linked-image-content .btn:hover {
    background: #fff;
    color: #1a1a1a;
    border-color: #fff;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 1024px) {
    .materijali-hero-section > img {
        height: clamp(380px, 60vh, 520px);
    }

    .materijali-hero-title {
        font-size: clamp(26px, 4vw, 40px);
    }

    .materijali-hero-description {
        font-size: 0.95rem;
    }

    .leather-section-header {
        padding: 80px 30px 60px;
    }

    .leather-section-header h2 {
        font-size: 26px;
        letter-spacing: 5px;
    }

    .leather-content-item {
        padding: 60px 50px;
    }

    .leather-content-inner h3 {
        font-size: 28px;
    }

    .page-template-template-materijali .two-linked-images-section {
        padding: 60px 0;
    }

    .page-template-template-materijali .two-linked-images-container {
        gap: 25px;
        padding: 0 25px;
    }

    .page-template-template-materijali .linked-image-card {
        height: 400px;
    }

    .page-template-template-materijali .linked-image-content {
        padding: 35px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
    /* Hero Mobile */
    .materijali-hero-section > img {
        min-height: 450px;
    }

    .materijali-hero-content {
        padding-bottom: 40px;
    }

    .materijali-hero-content-inner {
        padding: 0 15px;
    }

    .materijali-hero-subtitle {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
        margin-bottom: 10px;
    }

    .materijali-hero-title {
        font-size: 24px;
        letter-spacing: 3px;
        margin-bottom: 15px;
    }

    .materijali-hero-description {
        font-size: 0.9rem;
    }

    /* Section Header Mobile */
    .leather-section-header {
        padding: 60px 25px 40px;
    }

    .leather-section-header h2 {
        font-size: 22px;
        letter-spacing: 4px;
        margin-bottom: 20px;
    }

    .leather-section-header .leather-section-description {
        font-size: 14px;
    }

    /* Hide Desktop Split, Show Mobile Cards */
    .leather-split-container {
        display: none;
    }

    .leather-mobile-container {
        display: block;
    }

    /* Mobile Cards - SMALLER IMAGES */
    .leather-mobile-card {
        display: flex;
        flex-direction: column;
    }

    .leather-mobile-image {
        width: 100%;
        height: 280px;
        overflow: hidden;
    }

    .leather-mobile-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .leather-mobile-content {
        padding: 35px 25px 50px;
        background: #fff;
        text-align: center;
    }

    .leather-mobile-content .leather-number {
        display: block;
        font-size: 11px;
        letter-spacing: 3px;
        color: #999;
        margin-bottom: 12px;
    }

    .leather-mobile-content h3 {
        font-size: 22px;
        font-weight: 300;
        letter-spacing: 3px;
        text-transform: uppercase;
        margin: 0 0 18px;
        color: #1a1a1a;
    }

    .leather-mobile-content .leather-description {
        font-size: 14px;
        line-height: 1.75;
        color: #555;
    }

    .leather-mobile-content .leather-description p {
        margin: 0;
    }

    /* Two Linked Images Mobile */
    .page-template-template-materijali .two-linked-images-section {
        padding: 50px 0;
    }

    .page-template-template-materijali .two-linked-images-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }

    .page-template-template-materijali .linked-image-card {
        height: 280px;
    }

    .page-template-template-materijali .linked-image-content {
        padding: 25px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-template-template-materijali .linked-image-content h3 {
        font-size: 18px;
        letter-spacing: 3px;
    }

    .page-template-template-materijali .linked-image-content .btn {
        padding: 10px 24px;
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE
   ======================================== */

@media (max-width: 480px) {
    .materijali-hero-section > img {
        min-height: 400px;
    }

    .materijali-hero-content {
        padding-bottom: 35px;
    }

    .materijali-hero-subtitle {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }

    .materijali-hero-title {
        font-size: 20px;
        letter-spacing: 2px;
        margin-bottom: 12px;
    }

    .materijali-hero-description {
        font-size: 0.85rem;
    }

    .leather-section-header {
        padding: 50px 20px 30px;
    }

    .leather-section-header h2 {
        font-size: 18px;
        letter-spacing: 3px;
    }

    .leather-mobile-image {
        height: 240px;
    }

    .leather-mobile-content {
        padding: 30px 20px 45px;
    }

    .leather-mobile-content h3 {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .page-template-template-materijali .two-linked-images-section {
        padding: 40px 0;
    }

    .page-template-template-materijali .two-linked-images-container {
        gap: 15px;
        padding: 0 15px;
    }

    .page-template-template-materijali .linked-image-card {
        height: 240px;
    }

    .page-template-template-materijali .linked-image-content {
        padding: 20px 15px;
        gap: 10px;
    }

    .page-template-template-materijali .linked-image-content h3 {
        font-size: 16px;
        letter-spacing: 2px;
    }

    .page-template-template-materijali .linked-image-content .btn {
        padding: 8px 20px;
        font-size: 11px;
    }
}
