/* ==========================================================================
   MOMOBUD — Our Milestones Page  |  Premium Editorial Redesign
   Reference: The attached design image.
   ZERO PHP logic changes. Pure CSS/visual layer only.
   ========================================================================== */

/* ─── Reset & base ───────────────────────────────────────────────── */
.page-milestones-redesign {
    font-family: 'Inter', sans-serif;
    color: #2d2d2d;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.page-milestones-redesign *,
.page-milestones-redesign *::before,
.page-milestones-redesign *::after {
    box-sizing: border-box;
}

.page-milestones-redesign a {
    text-decoration: none;
    color: inherit;
    transition: color 0.25s ease;
}

.page-milestones-redesign img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─── Inner container ────────────────────────────────────────────── */
.milestones-hero-container,
.milestones-featured-section,
.milestones-all-stories,
.newsletter-container,
.milestones-features-section .container {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ══════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════ */
.milestones-hero-section {
    position: relative;
    background-color: #fdf6f0;
    padding: 120px 0 120px;
    margin-bottom: 0;
    border-bottom: 1px solid #f0e6dc;
    overflow: hidden;
}

.milestones-hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background-image: url('../images/milestones-bg.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    z-index: 0;
}

.milestones-hero-container {
    position: relative;
    z-index: 2;
}

.milestones-hero-content {
    max-width: 600px;
}

.milestones-hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(42px, 5vw, 68px);
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 18px 0;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.milestones-hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #2d2d2d;
    margin: 0 0 32px 0;
    line-height: 1.55;
}

.milestones-hero-desc {
    font-size: 14.5px;
    color: #666;
    line-height: 1.85;
    padding-top: 28px;
    border-top: 2px solid #e27d60;
    max-width: 400px;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════
   SECTION LABELS
   ══════════════════════════════════════════════════════════════════ */
.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

/* ══════════════════════════════════════════════════════════════════
   FEATURED STORY SECTION
   ══════════════════════════════════════════════════════════════════ */
.milestones-featured-section {
    padding: 64px 24px 64px;
    margin-top: 10px !important;
}

/* Row: title on left, VIEW ALL on right (absolute inside sidebar) */
.featured-story-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 36px;
    align-items: start;
    margin-top: 28px;
}

/* ── Main featured card ── */
.featured-story-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.featured-story-main:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.11);
}

/* image side */
.featured-story-image {
    position: relative;
    overflow: hidden;
    background: #f5ede6;
}

.featured-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 300px;
    display: block;
    transition: transform 0.5s ease;
}

.featured-story-main:hover .featured-story-image img {
    transform: scale(1.04);
}

/* info side */
.featured-story-info {
    padding: 36px 32px 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.story-category {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #e27d60;
}

.story-date {
    font-size: 11px;
    color: #aaa;
    letter-spacing: 0.5px;
}

.featured-story-main .story-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a1a;
    margin: 0 0 14px 0;
}

.featured-story-main .story-title a {
    color: #1a1a1a;
}

.featured-story-main .story-title a:hover {
    color: #e27d60;
}

.featured-story-main .story-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* READ ARTICLE button */
.btn-read-article {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e27d60;
    color: #fff !important;
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: fit-content;
    transition: background 0.25s ease, transform 0.2s ease;
}

.btn-read-article:hover {
    background: #cf6a4c;
    transform: translateX(2px);
    color: #fff !important;
}

/* ── Right sidebar list ── */
.featured-sidebar {
    display: flex;
    flex-direction: column;
}

/* VIEW ALL sits above the sidebar */
.sidebar-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 18px;
}

.view-all-stories {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e27d60;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: gap 0.2s ease;
}

.view-all-stories:hover {
    gap: 10px;
    color: #cf6a4c;
}

.sidebar-stories-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-top: 1px solid #f0e6dc;
}

.sidebar-story-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0e6dc;
    background: transparent;
    transition: background 0.2s ease;
}

.sidebar-story-item:hover {
    background: #fdf6f0;
}

.sidebar-story-image {
    flex: none;
    overflow: hidden;
    border-radius: 10px;
}

.sidebar-story-image img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform 0.4s ease;
}

.sidebar-story-item:hover .sidebar-story-image img {
    transform: scale(1.06);
}

.sidebar-story-info {
    flex: 1;
}

.sidebar-story-info .story-meta {
    margin-bottom: 6px;
    gap: 8px;
}

.sidebar-story-info .story-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: #1a1a1a;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-story-info .story-title a:hover {
    color: #e27d60;
}

/* ══════════════════════════════════════════════════════════════════
   ALL STORIES — header row
   ══════════════════════════════════════════════════════════════════ */
.milestones-all-stories {
    padding: 0 24px 80px;
    margin-top: 30px !important;
}

.all-stories-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 36px;
}

.all-stories-header .section-title {
    flex: none;
}

/* ── Filter pills ── */
.stories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-btn {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    background: #f5f0eb;
    border: 1px solid transparent;
    padding: 7px 18px;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
    line-height: 1;
}

.filter-btn:hover {
    color: #e27d60;
    border-color: #e27d60;
    background: #fff7f4;
}

.filter-btn.active {
    background: #e27d60;
    color: #fff;
    border-color: #e27d60;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════
   STORY CARDS GRID
   ══════════════════════════════════════════════════════════════════ */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Card */
.story-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f0e6dc;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.story-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.10);
}

/* Card image */
.story-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f5ede6;
}

.story-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.story-card:hover .story-card-image img {
    transform: scale(1.06);
}

/* Badge (category) — top-left overlay */
.story-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e27d60;
    color: #e27d60;
    font-size: 9.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 100px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Date — top-right overlay */
.story-card-date {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #333;
    background: rgba(255, 255, 255, 0.82);
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Card content */
.story-card-content {
    padding: 20px 20px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.story-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-title a {
    color: #1a1a1a;
}

.story-card-title a:hover {
    color: #e27d60;
}

.story-card-excerpt {
    font-size: 13.5px;
    color: #777;
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More link */
.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #e27d60;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: gap 0.2s ease, color 0.2s ease;
    margin-top: auto;
}

.btn-read-more:hover {
    gap: 9px;
    color: #cf6a4c;
}

/* ══════════════════════════════════════════════════════════════════
   LOAD MORE
   ══════════════════════════════════════════════════════════════════ */
.load-more-container {
    text-align: center;
    margin-top: 52px;
}

.btn-load-more {
    font-family: 'Inter', sans-serif;
    background: #e27d60;
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 16px rgba(226, 125, 96, 0.30);
}

.btn-load-more:hover {
    background: #cf6a4c;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(226, 125, 96, 0.40);
}

/* ══════════════════════════════════════════════════════════════════
   NEWSLETTER SECTION
   ══════════════════════════════════════════════════════════════════ */
.milestones-newsletter-section {
    background: #fdf6f0;
    padding: 52px 0;
    border-top: 1px solid #f0e6dc;
    border-bottom: 1px solid #f0e6dc;
    margin-top: 30px !important;
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
}

.newsletter-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.newsletter-fruit-img {
    width: 80px;
    height: auto;
    flex-shrink: 0;
}

.newsletter-text h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 5px 0;
}

.newsletter-text p {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

.newsletter-right {
    flex: 0 0 420px;
    max-width: 100%;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 13px 18px;
    border: 1px solid #e0d5cc;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-form input[type="email"]:focus {
    border-color: #e27d60;
    box-shadow: 0 0 0 3px rgba(226, 125, 96, 0.12);
}

.newsletter-form button {
    background: #e27d60;
    color: #fff;
    border: none;
    padding: 13px 26px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    transition: background 0.25s ease, transform 0.2s ease;
}

.newsletter-form button:hover {
    background: #cf6a4c;
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════
   TRUST FEATURES BAR
   ══════════════════════════════════════════════════════════════════ */
.milestones-features-section {
    background: #fdf6f0 !important;
    padding: 52px 0;
    border-top: 1px solid #f0e6dc;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.milestones-features-section .feature-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 14px !important;
}

.milestones-features-section .feature-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.milestones-features-section .feature-text h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px 0 !important;
    font-family: 'Inter', sans-serif;
    text-align: left !important;
}

.milestones-features-section .feature-text p {
    font-size: 12.5px;
    color: #888;
    margin: 0 !important;
    line-height: 1.5;
    text-align: left !important;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-story-grid {
        grid-template-columns: 1fr;
    }

    .featured-sidebar {
        width: 100%;
    }

    .sidebar-header {
        justify-content: flex-start;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .milestones-hero-content {
        max-width: 60%;
    }
}

@media (max-width: 768px) {
    .milestones-hero-section {
        padding: 56px 0;
        margin-top: -20px;
    }

    .milestones-hero-content {
        max-width: 100%;
    }

    .milestones-hero-title {
        font-size: 40px;
    }

    .featured-story-main {
        grid-template-columns: 1fr;
    }

    .featured-story-image img {
        min-height: 220px;
        max-height: 280px;
    }

    .all-stories-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .newsletter-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .newsletter-right {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .milestones-hero-title {
        font-size: 32px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

/* ══════════════════════════════════════════════════════════════════
   HERO SECTION MOBILE RESPONSIVENESS OVERRIDES
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .milestones-hero-section {
        position: relative !important;
        background: linear-gradient(135deg, rgba(253, 249, 244, 0.94) 0%, rgba(253, 249, 244, 0.82) 55%, rgba(253, 249, 244, 0.45) 100%), url('../images/milestones-bg.jpg') no-repeat right center / cover !important;
        padding: 46px 0 !important;
        margin-top: 0 !important;
        margin-bottom: 40px !important;
        min-height: auto !important;
        overflow: hidden !important;
    }

    .milestones-hero-section::before {
        display: none !important;
        content: none !important;
    }

    .milestones-hero-container {
        padding: 0 24px !important;
        margin: 0 auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .milestones-hero-content {
        max-width: 100% !important;
        width: 100% !important;
        position: relative !important;
        z-index: 2 !important;
    }

    .milestones-hero-title {
        font-size: 2.2rem !important;
        line-height: 1.25 !important;
        margin-bottom: 16px !important;
        color: #1a1a1a !important;
        font-weight: 600 !important;
    }

    .milestones-hero-subtitle {
        font-size: 1.05rem !important;
        line-height: 1.55 !important;
        margin-bottom: 20px !important;
        color: #2d2d2d !important;
        font-weight: 500 !important;
    }

    .milestones-hero-desc {
        font-size: 0.92rem !important;
        line-height: 1.65 !important;
        padding-top: 20px !important;
        border-top: 2px solid #e27d60 !important;
        color: #444 !important;
        max-width: 100% !important;
    }

    .milestones-hero-section br {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .milestones-hero-container {
        padding: 0 20px !important;
    }
    .milestones-hero-title {
        font-size: 1.9rem !important;
    }
    .milestones-hero-subtitle {
        font-size: 0.98rem !important;
    }
}
