/* ==========================================================================
   Pregnancy Sleep Position Guide
   Prefix: spg-
   ========================================================================== */

/* --------------------------------------------------------------------------
   Trimester Filter Tabs
   -------------------------------------------------------------------------- */

.spg-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 16px auto 24px;
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.spg-tab {
    padding: 8px 20px;
    border: 2px solid #8B7BB8;
    border-radius: 24px;
    background: #fff;
    color: #8B7BB8;
    font-family: Nunito, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.spg-tab:hover {
    background: rgba(139, 123, 184, 0.08);
}

.spg-tab-active {
    background: #8B7BB8;
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 123, 184, 0.25);
}

.spg-tab-active:hover {
    background: #7a6aa7;
}

/* --------------------------------------------------------------------------
   Position Cards Grid
   -------------------------------------------------------------------------- */

.spg-position-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 0 auto 32px;
    padding: 0 16px;
}

.spg-position-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(61, 47, 80, 0.10);
    padding: 24px;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
}

/* --------------------------------------------------------------------------
   Card Header (Emoji + Name)
   -------------------------------------------------------------------------- */

.spg-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.spg-card-emoji {
    font-size: 36px;
    line-height: 1;
}

.spg-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #3D2F50;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Rating Badges
   -------------------------------------------------------------------------- */

.spg-rating-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.spg-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.spg-badge-recommended {
    background: #e8f5e9;
    color: #2e7d32;
}

.spg-badge-okay {
    background: #e3f2fd;
    color: #1565c0;
}

.spg-badge-caution {
    background: #fff8e1;
    color: #f57f17;
}

.spg-badge-avoid {
    background: #ffebee;
    color: #c62828;
}

/* --------------------------------------------------------------------------
   Card Description
   -------------------------------------------------------------------------- */

.spg-card-desc {
    color: #695A80;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 16px;
}

/* --------------------------------------------------------------------------
   Benefits & Considerations Lists
   -------------------------------------------------------------------------- */

.spg-section {
    margin-bottom: 12px;
}

.spg-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #3D2F50;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spg-benefits,
.spg-considerations {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spg-benefits li,
.spg-considerations li {
    list-style: none;
}

.spg-benefits li,
.spg-considerations li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #3D2F50;
}

.spg-benefits li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #2e7d32;
    font-weight: 700;
}

.spg-considerations li::before {
    content: "\26A0";
    position: absolute;
    left: 0;
    color: #f57f17;
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   Pillow Tip Box
   -------------------------------------------------------------------------- */

.spg-pillow-tip {
    background: #f5f0ff;
    border-left: 3px solid #8B7BB8;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #3D2F50;
    margin-top: 12px;
}

.spg-pillow-tip strong {
    color: #8B7BB8;
}

/* --------------------------------------------------------------------------
   Relieves & Note Tags
   -------------------------------------------------------------------------- */

.spg-relieves {
    margin-top: 10px;
    font-size: 13px;
    color: #695A80;
    font-style: italic;
}

.spg-note {
    margin-top: 10px;
    font-size: 13px;
    color: #c62828;
    background: #ffebee;
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Filter States (JS-controlled)
   -------------------------------------------------------------------------- */

.spg-dimmed {
    opacity: 0.35;
    pointer-events: none;
    transform: scale(0.97);
}

.spg-highlighted {
    box-shadow: 0 8px 32px rgba(61, 47, 80, 0.10), 0 0 0 2px rgba(123, 200, 184, 0.4);
    border-left: 4px solid #7BC8B8;
}

/* --------------------------------------------------------------------------
   Relief Tips Section
   -------------------------------------------------------------------------- */

.spg-relief-section {
    margin: 32px auto;
    padding: 0 16px;
}

.spg-relief-heading {
    font-size: 22px;
    font-weight: 700;
    color: #3D2F50;
    text-align: center;
    margin: 0 0 20px;
}

.spg-relief-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.spg-relief-card {
    background: #fff;
    border: 1.5px solid rgba(139, 123, 184, 0.10);
    border-radius: 14px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.spg-relief-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(61, 47, 80, 0.10);
}

.spg-relief-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.spg-relief-emoji {
    font-size: 28px;
    line-height: 1;
}

.spg-relief-name {
    font-size: 16px;
    font-weight: 700;
    color: #3D2F50;
    margin: 0;
}

.spg-relief-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spg-relief-list li {
    list-style: none;
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #695A80;
}

.spg-relief-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: #7BC8B8;
    font-weight: 700;
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   Disclaimer
   -------------------------------------------------------------------------- */

.spg-disclaimer {
    margin: 0 auto 32px;
    padding: 0 16px;
    font-size: 13px;
    color: #695A80;
    font-style: italic;
    text-align: center;
    line-height: 1.5;
}

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

@media (max-width: 768px) {
    .spg-relief-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .spg-tabs {
        gap: 6px;
        padding: 0 12px;
    }

    .spg-tab {
        padding: 6px 14px;
        font-size: 14px;
    }

    .spg-position-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 12px;
    }

    .spg-position-card {
        padding: 18px;
    }

    .spg-card-emoji {
        font-size: 30px;
    }

    .spg-card-name {
        font-size: 16px;
    }

    .spg-relief-section {
        padding: 0 12px;
    }

    .spg-relief-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .spg-relief-heading {
        font-size: 19px;
    }

    .spg-disclaimer {
        padding: 0 12px;
    }
}
