/* TempleSetu Sacred Temples — Public Styles
   Palette: saffron #E07B00, gold #C9A84C, ivory #FAF7F0, charcoal #2C2C2C */

:root {
    --tsts-saffron:   #E07B00;
    --tsts-saffron-lt:#F5A623;
    --tsts-gold:      #C9A84C;
    --tsts-gold-lt:   #EDD37E;
    --tsts-ivory:     #FAF7F0;
    --tsts-ivory-dk:  #F0EBE0;
    --tsts-charcoal:  #2C2C2C;
    --tsts-muted:     #6B6560;
    --tsts-white:     #FFFFFF;
    --tsts-shadow:    0 2px 12px rgba(0,0,0,.10);
    --tsts-radius:    8px;
    --tsts-font-head: 'Georgia', 'Times New Roman', serif;
    --tsts-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Archive ──────────────────────────────────────────────────────────────── */

.tsts-archive-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: var(--tsts-font-body);
    color: var(--tsts-charcoal);
}

.tsts-archive-header {
    text-align: center;
    margin-bottom: 36px;
}

.tsts-archive-title {
    font-family: var(--tsts-font-head);
    font-size: 2.2rem;
    color: var(--tsts-saffron);
    margin-bottom: 8px;
}

.tsts-archive-desc {
    color: var(--tsts-muted);
    font-size: 1.05rem;
}

/* ── Filter Form ─────────────────────────────────────────────────────────── */

.tsts-filter-form {
    background: var(--tsts-ivory);
    border: 1px solid var(--tsts-gold-lt);
    border-radius: var(--tsts-radius);
    padding: 24px;
    margin-bottom: 36px;
}

.tsts-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.tsts-filter-field {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tsts-filter-field label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--tsts-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tsts-filter-field input[type="text"],
.tsts-filter-field select {
    padding: 8px 12px;
    border: 1px solid #D5C9B8;
    border-radius: 5px;
    background: var(--tsts-white);
    font-size: .95rem;
    color: var(--tsts-charcoal);
    width: 100%;
    box-sizing: border-box;
    transition: border-color .2s;
}

.tsts-filter-field input[type="text"]:focus,
.tsts-filter-field select:focus {
    outline: none;
    border-color: var(--tsts-saffron);
}

.tsts-filter-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.tsts-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 5px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background .2s, transform .1s;
}

.tsts-btn:active { transform: scale(.97); }

.tsts-btn-primary {
    background: var(--tsts-saffron);
    color: var(--tsts-white);
}

.tsts-btn-primary:hover { background: #C46A00; color: var(--tsts-white); }

.tsts-btn-secondary {
    background: var(--tsts-ivory-dk);
    color: var(--tsts-charcoal);
    border: 1px solid #D5C9B8;
}

.tsts-btn-secondary:hover { background: #E8E0D0; color: var(--tsts-charcoal); }

/* ── Results ─────────────────────────────────────────────────────────────── */

.tsts-result-count {
    font-size: .88rem;
    color: var(--tsts-muted);
    margin-bottom: 20px;
}

.tsts-temple-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

/* ── Temple Card ─────────────────────────────────────────────────────────── */

.tsts-temple-card {
    background: var(--tsts-white);
    border: 1px solid var(--tsts-ivory-dk);
    border-radius: var(--tsts-radius);
    overflow: hidden;
    box-shadow: var(--tsts-shadow);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}

.tsts-temple-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.14);
    transform: translateY(-3px);
}

.tsts-card-thumb-link { display: block; overflow: hidden; height: 180px; }

.tsts-card-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.tsts-temple-card:hover .tsts-card-thumb { transform: scale(1.04); }

.tsts-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tsts-card-title {
    font-family: var(--tsts-font-head);
    font-size: 1.15rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tsts-card-title a {
    color: var(--tsts-charcoal);
    text-decoration: none;
}

.tsts-card-title a:hover { color: var(--tsts-saffron); }

.tsts-card-meta {
    font-size: .85rem;
    color: var(--tsts-muted);
    margin: 0;
}

.tsts-card-excerpt {
    font-size: .9rem;
    color: var(--tsts-charcoal);
    flex: 1;
}

.tsts-card-cta { margin-top: auto; align-self: flex-start; font-size: .85rem; }

/* ── Verified Badge ──────────────────────────────────────────────────────── */

.tsts-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #E8F5E9;
    color: #2E7D32;
    font-size: .75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.tsts-verified-badge svg { flex-shrink: 0; }

/* ── Pagination ──────────────────────────────────────────────────────────── */

.tsts-pagination { margin-top: 40px; text-align: center; }

.tsts-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #D5C9B8;
    border-radius: 5px;
    margin: 0 3px;
    color: var(--tsts-charcoal);
    text-decoration: none;
    font-size: .9rem;
}

.tsts-pagination .page-numbers.current,
.tsts-pagination .page-numbers:hover {
    background: var(--tsts-saffron);
    color: var(--tsts-white);
    border-color: var(--tsts-saffron);
}

.tsts-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--tsts-muted);
    font-size: 1.05rem;
}

/* ── Single Temple ───────────────────────────────────────────────────────── */

.tsts-single-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: var(--tsts-font-body);
    color: var(--tsts-charcoal);
}

.tsts-single-header { margin-bottom: 40px; }

.tsts-single-hero {
    border-radius: var(--tsts-radius);
    overflow: hidden;
    margin-bottom: 24px;
    max-height: 420px;
}

.tsts-single-hero-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.tsts-single-title {
    font-family: var(--tsts-font-head);
    font-size: 2rem;
    color: var(--tsts-charcoal);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.tsts-single-location,
.tsts-single-deity {
    color: var(--tsts-muted);
    font-size: 1rem;
    margin: 0 0 4px;
}

.tsts-single-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

@media ( max-width: 900px ) {
    .tsts-single-body { grid-template-columns: 1fr; }
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.tsts-section { margin-bottom: 40px; }

.tsts-section h2 {
    font-family: var(--tsts-font-head);
    font-size: 1.25rem;
    color: var(--tsts-saffron);
    border-bottom: 2px solid var(--tsts-gold-lt);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* ── Schedule Table ──────────────────────────────────────────────────────── */

.tsts-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.tsts-schedule-table th {
    background: var(--tsts-ivory);
    color: var(--tsts-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid var(--tsts-gold-lt);
}

.tsts-schedule-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--tsts-ivory-dk);
    vertical-align: top;
}

.tsts-schedule-table tr:hover td { background: var(--tsts-ivory); }

/* ── Gallery Grid ────────────────────────────────────────────────────────── */

.tsts-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.tsts-gallery-item { display: block; border-radius: 5px; overflow: hidden; }

.tsts-gallery-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.tsts-gallery-item:hover .tsts-gallery-img { transform: scale(1.05); }

/* ── Videos ──────────────────────────────────────────────────────────────── */

.tsts-videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.tsts-video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--tsts-radius); }

.tsts-video-embed iframe,
.tsts-video-embed object,
.tsts-video-embed embed {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.tsts-single-sidebar { position: sticky; top: 100px; align-self: start; }

.tsts-sidebar-card {
    background: var(--tsts-ivory);
    border: 1px solid var(--tsts-gold-lt);
    border-radius: var(--tsts-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.tsts-sidebar-card h3 {
    font-family: var(--tsts-font-head);
    font-size: 1.05rem;
    color: var(--tsts-saffron);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tsts-gold-lt);
}

.tsts-detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: .9rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tsts-detail-list li { line-height: 1.4; }
.tsts-detail-list a { color: var(--tsts-saffron); text-decoration: none; }
.tsts-detail-list a:hover { text-decoration: underline; }

.tsts-sidebar-tags { margin-bottom: 12px; font-size: .85rem; }
.tsts-sidebar-tags strong { display: block; margin-bottom: 5px; color: var(--tsts-muted); }

.tsts-tag {
    display: inline-block;
    background: var(--tsts-ivory-dk);
    border: 1px solid var(--tsts-gold-lt);
    color: var(--tsts-charcoal);
    font-size: .78rem;
    padding: 3px 10px;
    border-radius: 20px;
    margin: 2px 2px 2px 0;
    text-decoration: none;
    transition: background .2s;
}

.tsts-tag:hover { background: var(--tsts-gold-lt); }

.tsts-back-link { margin-top: 16px; }
.tsts-back-link a { color: var(--tsts-saffron); text-decoration: none; font-size: .9rem; }
.tsts-back-link a:hover { text-decoration: underline; }

/* ==========================================================================
   V2A – Featured Badge
   ========================================================================== */

.tsts-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    padding: 2px 7px;
    vertical-align: middle;
    white-space: nowrap;
    margin-left: 6px;
}

.tsts-featured-badge svg {
    flex-shrink: 0;
    color: #d97706;
}

/* ==========================================================================
   V2A – Featured Temples Widget
   ========================================================================== */

.tsts-featured-widget-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tsts-featured-widget-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tsts-featured-widget-item:last-child {
    border-bottom: none;
}

.tsts-featured-widget-thumb {
    flex-shrink: 0;
}

.tsts-featured-widget-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.tsts-featured-widget-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tsts-featured-widget-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a2e;
    text-decoration: none;
    line-height: 1.3;
}

.tsts-featured-widget-name:hover {
    color: #c0392b;
}

.tsts-featured-widget-city {
    font-size: 0.78rem;
    color: #6b7280;
}

.tsts-featured-widget-more {
    margin-top: 10px;
    font-size: 0.85rem;
    text-align: right;
}

.tsts-featured-widget-more a {
    color: #c0392b;
    text-decoration: none;
    font-weight: 500;
}

.tsts-featured-widget-more a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   V2A – Related Temples Block
   ========================================================================== */

.tsts-related-temples {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

.tsts-related-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1.25rem;
}

.tsts-related-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 200px, 1fr ) );
    gap: 1.25rem;
}

.tsts-related-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tsts-related-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.tsts-related-card-thumb-link {
    display: block;
    overflow: hidden;
}

.tsts-related-card-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.tsts-related-card:hover .tsts-related-card-thumb {
    transform: scale(1.04);
}

.tsts-related-card-body {
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.tsts-related-card-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.2rem;
    line-height: 1.35;
}

.tsts-related-card-title a {
    color: inherit;
    text-decoration: none;
}

.tsts-related-card-title a:hover {
    color: #c0392b;
}

.tsts-related-card-location,
.tsts-related-card-deity {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 3px;
}

.tsts-related-card-cta {
    margin-top: auto;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
}

@media ( max-width: 600px ) {
    .tsts-related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media ( max-width: 400px ) {
    .tsts-related-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Phase 2 — Events, Inquiry Form, Load More
   ============================================================ */

/* ── Events Section ────────────────────────────────────────── */

.tsts-events-section { margin: 48px 0; }
.tsts-events-section h2 { font-size: 1.6rem; margin-bottom: 16px; }

/* Filter tabs */
.tsts-event-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.tsts-event-filter-btn {
    padding: 6px 16px;
    border: 2px solid #b5530e;
    border-radius: 20px;
    background: #fff;
    color: #b5530e;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.tsts-event-filter-btn:hover,
.tsts-event-filter-btn.tsts-active {
    background: #b5530e;
    color: #fff;
}

/* Events grid */
.tsts-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Event card */
.tsts-event-card {
    border: 1px solid #e5ddd0;
    border-radius: 10px;
    overflow: hidden;
    background: #fffaf5;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}
.tsts-event-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.10); }

.tsts-event-thumb {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px;
}
.tsts-event-thumb--no-img {
    background: linear-gradient(135deg, #fdf0e0 0%, #f5d5a8 100%);
    align-items: center;
    justify-content: center;
}
.tsts-event-icon { font-size: 3rem; }
.tsts-event-type-badge {
    background: rgba(181,83,14,0.85);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 4px;
    position: absolute;
    top: 10px;
    left: 10px;
    letter-spacing: 0.04em;
}

.tsts-event-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tsts-event-title {
    font-size: 1.05rem;
    margin: 0 0 4px;
    line-height: 1.3;
}
.tsts-event-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    color: #5a4a3a;
}
.tsts-event-desc {
    font-size: 0.88rem;
    color: #6b5845;
    margin: 0;
    flex: 1;
}
.tsts-event-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.82rem;
    flex-wrap: wrap;
}
.tsts-event-fee {
    background: #fff3e0;
    border: 1px solid #f0c87a;
    border-radius: 4px;
    padding: 2px 8px;
    font-weight: 600;
    color: #7a4a00;
}
.tsts-event-contact-link {
    color: #b5530e;
    text-decoration: none;
}
.tsts-event-contact-link:hover { text-decoration: underline; }
.tsts-events-empty {
    text-align: center;
    color: #888;
    padding: 24px 0;
    font-style: italic;
}

/* ── AJAX Load More ─────────────────────────────────────────── */

.tsts-load-more-wrap {
    text-align: center;
    margin: 36px 0 0;
}
.tsts-load-more-spinner {
    margin-left: 10px;
    font-size: 1.2rem;
    vertical-align: middle;
    animation: tsts-spin 1s linear infinite;
    display: inline-block;
}
@keyframes tsts-spin { to { transform: rotate(360deg); } }

/* ── Inquiry Form ───────────────────────────────────────────── */

.tsts-inquiry-wrap {
    margin: 48px 0;
    padding: 36px;
    background: #fffaf5;
    border: 1px solid #e8ddd0;
    border-radius: 12px;
    max-width: 680px;
}
.tsts-inquiry-title {
    font-size: 1.5rem;
    margin: 0 0 6px;
}
.tsts-inquiry-subtitle {
    color: #6b5845;
    margin: 0 0 24px;
    font-size: 0.95rem;
}
.tsts-inquiry-form { display: flex; flex-direction: column; gap: 16px; }
.tsts-form-row { display: flex; flex-direction: column; gap: 5px; }
.tsts-form-row label { font-weight: 600; font-size: 0.9rem; color: #3b2a1a; }
.tsts-form-row input,
.tsts-form-row textarea {
    padding: 10px 12px;
    border: 1px solid #d0c0ae;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    color: #2a1a00;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.tsts-form-row input:focus,
.tsts-form-row textarea:focus {
    outline: none;
    border-color: #b5530e;
    box-shadow: 0 0 0 3px rgba(181,83,14,0.12);
}
.tsts-form-row--half { flex-direction: row; gap: 16px; }
.tsts-form-row--half > div { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.tsts-required { color: #c0392b; }

.tsts-notice {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.tsts-notice--success { background: #e9f7ef; border: 1px solid #27ae60; color: #1a5c38; }
.tsts-notice--error   { background: #fdf0f0; border: 1px solid #e74c3c; color: #7b1c1c; }

.tsts-btn--submit {
    align-self: flex-start;
    background: #b5530e;
    color: #fff;
    border: none;
    padding: 11px 28px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.tsts-btn--submit:hover { background: #8c3d08; }
.tsts-btn--submit:disabled { opacity: 0.65; cursor: not-allowed; }

@media (max-width: 600px) {
    .tsts-form-row--half { flex-direction: column; }
    .tsts-inquiry-wrap { padding: 20px; }
    .tsts-events-grid { grid-template-columns: 1fr; }
}

/* ── Temple Submission Form ────────────────────────────────── */

.tsts-submit-wrap {
    margin: 48px 0;
    padding: 36px;
    background: #fffaf5;
    border: 1px solid #e8ddd0;
    border-radius: 12px;
    max-width: 760px;
}
.tsts-submit-title { font-size: 1.6rem; margin: 0 0 6px; }
.tsts-submit-subtitle { color: #6b5845; margin: 0 0 28px; font-size: 0.95rem; }
.tsts-submit-form { display: flex; flex-direction: column; gap: 8px; }
.tsts-submit-section {
    border: 1px solid #e8ddd0;
    border-radius: 8px;
    padding: 20px 20px 8px;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tsts-submit-section legend {
    padding: 0 8px;
    font-weight: 700;
    font-size: 1rem;
    color: #b5530e;
}
.tsts-submit-note { margin: -8px 0 4px; font-size: 0.85rem; color: #6b5845; }

.tsts-form-row select {
    padding: 10px 12px;
    border: 1px solid #d0c0ae;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    color: #2a1a00;
    width: 100%;
    box-sizing: border-box;
}
.tsts-form-row select:focus {
    outline: none;
    border-color: #b5530e;
    box-shadow: 0 0 0 3px rgba(181,83,14,0.12);
}
.tsts-form-row select:disabled { background: #f3efe8; color: #a89c8c; cursor: not-allowed; }

.tsts-turnstile-row { margin: 8px 0; }

@media (max-width: 600px) {
    .tsts-submit-wrap { padding: 20px; }
}
