/* =============================================================================
   The Pink Elephant Company — Global Stylesheet
   Design: Unigraf (pixel-perfect migration from thepinkelephantcompany.ch / Wix)
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Google Fonts Import
   ----------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;700&display=swap');

/* -----------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   ----------------------------------------------------------------------------- */
:root {
    /* Colors */
    --color-pink:       #E5007D;
    --color-mauve:      #684155;
    --color-gold:       #988B57;
    --color-shop-mauve: #9C617F;
    --color-black:      #000000;
    --color-white:      #FFFFFF;
    --color-bg:         #FFFFFF;

    /* Typography */
    --font-primary:  'Raleway', sans-serif;
    --font-pills:    'din-next-w01-light', 'DIN Next W01 Light', Arial, sans-serif;
    --font-meta:     'HelveticaNeueW01-45Ligh', 'HelveticaNeueW02-45Ligh', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* Font sizes */
    --fs-h1-hero:     66px;
    --fs-h1-category: 46px;
    --fs-h2:          22px;
    --fs-h3:          25px;
    --fs-body:        16px;
    --fs-pills:       15px;
    --fs-meta:        11px;
    --fs-small:       13px;

    /* Layout */
    --container-max:  1440px;
    --header-height:  140px;
    --gap-sm:         12px;
    --gap-md:         24px;
    --gap-lg:         48px;
}

/* -----------------------------------------------------------------------------
   CSS Reset
   ----------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

body {
    line-height: 1.5;
    font-family: var(--font-primary);
    font-size: var(--fs-body);
    color: var(--color-black);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    background: none;
    border: none;
}

/* -----------------------------------------------------------------------------
   Utility Classes
   ----------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -----------------------------------------------------------------------------
   Typography
   ----------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.1;
}

h1 {
    font-size: var(--fs-h1-hero);
    color: var(--color-pink);
    line-height: 1.1;
}

h1.category-title {
    font-size: var(--fs-h1-category);
    color: var(--color-mauve);
}

h2 {
    font-size: var(--fs-h2);
    color: var(--color-black);
}

h3 {
    font-size: var(--fs-h3);
    color: var(--color-pink);
    line-height: 1.4;
}

p {
    font-family: var(--font-primary);
    font-size: var(--fs-body);
    line-height: 1.6;
    color: var(--color-black);
}

/* -----------------------------------------------------------------------------
   Site Header
   ----------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-white);
    width: 100%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.site-header__inner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    gap: 24px;
}

/* Logo block: elephant logo + "Follow The Legend" text */
.site-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.site-header__logo {
    height: 90px;
    width: auto;
}

.site-header__follow {
    height: 55px;
    width: auto;
}

/* Main navigation */
.site-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}

.site-nav__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.site-nav__item {
    position: relative;
}

.site-nav__link {
    display: flex;
    align-items: center;
    height: var(--header-height);
    padding: 0 14px;
    font-family: var(--font-primary);
    font-size: var(--fs-body);
    font-weight: 400;
    color: var(--color-black);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
    line-height: 1;
}

.site-nav__link:hover,
.site-nav__link--active {
    color: var(--color-pink);
}

.site-nav__link--active {
    font-weight: 700;
}

/* Shop button — far right, mauve background */
.site-header__shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px 20px;
    background-color: var(--color-shop-mauve);
    color: var(--color-white) !important;
    font-family: var(--font-primary);
    font-size: var(--fs-body);
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.site-header__shop-btn--mobile {
    display: none;
}

.site-header__shop-btn:hover {
    background-color: var(--color-mauve);
    color: var(--color-white) !important;
    opacity: 0.92;
}

/* Hamburger toggle (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.nav-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-black);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X when open */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* -----------------------------------------------------------------------------
   Main Content Area
   ----------------------------------------------------------------------------- */
main {
    display: block;
    min-height: calc(100vh - var(--header-height) - 119px);
}

/* -----------------------------------------------------------------------------
   Site Footer
   ----------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--color-gold);
    color: var(--color-white);
    padding: 28px 24px;
}

.site-footer__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer__copyright {
    font-family: var(--font-primary);
    font-size: var(--fs-small);
    font-weight: 400;
    color: var(--color-white);
}

.site-footer__links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.site-footer__links a {
    font-family: var(--font-primary);
    font-size: var(--fs-small);
    color: var(--color-white);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-footer__links a:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   Category Pills / Filter Bar
   ----------------------------------------------------------------------------- */
.pill-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 16px 0;
}

.pill {
    display: inline-block;
    padding: 8px 20px;
    font-family: var(--font-pills);
    font-size: var(--fs-pills);
    font-weight: 400;
    color: #fff;
    background-color: #988B57;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

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

.pill--active,
.pill--active:hover {
    background-color: #E5007D;
    color: #fff;
}

/* -----------------------------------------------------------------------------
   Post Card Component
   ----------------------------------------------------------------------------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    padding: 24px 0;
}

.post-card {
    display: flex;
    flex-direction: column;
    background-color: var(--color-white);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-card__image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.post-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card__image {
    transform: scale(1.04);
}

.post-card__body {
    padding: 20px 0 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.post-card__category {
    font-family: var(--font-pills);
    font-size: var(--fs-pills);
    color: var(--color-pink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-card__title {
    font-family: var(--font-primary);
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--color-black);
    line-height: 1.3;
    text-decoration: none;
    display: block;
}

.post-card__title:hover {
    color: var(--color-pink);
}

.post-card__excerpt {
    font-family: var(--font-meta);
    font-size: var(--fs-meta);
    color: #444;
    line-height: 1.5;
    flex: 1;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-meta);
    font-size: var(--fs-meta);
    color: #888;
    margin-top: 8px;
}

.post-card__meta-date,
.post-card__meta-author {
    white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   Flash Messages
   ----------------------------------------------------------------------------- */
.flash {
    padding: 12px 20px;
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: var(--fs-body);
    font-weight: 500;
    margin: 12px 0;
}

.flash-ok {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-err {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* -----------------------------------------------------------------------------
   Responsive — Mobile (max 768px)
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --fs-h1-hero: 38px;
        --fs-h1-category: 30px;
        --fs-h3: 20px;
        --header-height: 64px;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--color-white);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        /* Hide shop button in mobile nav area, it's shown inline */
    }

    .site-nav.is-open {
        max-height: 480px;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0;
        gap: 0;
    }

    .site-nav__link {
        height: auto;
        padding: 14px 24px;
        border-bottom: 1px solid #f0f0f0;
    }

    .site-header__shop-btn {
        display: none; /* shown inside mobile menu instead */
    }

    .site-nav .site-header__shop-btn--mobile {
        display: flex;
        margin: 12px 24px 16px;
        text-align: center;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-footer__links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

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

/* Tablet breakpoint */
@media (max-width: 1024px) and (min-width: 769px) {
    .site-nav__link {
        padding: 0 10px;
        font-size: 14px;
    }

    .site-header__shop-btn {
        padding: 8px 14px;
        font-size: 14px;
    }

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

/* =============================================================================
   Static text pages (legal, terms, history, contact)
   ============================================================================= */

.page-static {
    max-width: 760px;
    margin: 48px auto 80px;
    padding: 0 24px;
}

.page-static h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--color-text);
}

.legal-section {
    margin-bottom: 32px;
}

.legal-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.legal-section p {
    margin-bottom: 8px;
    line-height: 1.7;
}

.legal-section a {
    color: var(--color-pink);
    text-decoration: underline;
}

.legal-section a:hover {
    opacity: 0.8;
}

/* === POLISH FIXES === */

/* Post card excerpt: proper truncation with hyphens */
.post-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: break-word;
    line-height: 1.5;
    font-size: 14px;
    color: #555;
    margin-top: 6px;
}

/* Post card title: mauve, tighter */
.post-card__title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 18px;
    color: var(--color-mauve);
    line-height: 1.3;
    margin: 8px 0 4px;
}

.post-card__title a {
    color: inherit;
    text-decoration: none;
}

.post-card__title a:hover {
    color: var(--color-pink);
}

/* Post card category badge */
.post-card__category {
    font-family: var(--font-pills);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-pink);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Post card meta (author + date) */
.post-card__meta {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* Single post: title in dark, not pink */
.single-post__title {
    color: #333 !important;
    font-size: 36px;
    font-weight: 700;
}

/* Footer pipe separators */
.site-footer__links a + a::before {
    content: " | ";
    color: rgba(255,255,255,0.5);
    margin: 0 8px;
}

/* Shop button: proper mauve */
.site-header__shop-btn {
    background-color: var(--color-shop-mauve) !important;
}

/* ALL POSTS button: outlined */
.btn-allposts {
    background-color: transparent !important;
    color: var(--color-pink) !important;
    border: 2px solid var(--color-pink) !important;
}
.btn-allposts:hover {
    background-color: var(--color-pink) !important;
    color: #fff !important;
}

/* Recent Posts section (single post page) */
.recent-posts {
    padding: 48px 24px;
    max-width: var(--container-max);
    margin: 0 auto;
    border-top: 1px solid #eee;
}

.recent-posts__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.recent-posts__header h2 {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-black);
}

.recent-posts__see-all {
    font-size: 14px;
    color: var(--color-pink);
    text-decoration: underline;
}

.recent-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.recent-post-card {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.recent-post-card:hover {
    opacity: 0.85;
}

.recent-post-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 4px;
}

.recent-post-card h3 {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-black);
    margin-top: 10px;
    line-height: 1.3;
}

.recent-post-card__meta {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    display: block;
}

@media (max-width: 768px) {
    .recent-posts__grid {
        grid-template-columns: 1fr;
    }
}
