/* ============================================================
   Team Turtleneck — Front Page Portal Styles
   Used by the Pages extension custom template
   ============================================================ */

/* -----------------------------------------------------------
   LAYOUT GRID
   ----------------------------------------------------------- */
.tt-frontpage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Anti-alias rounded corners on all frontpage elements */
.tt-hero, .tt-article, .tt-sidebar-block,
.tt-hero-thumb, .tt-hero-btn, .tt-hero-dot,
.tt-roundup-icon, .tt-comment-avatar {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.tt-fp-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-top: 8px;
}

.tt-fp-main { min-width: 0; }
.tt-fp-sidebar { min-width: 0; }


/* -----------------------------------------------------------
   TOP NAV BAR (above phpBB header)
   ----------------------------------------------------------- */
.tt-topnav {
    background: var(--tt-blue-900, #0F1D2F);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 0 20px;
    font-family: var(--tt-font, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif);
}
.tt-topnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}
.tt-topnav-logo { color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: -.01em; }
.tt-topnav-logo a { color: #fff; }
.tt-topnav-links { display: flex; gap: 20px; align-items: center; }
.tt-topnav-links a { color: rgba(255,255,255,.6); font-size: .8rem; font-weight: 500; transition: color .15s; }
.tt-topnav-links a:hover { color: #fff; }

/* Main navigation */
.tt-mainnav {
    background: var(--tt-blue-800, #1E3A5F);
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.tt-mainnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
}
.tt-mainnav a {
    color: rgba(255,255,255,.75);
    font-size: .88rem;
    font-weight: 500;
    padding: 12px 18px;
    display: block;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.tt-mainnav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.tt-mainnav a.active { color: #fff; background: #2563EB; border-radius: 8px; margin: 4px 0; padding: 8px 16px; }
.tt-mainnav-search {
    margin-left: auto;
    position: relative;
}
.tt-mainnav-search input {
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 24px;
    padding: 6px 16px 6px 36px;
    font-size: .85rem;
    background: rgba(255,255,255,.08);
    color: #fff;
    width: 200px;
    outline: none;
    transition: border-color .15s, width .2s;
    font-family: inherit;
}
.tt-mainnav-search input::placeholder { color: rgba(255,255,255,.35); }
.tt-mainnav-search input:focus { border-color: #60A5FA; width: 260px; background: rgba(255,255,255,.12); }
.tt-mainnav-search::before {
    content: "🔍";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .75rem;
    opacity: .5;
    pointer-events: none;
}


/* -----------------------------------------------------------
   HERO CAROUSEL
   ----------------------------------------------------------- */
.tt-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--tt-blue-900, #0F1D2F);
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

.tt-hero-track {
    display: flex;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.tt-hero-slide {
    min-width: 100%;
    position: relative;
    aspect-ratio: 21/9;
    overflow: hidden;
}

.tt-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tt-hero-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px 28px 24px;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
    color: #fff;
}
.tt-hero-cat {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 10px;
    border-radius: 6px;
    background: #2563EB;
    margin-bottom: 10px;
}
.tt-hero-title {
    font-family: var(--tt-font-display, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.tt-hero-title a { color: #fff; }
.tt-hero-title a:hover { color: #BFDBFE; }
.tt-hero-excerpt {
    margin-top: 8px;
    font-size: .88rem;
    color: rgba(255,255,255,.75);
    line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Carousel controls */
.tt-hero-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.tt-hero-btn:hover { background: rgba(255,255,255,.3); }
.tt-hero-prev { left: 12px; }
.tt-hero-next { right: 12px; }

/* Carousel indicators */
.tt-hero-dots {
    position: absolute;
    bottom: 12px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 8px;
    z-index: 10;
}
.tt-hero-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    transition: background .2s, transform .2s;
    border: none;
}
.tt-hero-dot.active { background: #fff; transform: scale(1.25); }

/* Thumbnail strip */
.tt-hero-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(15,29,47,.95);
    overflow-x: auto;
    scrollbar-width: none;
}
.tt-hero-thumbs::-webkit-scrollbar { display: none; }
.tt-hero-thumb {
    flex: 0 0 auto;
    width: 120px; height: 68px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s, opacity .2s;
    opacity: .6;
}
.tt-hero-thumb.active { border-color: #3B82F6; opacity: 1; }
.tt-hero-thumb:hover { opacity: .9; }
.tt-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }


/* -----------------------------------------------------------
   ARTICLE CARDS
   ----------------------------------------------------------- */
.tt-article {
    background: #fff;
    border: 1px solid var(--tt-border, #E2E8F0);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.tt-article:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.tt-article-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.tt-article-body { padding: 18px 22px; }

.tt-article-cat {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.tt-article-cat.cat-news { background: #DBEAFE; color: #1E40AF; }
.tt-article-cat.cat-review { background: #D1FAE5; color: #065F46; }
.tt-article-cat.cat-guide { background: #FEF3C7; color: #92400E; }
.tt-article-cat.cat-deal { background: #FCE7F3; color: #9D174D; }
.tt-article-cat.cat-rumor { background: #EDE9FE; color: #5B21B6; }
.tt-article-cat.cat-opinion { background: #FEE2E2; color: #991B1B; }

.tt-article-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
    font-family: var(--tt-font-display, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif);
    letter-spacing: -.01em;
}
.tt-article-title a { color: var(--tt-text, #0F172A); }
.tt-article-title a:hover { color: var(--tt-link, #2563EB); }

.tt-article-excerpt {
    font-size: .88rem;
    color: var(--tt-text-secondary, #64748B);
    line-height: 1.55;
    margin: 0 0 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.tt-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .76rem;
    color: var(--tt-text-muted, #94A3B8);
}
.tt-article-meta .author { font-weight: 600; color: var(--tt-text-secondary, #64748B); }
.tt-article-meta .sep { color: var(--tt-text-muted, #CBD5E1); }
.tt-article-comments a { color: var(--tt-link, #2563EB); font-weight: 600; }

/* Compact article (no image) */
.tt-article.compact { display: flex; gap: 0; }
.tt-article.compact .tt-article-thumb {
    width: 200px; flex-shrink: 0;
    overflow: hidden;
}
.tt-article.compact .tt-article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tt-article.compact .tt-article-body { flex: 1; }
.tt-article.compact .tt-article-title { font-size: 1rem; }


/* -----------------------------------------------------------
   ARTICLE COMMENTS PREVIEW
   ----------------------------------------------------------- */
.tt-comments-preview {
    border-top: 1px solid var(--tt-border, #E2E8F0);
    padding: 14px 22px;
    background: var(--tt-gray-50, #F8FAFC);
}
.tt-comments-preview h4 {
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--tt-text-secondary, #64748B);
    margin: 0 0 10px;
}
.tt-comment {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--tt-border-light, #F1F5F9);
    font-size: .82rem;
    line-height: 1.45;
}
.tt-comment:last-of-type { border-bottom: none; }
.tt-comment-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .6rem; font-weight: 700;
}
.tt-comment-body { flex: 1; min-width: 0; }
.tt-comment-author { font-weight: 600; color: var(--tt-link, #2563EB); }
.tt-comment-text { color: var(--tt-text-secondary, #64748B); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-comment-time { color: var(--tt-text-muted, #94A3B8); font-size: .72rem; margin-top: 2px; }

.tt-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--tt-link, #2563EB);
}
/* When inside the meta row, no top margin needed */
.tt-article-meta .tt-read-more {
    margin-top: 0;
    margin-left: auto;
}
.tt-read-more:hover { color: var(--tt-link-hover, #1D4ED8); }
.tt-read-more::after { content: "→"; transition: transform .15s; }
.tt-read-more:hover::after { transform: translateX(3px); }


/* -----------------------------------------------------------
   SIDEBAR
   ----------------------------------------------------------- */
.tt-sidebar-block {
    background: #fff;
    border: 1px solid var(--tt-border, #E2E8F0);
    border-radius: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.tt-sidebar-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--tt-border, #E2E8F0);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--tt-blue-700, #1D4ED8);
    background: var(--tt-blue-50, #EBF5FF);
}

/* Popular stories */
.tt-popular-item {
    display: flex;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--tt-border-light, #F1F5F9);
    transition: background .1s;
}
.tt-popular-item:last-child { border-bottom: none; }
.tt-popular-item:hover { background: var(--tt-gray-50, #F8FAFC); }
.tt-popular-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--tt-blue-300, #93C5FD);
    min-width: 24px;
    line-height: 1.2;
}
.tt-popular-info { flex: 1; min-width: 0; }
.tt-popular-title {
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tt-popular-title a { color: var(--tt-text, #0F172A); }
.tt-popular-title a:hover { color: var(--tt-link, #2563EB); }
.tt-popular-meta { font-size: .72rem; color: var(--tt-text-muted, #94A3B8); margin-top: 3px; }

/* Sidebar roundup cards */
.tt-roundup-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--tt-border-light, #F1F5F9);
    display: flex;
    gap: 12px;
    align-items: center;
    transition: background .1s;
}
.tt-roundup-item:last-child { border-bottom: none; }
.tt-roundup-item:hover { background: var(--tt-gray-50, #F8FAFC); }
.tt-roundup-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--tt-blue-100, #DBEAFE);
    flex-shrink: 0;
    display: flex;
    align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.tt-roundup-info { flex: 1; }
.tt-roundup-name { font-weight: 600; font-size: .88rem; }
.tt-roundup-name a { color: var(--tt-text, #0F172A); }
.tt-roundup-name a:hover { color: var(--tt-link, #2563EB); }
.tt-roundup-status {
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 3px;
}
.tt-roundup-status.buy { background: #D1FAE5; color: #065F46; }
.tt-roundup-status.caution { background: #FEF3C7; color: #92400E; }
.tt-roundup-status.wait { background: #FEE2E2; color: #991B1B; }

/* Newsletter signup */
.tt-newsletter {
    padding: 20px 18px;
    text-align: center;
}
.tt-newsletter h3 {
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 6px;
}
.tt-newsletter p {
    font-size: .8rem;
    color: var(--tt-text-secondary, #64748B);
    margin: 0 0 12px;
    line-height: 1.45;
}
.tt-newsletter-form {
    display: flex;
    gap: 6px;
}
.tt-newsletter-form input[type="email"] {
    flex: 1;
    border: 1px solid var(--tt-border, #E2E8F0);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: .85rem;
    font-family: inherit;
    outline: none;
}
.tt-newsletter-form input[type="email"]:focus { border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.tt-newsletter-form button {
    background: #2563EB;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    white-space: nowrap;
}
.tt-newsletter-form button:hover { background: #1D4ED8; }


/* -----------------------------------------------------------
   SECTION DIVIDERS
   ----------------------------------------------------------- */
.tt-section-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tt-text-muted, #94A3B8);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--tt-blue-100, #DBEAFE);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.tt-section-label a {
    font-size: .72rem;
    color: var(--tt-link, #2563EB);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}


/* -----------------------------------------------------------
   FOOTER
   ----------------------------------------------------------- */
.tt-footer {
    background: var(--tt-blue-900, #0F1D2F);
    color: rgba(255,255,255,.6);
    padding: 32px 20px;
    margin-top: 40px;
}
.tt-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
}
.tt-footer h4 { color: #fff; font-size: .85rem; margin: 0 0 12px; }
.tt-footer a { color: rgba(255,255,255,.5); font-size: .82rem; display: block; padding: 3px 0; transition: color .15s; }
.tt-footer a:hover { color: #fff; }
.tt-footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    color: rgba(255,255,255,.35);
}


/* -----------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------- */
@media screen and (max-width: 960px) {
    .tt-fp-layout { grid-template-columns: 1fr; }
    .tt-fp-sidebar { order: 2; }
    .tt-hero-title { font-size: 1.25rem; }
    .tt-hero-thumbs { display: none; }
    .tt-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 600px) {
    .tt-hero-slide { aspect-ratio: 16/9; }
    .tt-hero-title { font-size: 1.1rem; }
    .tt-hero-overlay { padding: 20px 16px 16px; }
    .tt-article.compact { flex-direction: column; }
    .tt-article.compact .tt-article-thumb { width: 100%; height: 160px; }
    .tt-mainnav-inner { overflow-x: auto; scrollbar-width: none; }
    .tt-mainnav-inner::-webkit-scrollbar { display: none; }
    .tt-mainnav-search { display: none; }
    .tt-footer-inner { grid-template-columns: 1fr; gap: 20px; }
}
