html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* --- General Reset & Fonts --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pyidaungsu', 'Padauk', sans-serif;
}

body {
    background-color: #fcfbfa; /* Off-white background */
    color: #333;
    line-height: 1.6;
    padding-top: var(--header-height);
}

/* --- Color Variables --- */
:root {
    --primary-color: #800020; /* Maroon */
    --accent-color: #d4af37; /* Gold */
    --text-dark: #2c2c2c;
    --white: #ffffff;
    --header-height: 76px;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--primary-color);
    border-bottom: 4px solid var(--accent-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-color);
    font-size: 1.4rem;
    font-weight: bold;
    text-decoration: none;
}

.site-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
}

    .nav-links li a {
        color: var(--white);
        text-decoration: none;
        padding: 8px 16px;
        transition: color 0.3s;
    }

        .nav-links li a:hover {
            color: var(--accent-color);
        }

/* --- Hero Section --- */
.hero-carousel {
    background-color: #2c2c2c;
}

.hero-carousel .carousel-item {
    transition: transform 0.8s ease-in-out;
}

.hero-carousel .carousel-indicators {
    margin-bottom: 1.25rem;
}

.hero-carousel .carousel-indicators [data-bs-target] {
    height: 4px;
    width: 36px;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1609137144813-90ce400b3363?auto=format&fit=crop&w=1200&q=80') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.hero-carousel .hero {
    width: 100%;
}

    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
        color: var(--accent-color);
    }

    .hero p {
        font-size: 1.2rem;
        max-width: 600px;
    }

/* --- Main Container --- */
.page-content {
    width: 100%;
}

section,
footer {
    scroll-margin-top: var(--header-height);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    position: relative;
    font-size: 1.8rem;
}

    .section-title::after {
        content: '';
        display: block;
        width: 80px;
        height: 3px;
        background-color: var(--accent-color);
        margin: 10px auto 0;
    }

.seo-intro {
    background: #fff;
    border-bottom: 1px solid rgba(128, 0, 32, 0.12);
}

.seo-intro .container {
    padding-top: 28px;
    padding-bottom: 28px;
}

.seo-intro h2 {
    color: var(--primary-color);
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.seo-intro p {
    max-width: 900px;
    margin: 0;
    color: #444;
}

/* --- Mission Cards Section --- */
.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s;
}

    .card:hover {
        transform: translateY(-5px);
    }

.card-img {
    width: 100%;
    height: 200px;
    background-color: #ddd;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

    .card-content h3 {
        color: var(--primary-color);
        margin-bottom: 10px;
    }

/* --- Daily Routine Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

    .timeline::after {
        content: '';
        position: absolute;
        width: 2px;
        background-color: var(--accent-color);
        top: 0;
        bottom: 0;
        left: 50%;
        margin-left: -1px;
    }

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

    .timeline-item::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        right: -8px;
        background-color: var(--white);
        border: 4px solid var(--primary-color);
        top: 15px;
        border-radius: 50%;
        z-index: 1;
    }

.left {
    left: 0;
    text-align: right;
}

.right {
    left: 50%;
    text-align: left;
}

    .right::after {
        left: -8px;
    }

.timeline-content {
    padding: 20px;
    background-color: var(--white);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.time {
    font-weight: bold;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    border-top: 4px solid var(--accent-color);
    margin-top: 40px;
}

    footer p {
        font-size: 0.9rem;
        opacity: 0.8;
    }

/* --- Activity List --- */
.activities-page-shell,
.activity-detail-shell {
    background: linear-gradient(180deg, #f8f5ee 0, #f2f3f5 260px);
    min-height: calc(100vh - var(--header-height));
    padding: 42px 18px 56px;
}

.activities-page-container {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.activities-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.activities-eyebrow {
    color: #9a6412;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.activities-page-header h1,
.home-activities-heading h2 {
    color: var(--primary-color);
    font-size: clamp(1.8rem, 4vw, 2.65rem);
    margin: 0;
}

.activities-page-header p {
    color: #65676b;
    margin: 6px 0 0;
}

.activities-result-count {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e4dccd;
    border-radius: 999px;
    color: #65676b;
    padding: 8px 14px;
    white-space: nowrap;
}

.activities-filter {
    align-items: end;
    background: var(--white);
    border: 1px solid #e2ddd4;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(53, 42, 22, 0.07);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(230px, 1fr) 150px 150px auto auto;
    margin-bottom: 28px;
    padding: 16px;
}

.activities-filter label {
    color: #554b3a;
    display: grid;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 5px;
}

.activities-filter input,
.activities-filter select {
    background: #fff;
    border: 1px solid #cfc8bc;
    border-radius: 8px;
    color: #2f2b25;
    min-height: 43px;
    padding: 8px 11px;
    width: 100%;
}

.activities-filter input:focus,
.activities-filter select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 91, 54, 0.14);
    outline: 0;
}

.activities-filter button,
.activities-filter-clear {
    align-items: center;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 43px;
    padding: 8px 16px;
    text-decoration: none;
}

.activities-filter button {
    background: var(--primary-color);
    color: var(--white);
}

.activities-filter-clear {
    background: #f2f0eb;
    color: #5f594f;
}

.activities-card-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.activity-list-card {
    background: var(--white);
    border: 1px solid #e1ddd5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(32, 27, 18, 0.07);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-list-card:hover {
    box-shadow: 0 14px 34px rgba(32, 27, 18, 0.13);
    transform: translateY(-3px);
}

.activity-list-media {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--primary-color), #7a875f);
    display: block;
    overflow: hidden;
    position: relative;
}

.activity-list-media img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    width: 100%;
}

.activity-list-card:hover .activity-list-media img {
    transform: scale(1.035);
}

.activity-list-placeholder {
    color: var(--accent-color);
    display: grid;
    font-size: 3rem;
    font-weight: 800;
    height: 100%;
    place-items: center;
}

.activity-video-badge {
    background: rgba(24, 22, 18, 0.82);
    border-radius: 999px;
    bottom: 10px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 9px;
    position: absolute;
    right: 10px;
}

.activity-list-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.activity-list-date {
    color: #9a6412;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.activity-list-content h2,
.activity-list-content h3 {
    font-size: 1.12rem;
    line-height: 1.45;
    margin: 7px 0 5px;
}

.activity-list-content h2 a,
.activity-list-content h3 a {
    color: #252a20;
    text-decoration: none;
}

.activity-list-location {
    color: #777064;
    font-size: 0.82rem;
    margin-bottom: 7px;
}

.activity-list-content > p {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: #65615a;
    display: -webkit-box;
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 4px 0 16px;
    overflow: hidden;
    white-space: pre-line;
}

.activity-list-footer {
    align-items: center;
    border-top: 1px solid #eeeae3;
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
}

.activity-list-stats {
    color: #777064;
    display: flex;
    font-size: 0.82rem;
    gap: 11px;
}

.activity-read-more {
    color: var(--primary-color);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.activities-empty-state {
    background: #fff;
    border: 1px solid #e1ddd5;
    border-radius: 12px;
    padding: 52px 24px;
    text-align: center;
}

.activities-empty-icon {
    background: var(--primary-color);
    border-radius: 50%;
    color: var(--accent-color);
    display: grid;
    font-size: 1.5rem;
    font-weight: 800;
    height: 54px;
    margin: 0 auto 14px;
    place-items: center;
    width: 54px;
}

.activities-empty-state h2 {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.activities-empty-state p {
    color: #6c675e;
}

.activities-empty-state a {
    color: var(--primary-color);
    font-weight: 700;
}

.activities-pagination {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 34px;
}

.activities-pagination a,
.activities-pagination span {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
    min-height: 38px;
    min-width: 38px;
    padding: 7px 10px;
    text-decoration: none;
}

.activities-pagination a {
    background: #fff;
    border: 1px solid #ddd8cf;
    color: #514c43;
}

.activities-pagination a:hover,
.activities-pagination .active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination-pages {
    display: flex;
    gap: 6px;
}

.activities-pagination .disabled {
    color: #aaa49a;
}

.activity-detail-container {
    margin: 0 auto;
    max-width: 860px;
}

.activity-breadcrumb {
    color: #777064;
    display: flex;
    font-size: 0.88rem;
    gap: 8px;
    margin-bottom: 14px;
    overflow: hidden;
    white-space: nowrap;
}

.activity-breadcrumb a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.activity-breadcrumb span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-detail-card {
    background: #fff;
    border: 1px solid #ddd8cf;
    border-radius: 12px;
    box-shadow: 0 12px 38px rgba(39, 31, 18, 0.1);
    overflow: hidden;
}

.activity-detail-header {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    padding: 24px 24px 10px;
}

.activity-detail-kicker {
    color: #9a6412;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.activity-detail-header h1 {
    color: #24291f;
    font-size: clamp(1.4rem, 4vw, 2.1rem);
    line-height: 1.35;
    margin: 4px 0 5px;
}

.activity-detail-description {
    color: #292722;
    line-height: 1.8;
    margin: 0;
    padding: 8px 24px 22px;
    white-space: pre-line;
}

.activity-detail-card .activity-comments h2 {
    color: #343a2c;
    font-size: 1.05rem;
    margin: 4px 0 12px;
}

.activity-comments-empty {
    color: #777064;
    font-size: 0.9rem;
}

.activity-back-link {
    color: var(--primary-color);
    display: inline-block;
    font-weight: 700;
    margin-top: 18px;
    text-decoration: none;
}

.home-activities-section {
    background: #f8f5ee;
    margin-top: 42px;
    padding: 48px 18px;
}

.home-activities-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 22px;
}

.home-activities-heading > a {
    color: var(--primary-color);
    font-weight: 800;
    text-decoration: none;
}

/* --- Activity Feed and Detail Shared Components --- */
.activity-feed-shell {
    background: #f2f3f5;
    min-height: calc(100vh - var(--header-height));
    padding: 28px 16px;
}

.activity-feed {
    max-width: 760px;
    margin: 0 auto;
}

.activity-feed-title {
    margin-bottom: 20px;
}

.activity-feed-title h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.activity-feed-title p {
    color: #65676b;
    margin: 0;
}

.activity-post-card {
    background: var(--white);
    border: 1px solid #dddfe2;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    margin-bottom: 18px;
    overflow: hidden;
}

.activity-post-header {
    display: flex;
    gap: 12px;
    padding: 16px 16px 8px;
    align-items: center;
}

.activity-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--accent-color);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.activity-post-header h2 {
    font-size: 1.05rem;
    color: #050505;
    margin: 0;
}

.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #65676b;
    font-size: 0.86rem;
}

.activity-description {
    white-space: pre-line;
    padding: 4px 16px 14px;
    margin: 0;
    color: #1c1e21;
}

.activity-photo-grid {
    display: grid;
    gap: 2px;
    background: #dddfe2;
}

.activity-photo-grid img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    display: block;
}

.activity-photo-grid a {
    display: block;
    min-height: 210px;
    overflow: hidden;
}

.activity-photo-grid a img {
    height: 100%;
}

.activity-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.activity-video video,
.activity-video iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    object-fit: contain;
}

.activity-photo-count-1 {
    grid-template-columns: 1fr;
}

.activity-photo-count-2,
.activity-photo-count-4 {
    grid-template-columns: repeat(2, 1fr);
}

.activity-photo-count-3,
.activity-photo-count-5 {
    grid-template-columns: repeat(2, 1fr);
}

.activity-photo-count-3 img:first-child,
.activity-photo-count-5 img:first-child {
    grid-row: span 2;
}

.activity-photo-count-3 a:first-child,
.activity-photo-count-5 a:first-child {
    grid-row: span 2;
}

.activity-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    color: #65676b;
    font-size: 0.92rem;
    border-bottom: 1px solid #e4e6eb;
}

.activity-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px 12px;
    border-bottom: 1px solid #e4e6eb;
}

.activity-actions form {
    margin: 0;
}

.activity-actions button,
.activity-actions a,
.activity-comment-form button {
    width: 100%;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #65676b;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    padding: 8px 10px;
}

.activity-actions button:hover,
.activity-actions a:hover,
.activity-comment-form button:hover {
    background: #f2f3f5;
    color: var(--primary-color);
}

.activity-comments {
    padding: 12px 16px 16px;
}

.activity-comment {
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    border-radius: 14px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.activity-comment strong {
    color: #050505;
    font-size: 0.9rem;
}

.activity-comment span {
    color: #1c1e21;
}

.activity-comment-pending {
    border: 1px dashed #c9902f;
    background: #fff8e8;
}

.activity-comment-pending-label {
    color: #9a6412;
    font-size: 0.78rem;
    font-weight: 700;
}

.activity-comment-pending small {
    display: block;
    color: #76521b;
    line-height: 1.45;
    margin-top: 0.25rem;
}

.activity-comment-error {
    color: #b00020;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.activity-comment-form {
    display: grid;
    grid-template-columns: 150px 1fr 72px;
    gap: 8px;
}

.activity-comment-form input {
    border: 1px solid #ccd0d5;
    border-radius: 999px;
    padding: 8px 12px;
    min-width: 0;
}

.activity-comment-form button {
    background: var(--primary-color);
    color: var(--white);
}

.activity-empty {
    margin: 0;
    padding: 18px;
    color: #65676b;
}

/* --- Responsive Design --- */
@media screen and (max-width: 768px) {
    :root {
        --header-height: 166px;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

        .timeline-item::after {
            left: 23px;
        }

    .left {
        text-align: left;
    }

    .right {
        left: 0;
    }

    .activities-page-shell,
    .activity-detail-shell {
        padding: 28px 12px 42px;
    }

    .activities-page-header,
    .home-activities-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .activities-filter {
        grid-template-columns: 1fr 1fr;
    }

    .activities-search-field {
        grid-column: 1 / -1;
    }

    .activities-card-grid {
        grid-template-columns: 1fr;
    }

    .activities-pagination {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .pagination-pages {
        order: -1;
        justify-content: center;
        width: 100%;
    }

    .activity-detail-header {
        padding: 18px 16px 8px;
    }

    .activity-detail-description {
        padding: 8px 16px 18px;
    }

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

    .activity-comment-form {
        grid-template-columns: 1fr;
    }

    .activity-photo-grid,
    .activity-photo-count-2,
    .activity-photo-count-3,
    .activity-photo-count-4,
    .activity-photo-count-5 {
        grid-template-columns: 1fr;
    }

    .activity-photo-count-3 img:first-child,
    .activity-photo-count-5 img:first-child {
        grid-row: auto;
    }

    .activity-photo-count-3 a:first-child,
    .activity-photo-count-5 a:first-child {
        grid-row: auto;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .activities-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activities-filter {
        grid-template-columns: minmax(220px, 1fr) 140px 140px auto;
    }

    .activities-filter-clear {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
