/* ═══════════════════════════════════════════════════════════════
   T2MS Theme — Base CSS
   Site-specific colors/variables are in the mu-plugin.
   This file provides only structural defaults.
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body, 'Inter', -apple-system, sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0; padding: 0;
    overflow-x: hidden;
    color: var(--brand-text, #111827);
    line-height: 1.7;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading, 'Playfair Display', Georgia, serif); line-height: 1.15; margin: 0 0 16px; }
p { margin: 0 0 16px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ── Full-width — neutralize any WP wrapper ────────────────── */
.entry-content,
.site-main,
article.page,
article.post,
.wp-site-blocks { max-width: 100% !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }

/* ── Container ─────────────────────────────────────────────── */
.t2ms-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ── Navbar logo ──────────────────────────────────────────── */
.t2ms-nav-logo {
    max-height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}
.t2ms-navbar-scrolled .t2ms-nav-logo {
    max-height: 32px;
}
@media (max-width: 767px) {
    .t2ms-nav-logo {
        max-height: 32px;
    }
}

/* ── Theme content wrapper (for pages without own navbar) ──── */
.t2ms-theme-content { padding-top: 100px; min-height: 60vh; }

/* ── Blog / Archive defaults ───────────────────────────────── */
.t2ms-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    padding: 80px 0;
}

.t2ms-blog-card {
    background: #fff;
    border-radius: var(--radius-md, 16px);
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.06));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.t2ms-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg, 0 20px 40px rgba(0,0,0,0.12));
}
.t2ms-blog-card img {
    width: 100%; height: 220px; object-fit: cover;
}
.t2ms-blog-card-body {
    padding: 24px;
}
.t2ms-blog-card-body h3 {
    font-size: 1.25rem; margin-bottom: 8px;
}
.t2ms-blog-card-body h3 a { color: var(--brand-text, #111827); }
.t2ms-blog-card-body h3 a:hover { color: var(--brand-primary, #2563eb); }
.t2ms-blog-card-meta {
    font-size: 0.82rem; color: #6b7280; margin-bottom: 12px;
}
.t2ms-blog-card-excerpt {
    font-size: 0.95rem; color: #4b5563; line-height: 1.6;
}
.t2ms-read-more {
    display: inline-block; margin-top: 12px;
    color: var(--brand-primary, #2563eb); font-weight: 600; font-size: 0.88rem;
}
.t2ms-read-more:hover { text-decoration: underline; }

/* ── Single post ───────────────────────────────────────────── */
.t2ms-single-article {
    max-width: 760px; margin: 0 auto; padding: 60px 24px 80px;
}
.t2ms-single-article h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 16px;
}
.t2ms-single-meta {
    font-size: 0.88rem; color: #6b7280; margin-bottom: 32px;
    padding-bottom: 24px; border-bottom: 1px solid #e5e7eb;
}
.t2ms-single-content {
    font-size: 1.05rem; line-height: 1.85;
}
.t2ms-single-content h2 { font-size: 1.6rem; margin-top: 40px; }
.t2ms-single-content h3 { font-size: 1.3rem; margin-top: 32px; }
.t2ms-single-content img { border-radius: var(--radius-md, 16px); margin: 24px 0; }
.t2ms-single-content blockquote {
    border-left: 4px solid var(--brand-primary, #2563eb);
    padding: 16px 24px; margin: 24px 0;
    background: var(--brand-light, #f9fafb); border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
    font-style: italic;
}

/* ── Page hero (for theme-generated pages) ─────────────────── */
.t2ms-theme-hero {
    background: linear-gradient(135deg, var(--brand-dark, #1e3a5f) 0%, var(--brand-primary, #2563eb) 50%, var(--brand-secondary, #1d4ed8) 100%);
    padding: 60px 0 50px; text-align: center; color: #fff;
}
.t2ms-theme-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem); color: #fff; margin-bottom: 8px;
}
.t2ms-theme-hero p {
    font-size: 1.05rem; color: rgba(255,255,255,0.7); max-width: 500px; margin: 0 auto;
}

/* ── 404 ───────────────────────────────────────────────────── */
.t2ms-404 {
    text-align: center; padding: 100px 24px; min-height: 50vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.t2ms-404 h1 { font-size: 5rem; color: var(--brand-primary, #2563eb); margin-bottom: 8px; }
.t2ms-404 p { font-size: 1.2rem; color: #6b7280; max-width: 400px; }
.t2ms-404 a {
    margin-top: 24px; display: inline-block; padding: 12px 32px;
    background: var(--brand-primary, #2563eb); color: #fff; border-radius: var(--radius-sm, 8px);
    font-weight: 600; transition: opacity 0.3s;
}
.t2ms-404 a:hover { opacity: 0.9; }

/* ── Pagination ────────────────────────────────────────────── */
.t2ms-pagination {
    display: flex; justify-content: center; gap: 8px; padding: 40px 0 80px;
}
.t2ms-pagination a, .t2ms-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius-sm, 8px);
    font-size: 0.9rem; font-weight: 500; transition: all 0.3s;
}
.t2ms-pagination a { background: #f3f4f6; color: var(--brand-text, #111827); }
.t2ms-pagination a:hover { background: var(--brand-primary, #2563eb); color: #fff; }
.t2ms-pagination .current { background: var(--brand-primary, #2563eb); color: #fff; }

/* ── Mobile toggle button (base — sites override in mu-plugin) ── */
.t2ms-mobile-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    padding: 8px; z-index: 1001;
    flex-direction: column; gap: 5px;
}
.t2ms-mobile-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--brand-text, #111827);
    transition: all 0.3s ease;
    border-radius: 2px;
}
.t2ms-navbar:not(.t2ms-navbar-scrolled) .t2ms-mobile-toggle span {
    background: #fff;
}
.t2ms-toggle-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.t2ms-toggle-active span:nth-child(2) { opacity: 0; }
.t2ms-toggle-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 991px) {
    .t2ms-mobile-toggle { display: flex; }
}

/* ── Scroll reveal animations ─────────────────────────────── */
.t2ms-reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.t2ms-reveal.t2ms-visible {
    opacity: 1; transform: translateY(0);
}
.t2ms-reveal-delay-1 { transition-delay: 0.1s; }
.t2ms-reveal-delay-2 { transition-delay: 0.2s; }
.t2ms-reveal-delay-3 { transition-delay: 0.3s; }
.t2ms-reveal-delay-4 { transition-delay: 0.4s; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .t2ms-blog-grid { grid-template-columns: 1fr; padding: 48px 0; }
    .t2ms-theme-content { padding-top: 80px; }
    .t2ms-single-article { padding: 40px 16px 60px; }
}
