/* public_html/assets/css/style.css - Restructured Stylesheet */

/* --- Design Tokens & Global Variables --- */
:root {
    --primary: #2563eb;          /* Toolstrem Brand Blue */
    --primary-hover: #1d4ed8;
    --accent: #f97316;           /* Toolstrem Brand Orange */
    --accent-hover: #ea580c;
    
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-dark-alt: #1e293b;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Theme Overrides --- */
[data-theme="dark"] {
    --bg-main: #0f172a;          /* Slate-900 */
    --bg-surface: #1e293b;       /* Slate-800 */
    --bg-surface-alt: #0f172a;   /* Slate-900 */
    --text-main: #f8fafc;        /* Slate-50 */
    --text-muted: #94a3b8;       /* Slate-400 */
    --text-light: #64748b;       /* Slate-500 */
    --border-color: #334155;     /* Slate-700 */
    --border-focus: #60a5fa;
}

.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 50%;
    width: 38px;
    height: 38px;
}
.theme-toggle-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

/* --- Base Resets & Layout --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.max-w-3xl { max-width: 768px !important; }
.max-w-5xl { max-width: 1024px !important; }

/* Grid / Flex Utilities */
.grid { display: grid; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-grow { flex-grow: 1; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 0.75rem !important; }
.ml-1 { margin-left: 0.25rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 0.75rem !important; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem;
}

/* Badges & Buttons */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-primary { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.badge-accent { background: rgba(249, 115, 22, 0.1); color: var(--accent); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    font-family: var(--font-sans);
    border: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-text { color: var(--primary); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; }
.btn-text:hover { color: var(--primary-hover); }

/* --- Header & Navigation --- */
.announcement-banner {
    color: white;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    z-index: 100;
}
.banner-link {
    color: white;
    display: inline-flex;
    align-items: center;
}

.main-header {
    background: var(--bg-surface);
    position: sticky;
    top: 0;
    z-index: 90;
}
.header-container {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--accent);
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
}
.logo-accent {
    color: var(--primary);
}

.desktop-nav .nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.75rem;
}
.nav-item {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
}
.nav-item:hover {
    color: var(--primary);
}
.btn-nav-login {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 0.45rem 1rem !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.btn-nav-login:hover {
    background: var(--primary);
    color: white !important;
}

/* Dropdown styling */
.nav-dropdown-wrapper {
    position: relative;
}
.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 600px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 120;
}
.nav-dropdown-wrapper:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.dropdown-heading {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.dropdown-col a {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 0.35rem 0;
}
.dropdown-col a:hover {
    color: var(--primary);
    padding-left: 2px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.35rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100vh;
    background: var(--bg-surface);
    box-shadow: 4px 0 30px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.mobile-nav-drawer.open {
    left: 0;
}
.drawer-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}
.close-drawer-btn {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}
.drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-top: 1.5rem;
}
.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.mobile-nav-link {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    display: block;
    padding: 0.25rem 0;
}
.mobile-collapse-btn {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    cursor: pointer;
}
.mobile-sub-list {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
}
.mobile-sub-list.open {
    display: flex;
}
.mobile-sub-list a {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    padding: 0.25rem 0;
}

/* --- Hero Search Section --- */
.hero-section {
    background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 1) 90.2%);
    color: white;
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

/* --- Hero Layout Grid & Slideshow --- */
.hero-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 992px) {
    .hero-layout-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
    .hero-content-side {
        text-align: left;
    }
    .hero-title {
        font-size: 3.5rem;
    }
}

.hero-content-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-slider-side {
    width: 100%;
}

.hero-slider-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
    text-align: left;
    position: relative;
}

.hero-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
}

.hero-slider-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.slider-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.slider-counter {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.slider-arrow {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.slider-arrow:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.05);
}

.hero-slider-viewport {
    position: relative;
    overflow: hidden;
    min-height: 270px;
}

.hero-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-slide-item.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

.slide-tool-icon {
    font-size: 2rem;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.slide-tool-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: white;
    margin: 0;
}

.slide-tool-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.slide-tool-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.slide-tool-btn {
    align-self: stretch;
    margin-top: 1.25rem;
    padding: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}
.hero-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(0,0,0,0) 70%);
    top: -200px;
    left: -200px;
    pointer-events: none;
}
.hero-title {
    font-size: 3.25rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: white;
    line-height: 1.15;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 680px;
    margin: 1rem auto 3rem;
    line-height: 1.6;
}

.search-box-wrapper {
    max-width: 720px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    padding: 0.5rem;
}
.search-form {
    align-items: center;
    width: 100%;
}
.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 1.5rem;
    color: var(--text-muted);
    font-size: 1.15rem;
}
.search-input-group input {
    width: 100%;
    border: none;
    padding: 0.9rem 1rem 0.9rem 3.5rem;
    font-size: 1.1rem;
    font-family: var(--font-sans);
    outline: none;
    border-radius: 50px;
    color: var(--text-main);
}
.search-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.9rem 2.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
    transition: var(--transition);
}
.search-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.example-link {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0.25rem;
    border: 1px solid rgba(255,255,255,0.1);
}
.example-link:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* --- Ad Slots --- */
.ad-container {
    background: var(--bg-surface-alt);
    border: 1px dashed var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 500;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Tools Grids & Cards --- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.tool-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    gap: 1.25rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 4px;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.15);
}
.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.tool-icon-small {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.tool-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.tool-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.tool-name a:hover {
    color: var(--primary);
}
.tool-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}
.tool-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
}

/* Category blocks */
.category-title {
    font-size: 1.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
}

/* --- Stats Section --- */
.stats-section {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 0;
}
.stat-item {
    padding: 1rem;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 0.25rem;
}
.stat-label {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

/* --- Blog Section --- */
.blog-hero {
    background: radial-gradient(circle at top right, rgba(37,99,235,0.05) 0%, rgba(249,115,16,0.03) 100%);
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}
.blog-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.blog-img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}
.blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.blog-card:hover .blog-img {
    transform: scale(1.05);
}
.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-date {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}
.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Single Post details */
.single-post-container {
    background: var(--bg-surface);
}
.post-title {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.post-cat {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.05em;
}
.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    gap: 1.5rem;
}
.meta-item i {
    margin-right: 0.25rem;
}
.post-cover-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 400px;
}
.post-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.markdown-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--text-main);
}
.markdown-content ul, .markdown-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    font-size: 1.1rem;
}
.markdown-content li {
    margin-bottom: 0.5rem;
}
.author-box {
    display: flex;
    gap: 1.25rem;
    background: var(--bg-surface-alt);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 3rem;
}
.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}
.author-info h4 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.author-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* --- FAQ Section --- */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}
.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-icon {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 400;
}
.faq-answer {
    padding: 0 1.5rem 1.25rem;
    display: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.faq-item.active {
    border-color: rgba(37,99,235,0.25);
    box-shadow: var(--shadow-md);
}

/* --- FAQ Section inside details --- */
.faq-item.active .faq-answer {
    display: block;
}

/* --- CTA Section --- */
.cta-section {
    background: radial-gradient(circle at 80% 90%, rgba(37, 99, 235, 0.95) 0%, rgba(15, 23, 42, 1) 100%);
    padding: 5rem 0;
    color: white;
}

/* --- Footer --- */
.main-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 5rem 0 0;
    border-top: 1px solid var(--bg-dark-alt);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}
.branding-col .footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
}
.footer-heading {
    font-size: 1rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-links a {
    font-size: 0.9rem;
    color: var(--text-light);
}
.footer-links a:hover {
    color: var(--accent);
    padding-left: 2px;
}
.social-links {
    display: flex;
    gap: 1rem;
}
.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-dark-alt);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.social-icon:hover {
    background: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--bg-dark-alt);
    padding: 1.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.bottom-links a {
    color: var(--text-muted);
}
.bottom-links a:hover {
    color: white;
}
.divider {
    margin: 0 0.5rem;
}

/* --- Specialized Tool Layouts --- */

/* Age Calculator Tool Style */
.age-calc-container {
    max-width: 1000px;
    margin: 0 auto;
}
.age-input-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    font-family: var(--font-sans);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.age-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.result-big-card {
    background: linear-gradient(135deg, rgba(37,99,235,0.02) 0%, rgba(249,115,22,0.02) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}
.result-big-val {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: var(--font-heading);
    color: var(--primary);
}
.result-big-lbl {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.result-list-group {
    background: var(--bg-surface-alt);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}
.result-list-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}
.result-list-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* Typing Speed Test Tool Style */
.typing-test-container {
    max-width: 900px;
    margin: 0 auto;
}
.typing-dashboard {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
}
.text-display-box {
    background: var(--bg-surface-alt);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    font-size: 1.35rem;
    line-height: 1.6;
    letter-spacing: 0.03em;
    min-height: 140px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    max-height: 250px;
    overflow-y: auto;
    font-family: monospace;
    user-select: none;
}
.word {
    display: inline-block;
    margin: 0 4px;
    color: var(--text-muted);
}
.word.current {
    background: rgba(37,99,235,0.1);
    border-bottom: 2px solid var(--primary);
    color: var(--text-main);
}
.word.correct {
    color: #16a34a;
}
.word.incorrect {
    color: #dc2626;
    background: rgba(220,38,38,0.1);
    border-radius: 4px;
}
.typing-input-area {
    display: flex;
    gap: 1rem;
}
.typing-input-control {
    flex-grow: 1;
    font-size: 1.25rem;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    outline: none;
    box-shadow: var(--shadow-sm);
}
.typing-input-control:focus {
    border-color: var(--border-focus);
}
.stats-header-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.typing-stat-card {
    background: var(--bg-surface-alt);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
}
.typing-stat-val {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
}
.typing-stat-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}
.visual-keyboard {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}
.key {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    user-select: none;
}
.key.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(0.95);
}

/* --- Admin Panel Layout --- */
.admin-login-card {
    max-width: 420px;
    margin: 4rem auto;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 260px;
    background: var(--bg-dark);
    color: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.admin-sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--bg-dark-alt);
}
.admin-menu {
    list-style: none;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.admin-menu-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}
.admin-menu-item.active a, .admin-menu-item a:hover {
    color: white;
    background: var(--bg-dark-alt);
    border-left: 4px solid var(--accent);
}
.admin-body {
    flex-grow: 1;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
}
.admin-topbar {
    height: 70px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}
.admin-content-area {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

/* Switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--primary);
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* Grid helper */
.admin-grid-cols {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .post-cover-container {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero-title {
        font-size: 2.25rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }
    .search-box-wrapper {
        border-radius: 12px;
        padding: 0.4rem;
    }
    .search-form {
        flex-direction: column;
        gap: 0.5rem;
    }
    .search-input-group input {
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        font-size: 1rem;
        border-radius: 8px;
    }
    .search-icon {
        left: 1rem;
    }
    .search-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
        border-radius: 8px;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
    }
    .admin-menu {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.75rem;
    }
    .admin-menu-item a {
        padding: 0.5rem 1rem;
    }
    .age-results-grid {
        grid-template-columns: 1fr;
    }
    .stats-header-bar {
        grid-template-columns: 1fr 1fr;
    }
    .visual-keyboard {
        display: none; /* Hide visual keyboard on mobile views */
    }
    .typing-input-area {
        flex-direction: column;
    }
}
