/* CSS Variables */
:root {
    --primary-color: #b83245;
    --primary-hover: #962638;
    --secondary-color: #48bb78;
    --bg-color: #fffafa;
    --card-bg: #fff3f4;
    --text-primary: #2d3748;
    --text-secondary: #725d63;
    --border-color: #efd3d8;
    --hover-bg: #ffe7eb;
    --success-bg: #c6f6d5;
    --success-color: #22543d;
    --error-bg: #fed7d7;
    --error-color: #742a2a;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Theme */
body.dark-theme {
    --bg-color: #1a202c;
    --card-bg: #2d3748;
    --text-primary: #fff3f4;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
    --hover-bg: #374151;
    --success-bg: #2d3748;
    --success-color: #68d391;
    --error-bg: #2d3748;
    --error-color: #fc8181;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Site Container */
.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--hover-bg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e56b7c 100%);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.125rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Page Header (for individual tool pages) */
.page-header {
    background: var(--card-bg);
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Tools Grid */
.tools-grid-container {
    flex: 1;
    padding: 3rem 1rem;
}

.tools-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Tool Card */
.tool-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tool-card.coming-soon {
    opacity: 0.7;
}

/* Ad Card Styles */
.tool-card.ad-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    position: relative;
}

.tool-card.ad-card:hover {
    transform: translateY(-2px);
}

.ad-label {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--border-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-content {
    margin-bottom: 1rem;
}

.ad-placeholder {
    background: var(--bg-color);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.ad-placeholder p {
    margin: 0.25rem 0;
    font-weight: 600;
    opacity: 0.7;
}

.ad-placeholder p:first-of-type {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.ad-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex: 1;
    font-style: italic;
}

.tool-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex: 1;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: var(--hover-bg);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.tool-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.tool-link:hover {
    background: var(--primary-hover);
}

.tool-link.disabled {
    background: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    justify-content: center;
}

/* Features Section */
.features-section {
    background: var(--card-bg);
    padding: 4rem 1rem;
    border-top: 1px solid var(--border-color);
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.features-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
}

.feature svg {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Footer */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        width: 100%;
        justify-content: space-around;
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.875rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .tool-card {
        padding: 1.5rem;
    }
}
/* CSBH blush-red theme and accessible shared navigation. */
:focus-visible { outline: 3px solid #b83245; outline-offset: 4px; }
.header-nav { flex-wrap: wrap; }
@media (max-width: 768px) { .header-content { flex-wrap: wrap; gap: 1rem; } .header-nav { width: 100%; justify-content: center; } }


.main-nav { flex-wrap: wrap; gap: .5rem 1.2rem; }
@media(max-width:1100px){ .header-content { flex-wrap:wrap; gap:1rem; } .main-nav { flex-basis:100%; } }

.site-footer a { color:var(--primary-color); overflow-wrap:anywhere; }

/* Consistent complete navigation on every page. */
.csbh-nav { display:flex; flex:1; min-width:0; flex-wrap:wrap; align-items:center; justify-content:center; gap:.4rem 1.1rem; }
.csbh-nav .nav-link { display:inline-block; padding:.5rem 0; border-bottom:2px solid transparent; color:var(--text-secondary); text-decoration:none; font-weight:600; font-size:.9rem; white-space:nowrap; }
.csbh-nav .nav-link:hover { color:var(--primary-color); }
.csbh-nav .nav-link.active { color:var(--primary-color); border-bottom-color:var(--primary-color); }
@media(max-width:1200px) { .header-content { flex-wrap:wrap; gap:.7rem; } .csbh-nav { flex-basis:100%; order:3; } }
@media(max-width:600px) { .csbh-nav { gap:.3rem .8rem; } .csbh-nav .nav-link { font-size:.8rem; } }
