/* ---------------------------------
   Thoughts Page Layout

   Consolidated from the old reviews.css and posts.css, which were
   identical apart from their class name prefixes. Colors, spacing,
   borders, thumbnail sizes, hover effects and breakpoints are carried
   over unchanged; the only new piece is the REVIEW / POST type label.
--------------------------------- */

.container {
    width: min(100% - 48px, 900px);
    margin: 0 auto;

    padding-top: 70px;
    padding-bottom: 80px;
}


/* ---------------------------------
   Thoughts Page Header
--------------------------------- */

.page-header {
    margin-bottom: 40px;
}

.page-header h1 {
    margin: 0;

    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1;

    letter-spacing: -0.05em;

    color: var(--accent);
}

.page-description {
    max-width: 600px;

    margin-top: 20px;

    font-size: 1.1rem;

    color: var(--muted-text);
}


/* ---------------------------------
   Search
--------------------------------- */

.search-form {
    max-width: 650px;

    display: flex;
    gap: 10px;

    margin-bottom: 64px;
}

.search-form input {
    flex: 1;

    padding: 14px 16px;

    font: inherit;

    background-color: var(--surface);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 10px;

    outline: none;
}

.search-form input:focus {
    border-color: var(--brand);
}

.search-form button {
    padding: 14px 22px;

    font: inherit;
    font-weight: 600;

    border: none;
    border-radius: 10px;

    background-color: var(--brand);
    color: white;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.15s ease;
}

.search-form button:hover {
    background-color: var(--accent);

    transform: translateY(-1px);
}


/* ---------------------------------
   Thought List
--------------------------------- */

.section-title {
    margin-bottom: 20px;

    font-size: 0.85rem;

    text-transform: uppercase;

    letter-spacing: 0.12em;

    color: var(--muted-text);
}

.thought-list {
    display: grid;

    gap: 18px;

    padding-bottom: 80px;
}

.no-thoughts {
    color: var(--muted-text);
}


/* ---------------------------------
   Thought Card
--------------------------------- */

.thought-card {
    background-color: var(--surface);

    border: 1px solid var(--border);
    border-radius: 14px;

    overflow: hidden;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.thought-card:hover {
    transform: translateY(-2px);

    border-color: var(--brand);

    box-shadow: 0 6px 18px rgba(178, 58, 72, 0.12);
}

.thought-link {
    display: block;

    padding: 20px;

    color: inherit;

    text-decoration: none;
}


/* ---------------------------------
   Thought Card Layout
--------------------------------- */

.thought-card-layout {
    display: flex;

    gap: 24px;

    min-height: 190px;
}


/* ---------------------------------
   Thought Thumbnail
--------------------------------- */

.thought-thumbnail-container {
    flex: 0 0 135px;

    width: 135px;
    height: 190px;

    overflow: hidden;

    border-radius: 10px;

    background-color: var(--border);
}

.thought-card .thought-thumbnail {
    display: block;

    width: 135px;
    height: 190px;

    max-width: 135px;

    object-fit: cover;
}


/* ---------------------------------
   Thought Card Information
--------------------------------- */

.thought-card-info {
    flex: 1;

    min-width: 0;

    display: flex;
    flex-direction: column;
}


/* ---------------------------------
   Thought Card Type + Title + Rating
--------------------------------- */

.thought-card-top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;
}

.thought-card-heading {
    min-width: 0;
}

.thought-kind {
    display: inline-block;

    margin-bottom: 8px;

    padding: 3px 9px;

    font-size: 0.68rem;
    font-weight: 700;

    line-height: 1.4;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    color: var(--brand);

    background-color: var(--brand-hover);

    border-radius: 999px;
}

.thought-title {
    margin: 0;

    font-size: 1.3rem;

    line-height: 1.3;

    letter-spacing: -0.02em;

    color: var(--text);
}

.thought-rating {
    flex-shrink: 0;

    font-weight: 700;

    color: var(--accent);
}


/* ---------------------------------
   Thought Preview
--------------------------------- */

.thought-preview {
    margin: 18px 0 20px;

    max-width: 550px;

    line-height: 1.6;

    color: var(--text);
}


/* ---------------------------------
   Thought Date
--------------------------------- */

.thought-date {
    margin: auto 0 0;

    text-align: right;

    font-size: 0.9rem;

    color: var(--muted-text);
}


/* ---------------------------------
   Thought Detail Page
--------------------------------- */

.thought-detail {
    max-width: 800px;

    margin: 0 auto;

    padding: 70px 24px 100px;
}

.back-link {
    display: inline-block;

    margin-bottom: 56px;

    color: var(--muted-text);

    text-decoration: none;

    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--brand);
}


/* ---------------------------------
   Thought Detail Hero
--------------------------------- */

.thought-detail-hero {
    display: flex;
    align-items: center;

    gap: 36px;
}

.thought-detail-image {
    width: 200px;
    height: 280px;

    flex-shrink: 0;

    object-fit: cover;

    border-radius: 14px;

    background-color: var(--surface);

    border: 1px solid var(--border);

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.thought-detail-header {
    flex: 1;

    margin-bottom: 0;
}

.thought-label {
    margin: 0 0 12px;

    font-size: 0.8rem;
    font-weight: 600;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    color: var(--brand);
}

.thought-detail h1 {
    margin: 0;

    font-size: clamp(2.4rem, 6vw, 4rem);

    line-height: 1.05;

    letter-spacing: -0.045em;

    color: var(--accent);
}

.thought-meta {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-top: 20px;

    color: var(--muted-text);
}

.thought-detail-rating {
    font-weight: 700;

    color: var(--brand);
}


/* ---------------------------------
   Thought Body
--------------------------------- */

.thought-divider {
    margin: 48px 0;

    border: none;

    border-top: 1px solid var(--border);
}

.thought-body {
    font-size: 1.1rem;

    line-height: 1.8;

    color: var(--text);
}

.thought-body p {
    margin: 0 0 24px;
}


/* ---------------------------------
   Responsive - Tablet
--------------------------------- */

@media (max-width: 700px) {

    .container {
        width: min(100% - 32px, 900px);

        padding-top: 50px;
    }

    .page-header {
        margin-bottom: 32px;
    }

    .search-form {
        flex-direction: column;
    }


    /* Thought Cards */

    .thought-card-layout {
        gap: 16px;

        min-height: 160px;
    }

    .thought-thumbnail-container {
        flex: 0 0 110px;

        width: 110px;
        height: 160px;
    }

    .thought-card .thought-thumbnail {
        width: 110px;
        height: 160px;

        max-width: 110px;
    }

    .thought-card-top {
        gap: 12px;
    }

    .thought-kind {
        margin-bottom: 6px;
    }

    .thought-title {
        font-size: 1.1rem;
    }

    .thought-preview {
        margin-top: 14px;

        font-size: 0.95rem;
    }


    /* Thought Detail */

    .thought-detail {
        padding:
            50px
            20px
            80px;
    }

    .back-link {
        margin-bottom: 36px;
    }

    .thought-detail-hero {
        align-items: flex-start;

        gap: 24px;
    }

    .thought-detail-image {
        width: 150px;
        height: 210px;
    }

    .thought-meta {
        flex-wrap: wrap;
    }
}


/* ---------------------------------
   Responsive - Mobile
--------------------------------- */

@media (max-width: 500px) {

    .thought-link {
        padding: 16px;
    }


    /* Thought Cards */

    .thought-card-layout {
        gap: 14px;

        min-height: 130px;
    }

    .thought-thumbnail-container {
        flex: 0 0 90px;

        width: 90px;
        height: 130px;
    }

    .thought-card .thought-thumbnail {
        width: 90px;
        height: 130px;

        max-width: 90px;
    }

    .thought-card-top {
        flex-direction: column;

        gap: 4px;
    }

    .thought-preview {
        margin: 12px 0;

        font-size: 0.9rem;
    }

    .thought-date {
        margin-top: auto;

        font-size: 0.8rem;
    }


    /* Thought Detail */

    .thought-detail-hero {
        flex-direction: column;
    }

    .thought-detail-image {
        width: 180px;
        height: 250px;
    }
}
