/* =============================================================================
   The Pink Elephant Company — Homepage Stylesheet (home.css)
   Sections: hero, category pills, home layout, post grid, sidebar
   ============================================================================= */

/* -----------------------------------------------------------------------------
   HERO BANNER
   ----------------------------------------------------------------------------- */
.hero {
    position: relative;
    width: 100%;
    min-height: 480px;
    overflow: hidden;
}

/* Background image layer */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}

/* Pink/magenta semi-transparent overlay */
.hero__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(229, 0, 125, 0.55); /* --color-pink at 55% */
}

/* Content layer: text left, elephant right */
.hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 480px;
    padding-bottom: 40px;
    padding-top: 60px;
    gap: 24px;
}

.hero__text {
    flex: 1;
    max-width: 660px;
    padding-bottom: 0;
}

.hero__title {
    font-family: var(--font-primary);
    font-size: var(--fs-h1-hero);
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.05;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero__subtitle {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 400;
    color: var(--color-white);
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Elephant illustration — right side, slightly overflows bottom */
.hero__elephant {
    flex-shrink: 0;
    align-self: center;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

.hero__elephant-img {
    width: auto;
    height: 440px;
    max-height: 60vw;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.25));
}

/* -----------------------------------------------------------------------------
   CATEGORY PILLS ROW
   ----------------------------------------------------------------------------- */
.home-pills {
    padding: 16px 0 8px;
    background-color: var(--color-white);
}

.home-pills .pill-bar {
    padding: 8px 0;
    justify-content: flex-start;
}

/* Default pill: gold border, gold text colour */
.home-pills .pill {
    background-color: var(--color-gold); border: none;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
}

.home-pills .pill:hover {
    background-color: var(--color-pink);
    border-color: var(--color-pink);
    color: var(--color-white);
}

/* -----------------------------------------------------------------------------
   HOME MAIN LAYOUT — 2-column grid
   ----------------------------------------------------------------------------- */
.home-main {
    padding-top: 48px;
    padding-bottom: 64px;
}

.home-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

/* -----------------------------------------------------------------------------
   POSTS GRID (left column)
   ----------------------------------------------------------------------------- */
.home-posts .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 28px;
    padding: 0;
}

/* Override global post-card styles for homepage context */
.home-posts .post-card__body {
    gap: 6px;
}

.home-posts .post-card__body-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.home-posts .post-card__title {
    font-size: 20px;
}

.home-posts .post-card__meta-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.home-posts .post-card__meta-views {
    font-family: var(--font-meta);
    font-size: var(--fs-meta);
    color: #aaa;
}

/* Empty state */
.home-posts__empty {
    grid-column: 1 / -1;
    color: #888;
    font-style: italic;
    padding: 32px 0;
}

/* ALL POSTS button */
.home-all-posts {
    display: flex;
    justify-content: center;
    padding: 40px 0 8px;
}

.btn-all-posts {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 48px;
    background-color: var(--color-pink);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: var(--fs-body);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-all-posts:hover {
    background-color: var(--color-mauve);
    color: var(--color-white);
}

/* -----------------------------------------------------------------------------
   SIDEBAR (right column)
   ----------------------------------------------------------------------------- */
.home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

/* Generic sidebar block */
.sidebar-block {
    background-color: var(--color-white);
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-block__img-link {
    display: block;
    overflow: hidden;
}

.sidebar-block__img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.sidebar-block__img-link:hover .sidebar-block__img {
    transform: scale(1.03);
}

.sidebar-block__img--shop {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.sidebar-block__body {
    padding: 16px 12px 20px;
}

/* Block titles */
.sidebar-block__title {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-mauve);
    line-height: 1.35;
    margin-bottom: 14px;
}

.sidebar-block__title--shop {
    color: var(--color-pink);
    font-size: 20px;
}

/* Sidebar CTA buttons */
.sidebar-block__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 28px;
    background-color: var(--color-pink);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.sidebar-block__btn:hover {
    background-color: var(--color-mauve);
    color: var(--color-white);
}

.sidebar-block__btn--shop {
    background-color: var(--color-mauve);
}

.sidebar-block__btn--shop:hover {
    background-color: var(--color-pink);
}

/* Block 3: Follow the Legend / Social */
.sidebar-block--social {
    background-color: var(--color-pink);
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-block--social .sidebar-block__banner {
    width: 100%;
    height: auto;
    display: block;
}

/* Social icons row */
.sidebar-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 20px 20px;
    list-style: none;
}

.sidebar-social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-social__link:hover {
    transform: scale(1.12);
    opacity: 0.88;
}

.sidebar-social__icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    /* Make icons white/visible on pink background */
    filter: brightness(0) invert(1);
}

/* -----------------------------------------------------------------------------
   RESPONSIVE — Tablet (max 1100px)
   ----------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .home-layout {
        grid-template-columns: 1fr 280px;
        gap: 32px;
    }

    .hero__elephant-img {
        height: 300px;
    }
}

/* -----------------------------------------------------------------------------
   RESPONSIVE — Small tablet / large mobile (max 900px)
   ----------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .home-layout {
        grid-template-columns: 1fr;
    }

    .home-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .sidebar-block--social {
        grid-column: 1 / -1;
    }

    .hero__elephant {
        display: none; /* hide on smaller screens to preserve text readability */
    }
}

/* -----------------------------------------------------------------------------
   RESPONSIVE — Mobile (max 768px) — inherits from style.css breakpoint
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero {
        min-height: 280px;
    }

    .hero__content {
        min-height: 280px;
        padding-bottom: 28px;
        padding-top: 40px;
    }

    .hero__title {
        font-size: var(--fs-h1-hero); /* already overridden to 38px in style.css */
    }

    .hero__subtitle {
        font-size: 16px;
    }

    .home-main {
        padding-top: 28px;
        padding-bottom: 40px;
    }

    .home-posts .post-grid {
        grid-template-columns: 1fr;
    }

    .home-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-block--social {
        grid-column: auto;
    }

    .home-pills .pill-bar {
        gap: 6px;
    }
}

/* -----------------------------------------------------------------------------
   RESPONSIVE — Very small mobile (max 480px)
   ----------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .btn-all-posts {
        padding: 12px 32px;
        width: 100%;
        max-width: 280px;
    }
}

/* === OVERRIDE: Gold filled pills === */
.home-pills .pill,
.pill-bar .pill {
    background-color: #988B57 !important;
    color: #fff !important;
    border: none !important;
}
.home-pills .pill:hover,
.pill-bar .pill:hover {
    background-color: #E5007D !important;
    color: #fff !important;
}
