/* =====================================================
   5GasDiagnostic.com - Main Stylesheet
   Clean, professional, mobile-first design
   ===================================================== */

:root {
    --primary: #0056b3;
    --primary-dark: #004494;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --border: #dee2e6;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark);
    background: #fff;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo svg {
    width: 40px;
    height: 40px;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    border-bottom-color: #ffc107;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        padding: 1rem;
    }
    .main-nav.open {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Page title */
.page-title {
    background: var(--light);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.page-title h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-title p {
    color: var(--secondary);
}

/* Content area */
.content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 992px) {
    .content-area {
        grid-template-columns: 1fr;
    }
}

/* Main content */
.main-content {
    min-width: 0;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
}

.sidebar-widget {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

/* Ad containers */
.ad-container {
    text-align: center;
    margin: 1rem 0;
    background: #f9f9f9;
    border: 1px dashed var(--border);
    padding: 0.5rem;
    border-radius: 4px;
}

.ad-label {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-bottom: 0.25rem;
    font-style: italic;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: #fff;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: #ddd;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #555;
    font-size: 0.875rem;
    color: #aaa;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Typography */
h1, h2, h3, h4, h5 {
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-top: 2rem; }
h3 { font-size: 1.4rem; margin-top: 1.5rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Code blocks */
code {
    font-family: var(--font-mono);
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

pre code {
    background: none;
    padding: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th, td {
    border: 1px solid var(--border);
    padding: 0.75rem;
    text-align: left;
}

th {
    background: var(--light);
    font-weight: 600;
}

/* Blog list */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    background: white;
    transition: box-shadow 0.2s;
}

.blog-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.blog-card h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.blog-card p {
    color: var(--secondary);
    font-size: 0.95rem;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* Single blog post */
.post-meta {
    font-size: 0.875rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.post-content {
    max-width: 800px;
}

.post-content h2 {
    margin-top: 2rem;
}

.post-content ul, .post-content ol {
    margin-left: 1.5rem;
}

/* Privacy/Contact forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 120px;
}

/* Responsive ad sizes */
.ad-header-banner {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin: 0 auto;
}

.ad-sidebar-rectangle {
    width: 100%;
    max-width: 300px;
    height: 250px;
    margin: 0 auto;
}

.ad-footer-banner {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin: 0 auto;
}

/* Print styles */
@media print {
    .site-header, .sidebar, .ad-container, .site-footer {
        display: none;
    }
    .content-area {
        grid-template-columns: 1fr;
    }
}
