/* ============================================
   HOMEPAGE SECTIONS - O nama, Usluge, Potpore
   ============================================ */

/* Section Header Block */
.section-header-block {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: clamp(32px, 5vw, 64px);
    margin-bottom: clamp(48px, 6vh, 72px);
    padding-bottom: clamp(32px, 4vh, 48px);
    border-bottom: 1px solid rgba(61, 79, 74, 0.12);
}

.section-header-left {
    flex: 1;
    max-width: 820px;
}

.section-header-right {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #3d4f4a;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 20px;
}

.section-tag::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #3d4f4a;
    border-radius: 50%;
}

.section-header-block h2 {
    font-size: clamp(2.2rem, 3.6vw, 3.8rem);
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    color: #050b1a;
}

.section-intro {
    font-size: clamp(1.05rem, 1.15vw, 1.22rem);
    line-height: 1.58;
    color: #3d4f4a;
    max-width: 720px;
}

/* Section Links Grid */
.section-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: clamp(16px, 2vw, 24px);
    counter-reset: card-counter;
}

.section-link-item {
    counter-increment: card-counter;
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.4vw, 32px);
    padding: clamp(28px, 3.5vh, 40px) clamp(28px, 3vw, 40px);
    background: #ffffff;
    border: 1px solid rgba(61, 79, 74, 0.1);
    border-left: 3px solid transparent;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.section-link-item::before {
    content: counter(card-counter, decimal-leading-zero);
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: rgba(61, 79, 74, 0.15);
    z-index: 1;
    transition: color 0.32s ease;
}

.section-link-item:hover {
    border-color: rgba(61, 79, 74, 0.18);
    border-left-color: var(--color-accent);
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(5, 11, 26, 0.07);
}

.section-link-item:hover::before {
    color: var(--color-accent);
}

.section-link-item:active {
    transform: translateY(-2px);
}

.section-link-icon {
    flex-shrink: 0;
    width: clamp(50px, 5.5vw, 60px);
    height: clamp(50px, 5.5vw, 60px);
    background: linear-gradient(145deg, rgba(61, 79, 74, 0.06) 0%, rgba(125, 170, 152, 0.1) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
    position: relative;
    z-index: 1;
}

.section-link-icon svg {
    width: clamp(22px, 2.8vw, 26px);
    height: clamp(22px, 2.8vw, 26px);
    color: #3d4f4a;
    transition: color 0.32s ease;
}

.section-link-item:hover .section-link-icon {
    background: linear-gradient(145deg, #4a6058, #35453f);
    transform: scale(1.06);
    box-shadow: 0 8px 20px rgba(61, 79, 74, 0.3);
}

.section-link-item:hover .section-link-icon svg {
    color: #ffffff;
}

.section-link-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.section-link-content h3 {
    font-size: clamp(1.08rem, 1.25vw, 1.35rem);
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 6px;
    color: #050b1a;
    letter-spacing: -0.02em;
    transition: color 0.32s ease;
}

.section-link-content p {
    font-size: clamp(0.88rem, 0.95vw, 1rem);
    line-height: 1.5;
    color: #5a6e67;
    margin: 0;
    transition: color 0.32s ease;
}

.section-link-item:hover .section-link-content h3 {
    color: #3d4f4a;
}

.section-link-item:hover .section-link-content p {
    color: #3d4f4a;
}

.section-link-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(61, 79, 74, 0.06);
    border-radius: 50%;
    opacity: 0.5;
    transition: all 0.35s ease;
    position: relative;
    z-index: 1;
}

.section-link-arrow svg {
    width: 18px;
    height: 18px;
    color: #3d4f4a;
}

.section-link-item:hover .section-link-arrow {
    opacity: 1;
    background: var(--color-accent);
    transform: translateX(4px);
}

.section-link-item:hover .section-link-arrow svg {
    color: #ffffff;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .section-header-block {
        flex-direction: column;
        gap: 32px;
        margin-bottom: 48px;
        padding-bottom: 32px;
    }

    .section-header-right {
        width: 100%;
        justify-content: flex-start;
        padding-top: 0;
    }

    .section-header-left {
        max-width: 100%;
        text-align: left;
    }

    .section-tag {
        justify-content: flex-start;
    }

    .section-intro {
        max-width: 100%;
        text-align: justify;
    }

    .section-links-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    .section-header-block {
        margin-bottom: 40px;
        padding-bottom: 28px;
    }

    .section-header-block h2 {
        margin-bottom: 18px;
    }

    .section-tag {
        font-size: 0.82rem;
        margin-bottom: 16px;
    }

    .section-link-item {
        padding: 22px 20px;
        gap: 18px;
        border-left-width: 3px;
    }

    .section-link-icon {
        width: 46px;
        height: 46px;
    }

    .section-link-icon svg {
        width: 22px;
        height: 22px;
    }

    .section-link-arrow {
        width: 30px;
        height: 30px;
    }

    .section-link-arrow svg {
        width: 16px;
        height: 16px;
    }

    .section-link-item::before {
        font-size: 0.58rem;
        top: 10px;
        right: 14px;
    }
}

@media screen and (max-width: 480px) {
    .section-header-block {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }

    .section-tag {
        font-size: 0.76rem;
        letter-spacing: 1px;
    }

    .section-link-item {
        padding: 20px 18px;
        gap: 14px;
        border-radius: 14px;
        border-left-width: 3px;
    }

    .section-link-content h3 {
        margin-bottom: 4px;
    }

    .section-link-arrow {
        display: none;
    }

    .section-link-item::before {
        display: none;
    }

    .section-link-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
}

/* ============================================
   HOMEPAGE HERO - Premium Design
   ============================================ */
.homepage-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + 40px) 0 60px;
    position: relative;
    overflow: hidden;
    background: #1a2621;
}

.homepage-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 10% 20%, rgba(125, 170, 152, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 85% 80%, rgba(125, 170, 152, 0.1) 0%, transparent 55%);
    pointer-events: none;
}

.homepage-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 100% 48px;
    pointer-events: none;
    opacity: 0.6;
}

.homepage-hero-inner {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 60px);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
    position: relative;
    z-index: 2;
}

.homepage-hero-content {
    position: relative;
    z-index: 3;
}

.homepage-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: 24px;
}

.homepage-hero-dot {
    width: 7px;
    height: 7px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--color-accent);
}

.homepage-hero-title {
    font-size: clamp(2.4rem, 3.8vw, 4.2rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin: 0 0 24px;
}

.homepage-hero-accent {
    color: var(--color-accent);
}

.homepage-hero-subtitle {
    font-size: clamp(1.02rem, 1.15vw, 1.2rem);
    line-height: 1.6;
    color: rgba(181, 206, 195, 0.72);
    max-width: 600px;
    margin: 0 0 36px;
}

.homepage-hero-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
    margin-bottom: 40px;
}

.homepage-hero-service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.4;
}

.homepage-hero-service-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--color-accent);
}

/* Right side - visual area */
.homepage-hero-visual {
    position: absolute;
    right: clamp(-28px, -2vw, 0px);
    bottom: clamp(-30px, -3vw, -10px);
    width: clamp(500px, 48vw, 900px);
    z-index: 1;
    pointer-events: none;
}

.homepage-hero-image {
    border-radius: 20px;
    overflow: hidden;
}

.homepage-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Homepage Hero Responsive */
@media screen and (max-width: 992px) {
    .homepage-hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
        min-height: auto;
    }

    .homepage-hero-content {
        text-align: left;
    }

    .homepage-hero-kicker {
        justify-content: flex-start;
    }

    .homepage-hero-subtitle {
        text-align: justify;
    }

    .homepage-hero-services {
        max-width: 500px;
        margin-bottom: 40px;
        text-align: left;
    }

    .homepage-hero-content .pearl-button {
        margin: 0;
    }

    .homepage-hero-visual {
        position: relative;
        right: auto;
        bottom: auto;
        max-width: 560px;
        margin: 0 auto;
        width: 100%;
        pointer-events: auto;
    }

    .homepage-hero-image img {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .homepage-hero {
        padding: calc(var(--header-height) + 24px) 0 48px;
    }

    .homepage-hero-title {
        font-size: clamp(1.8rem, 6vw, 2.6rem);
    }

    .homepage-hero-services {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .homepage-hero-image {
        border-radius: 16px;
    }
}

@media screen and (max-width: 480px) {
    .homepage-hero-inner {
        padding: 0 20px;
    }

    .homepage-hero-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    .homepage-hero-subtitle {
        font-size: 0.95rem;
    }

    .homepage-hero-service-item {
        font-size: 0.85rem;
    }

    .homepage-hero-image {
        border-radius: 12px;
    }

    .homepage-hero-image img {
        width: 100%;
    }
}

/* ============================================
   HOMEPAGE PREVIEW CARDS (Grid layout)
   ============================================ */
.homepage-cards-grid {
    display: grid;
    gap: clamp(20px, 2.5vw, 28px);
}

.homepage-cards-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.homepage-cards-grid--3 {
    grid-template-columns: repeat(6, 1fr);
}

/* First row: 3 cards each spanning 2 columns */
.homepage-cards-grid--3 > .homepage-preview-card:nth-child(1) { grid-column: 1 / span 2; }
.homepage-cards-grid--3 > .homepage-preview-card:nth-child(2) { grid-column: 3 / span 2; }
.homepage-cards-grid--3 > .homepage-preview-card:nth-child(3) { grid-column: 5 / span 2; }

/* Second row: 2 cards each spanning 3 columns = full width */
.homepage-cards-grid--3 > .homepage-preview-card:nth-child(4) { grid-column: 1 / span 3; }
.homepage-cards-grid--3 > .homepage-preview-card:nth-child(5) { grid-column: 4 / span 3; }

.homepage-preview-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: clamp(28px, 3.5vw, 40px);
    background: #ffffff;
    border: 1px solid rgba(61, 79, 74, 0.08);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.homepage-preview-card:hover {
    border-color: rgba(61, 79, 74, 0.16);
    transform: translateY(-6px);
    box-shadow: 0 24px 56px rgba(5, 11, 26, 0.08);
}

.homepage-preview-card-icon {
    width: clamp(56px, 6vw, 68px);
    height: clamp(56px, 6vw, 68px);
    background: linear-gradient(145deg, rgba(61, 79, 74, 0.06) 0%, rgba(125, 170, 152, 0.1) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
    flex-shrink: 0;
}

.homepage-preview-card-icon svg {
    width: clamp(28px, 3.2vw, 34px);
    height: clamp(28px, 3.2vw, 34px);
    color: #3d4f4a;
    transition: color 0.32s ease;
}

.homepage-preview-card:hover .homepage-preview-card-icon {
    background: linear-gradient(145deg, #4a6058, #35453f);
    transform: scale(1.06);
    box-shadow: 0 8px 20px rgba(61, 79, 74, 0.25);
}

.homepage-preview-card:hover .homepage-preview-card-icon svg {
    color: #ffffff;
}

.homepage-preview-card h3 {
    font-size: clamp(1.25rem, 1.5vw, 1.5rem);
    font-weight: 800;
    line-height: 1.22;
    color: #050b1a;
    letter-spacing: -0.02em;
    margin: 0;
    padding-bottom: 12px;
    position: relative;
}

.homepage-preview-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    border-radius: 8px;
    background: linear-gradient(135deg, #050b1a 0%, #2d3d36 100%);
    box-shadow: 0 2px 8px rgba(5, 11, 26, 0.15);
}

.homepage-preview-card p {
    font-size: clamp(1rem, 1.08vw, 1.15rem);
    line-height: 1.6;
    color: #5a6e67;
    margin: 0;
    flex: 1;
}

.homepage-preview-card .pearl-button {
    align-self: flex-start;
    margin-top: 8px;
}

/* Responsive */
@media screen and (max-width: 992px) {
    .homepage-cards-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Reset all grid-column spans on smaller screens */
    .homepage-cards-grid--3 > .homepage-preview-card:nth-child(1),
    .homepage-cards-grid--3 > .homepage-preview-card:nth-child(2),
    .homepage-cards-grid--3 > .homepage-preview-card:nth-child(3),
    .homepage-cards-grid--3 > .homepage-preview-card:nth-child(4),
    .homepage-cards-grid--3 > .homepage-preview-card:nth-child(5) {
        grid-column: auto;
    }
}

@media screen and (max-width: 768px) {
    .homepage-cards-grid--2,
    .homepage-cards-grid--3 {
        grid-template-columns: 1fr;
    }

}

@media screen and (max-width: 480px) {
    .homepage-preview-card {
        padding: clamp(22px, 3vw, 28px);
        border-radius: 16px;
    }

    .homepage-preview-card h3 {
        font-size: 1.05rem;
    }

    .homepage-preview-card p {
        font-size: 0.88rem;
    }
}

/* ============================================
   HOMEPAGE LARGE SCREEN ENHANCEMENTS
   ============================================ */
@media screen and (min-width: 1440px) {
    .homepage-hero {
        padding: calc(var(--header-height) + 60px) 0 80px;
    }

    .homepage-hero-title {
        font-size: clamp(3rem, 3.8vw, 4.2rem);
    }

    .homepage-hero-subtitle {
        max-width: 680px;
    }

    .section-header-left {
        max-width: 920px;
    }

    .section-intro {
        max-width: 800px;
    }

    .homepage-preview-card {
        padding: clamp(36px, 3.5vw, 52px);
    }

    .homepage-hero-visual {
        width: clamp(560px, 50vw, 960px);
    }

    .section-header-block {
        margin-bottom: 64px;
    }
}

@media screen and (min-width: 1920px) {
    .homepage-hero {
        padding: calc(var(--header-height) + 80px) 0 100px;
        min-height: 100vh;
    }

    .homepage-hero-visual {
        width: clamp(640px, 52vw, 1100px);
    }

    .homepage-hero-title {
        font-size: clamp(3.4rem, 3.5vw, 4.8rem);
    }

    .homepage-hero-subtitle {
        font-size: clamp(1.1rem, 1.2vw, 1.35rem);
        max-width: 760px;
    }

    .section-header-left {
        max-width: 1040px;
    }

    .section-intro {
        font-size: clamp(1.1rem, 1.2vw, 1.3rem);
        max-width: 880px;
    }

    .homepage-preview-card {
        padding: clamp(40px, 4vw, 60px);
    }

    .homepage-preview-card h3 {
        font-size: clamp(1.3rem, 1.5vw, 1.6rem);
    }

    .homepage-preview-card p {
        font-size: clamp(1rem, 1.1vw, 1.15rem);
    }

    .section-header-block {
        margin-bottom: 72px;
    }

    .section-tag {
        font-size: 0.82rem;
    }
}
