/**
 * Aktualni Bonusove Kody Section
 * Homepage hero section - Built strictly from Figma design
 *
 * @package Bonusovekody
 * @since 2.0.0
 */

/* ============================================
 * SECTION WRAPPER
 * ============================================ */

#homepage-hero .container {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding-top: var(--container-padding);
}

/* ============================================
 * GRID LAYOUT
 * ============================================ */

#homepage-hero .row {
    display: flex;
    flex-wrap: wrap;
}

#homepage-hero .row-cards {
    margin-top: var(--space-7);
    margin-bottom: 0;
}

#homepage-hero .btn .btn-primary {
    margin-bottom: 0;
}

/* Column Sizes - Mobile First */
.col-hero-content,
.col-hero-image,
.col-full {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-hero-image {
    margin-top: var(--space-7);
}

/* ============================================
 * HERO CONTENT (Left Column)
 * ============================================ */

#homepage-hero .section__heading {
    font-family: var(--font-heading);
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-black);
    line-height: var(--line-height-h1);
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);
    max-width: 550px;
}

#homepage-hero .section__description {
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

#homepage-hero .section__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    align-items: flex-start;
}

/* ============================================
 * HERO IMAGE (Right Column)
 * ============================================ */

.hero-image-wrapper {
    display: flex;
    justify-content: center;
}

.hero-image {
    max-width: 500px;
    width: 100%;
    height: auto;
}

/* ============================================
 * INFO CARDS (Full Width Row Below)
 * ============================================ */

/* CRITICAL: 4-column grid layout on desktop */
.card-link-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.info-card {
    display: flex;
    align-items: center;
    background: #F3FDEC;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-5);
    position: relative;
    transition: all var(--transition-base) var(--ease-out);
}

.card-link:hover .info-card {
    transform: translateY(-2px);
}

.info-card__icon {
    flex-shrink: 0;
    width: var(--space-9);
    height: var(--space-9);
    margin-right: var(--space-4);
    background: #D9F8C3;
    padding: 10px;
    border-radius: var(--radius-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-card__icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.info-card__heading {
    font-family: var(--font-heading);
    font-size: var(--font-size-h5);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--color-text-primary);
    margin: 0;
    padding-right: var(--space-6);
}

/* ============================================
 * Top Stories
 * ============================================ */

.section__top-stories:has(.topStories) {
		margin-top: var(--space-6);
}

/* ============================================
 * RESPONSIVE - TABLET & DESKTOP
 * ============================================ */

@media (min-width: 768px) {
    /* Two column layout (50/50) for hero row */
    .col-hero-content {
        flex: 0 0 50%;
        max-width: 50%;
        margin-top: 20px;
    }

    .col-hero-image {
        flex: 0 0 50%;
        max-width: 50%;
        margin-top: 0;
    }

    /* CRITICAL: 4 cards in single horizontal row - full width below */
    .card-link-list {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ============================================
 * RESPONSIVE - DESKTOP LARGE
 * ============================================ */

@media (max-width: 1024px) {
    #homepage-hero .row-hero {
        display: flex;
        flex-direction: column;
    }

    .col-hero-content {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 0;
        order: 1;
    }

    .col-hero-image {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 0;
        order: 2;
    }

    .section__top-stories {
        order: 3;
        width: 100%;
    }

    /* Move top stories outside of col-hero-content */
    .col-hero-content .section__top-stories {
        position: absolute;
        left: 0;
        right: 0;
        margin-top: 0;
    }

    .col-hero-image {
        margin-top: 32px;
    }

    .section__top-stories:has(.topStories) {
        position: relative;
        margin-top: 32px;
    }

    .hero-image-wrapper {
        display: flex;
        justify-content: center;
    }

    .card-link-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hero-image {
        max-width: 300px;
        width: 100%;
        height: auto;
    }
}

/* ============================================
 * RESPONSIVE - MOBILE
 * ============================================ */
@media (max-width: 767px) {
    .card-link-list {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .hero-image-wrapper {
        margin-top: 16px;
        margin-bottom: 16px;
        display: flex;
        justify-content: center;
    }

    .col-hero-image {
        margin-top: 8px;
    }

    #homepage-hero .row-cards {
        margin-top: 16px;
        margin-bottom: 0;
    }   

    .hero-image {
        max-width: 250px;
    }

}