/**
 * DIY Local SEO Guide - Stylesheet
 */

:root {
    --color-primary: #0d7377;
    --color-primary-dark: #095456;
    --color-primary-light: #14919b;
    --color-accent: #e8a838;
    --color-text: #2d3748;
    --color-text-light: #718096;
    --color-text-muted: #a0aec0;
    --color-bg: #ffffff;
    --color-bg-subtle: #f7fafc;
    --color-bg-muted: #edf2f7;
    --color-border: #e2e8f0;
    --color-success: #38a169;
    --color-warning: #dd6b20;
    --color-warning-bg: #fffaf0;
    --color-info: #3182ce;
    --color-info-bg: #ebf8ff;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'DM Serif Display', Georgia, serif;
    --sidebar-width: 300px;
    --content-max-width: 800px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--color-text);
    background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 400;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--color-primary-dark); }

/* Navbar */
.navbar {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
    z-index: 1030;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-primary) !important;
}

.progress-indicator {
    font-size: 0.875rem;
    color: var(--color-text-light);
    background: var(--color-bg-muted);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
}

/* Sidebar */
.sidebar-nav {
    width: var(--sidebar-width);
    background: var(--color-bg);
    border-right: 1px solid var(--color-border);
}

@media (min-width: 992px) {
    .sidebar-nav {
        position: fixed;
        top: 61px;
        left: 0;
        bottom: 0;
        overflow-y: auto;
        z-index: 1020;
    }
    .main-content { margin-left: var(--sidebar-width); }
}

.sidebar-modules { padding: 1rem 0; }

.sidebar-module { border-bottom: 1px solid var(--color-border); }

.sidebar-module-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--color-text);
    font-weight: 500;
    transition: background 0.2s ease;
}

.sidebar-module-header:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text);
}

.sidebar-module.active .sidebar-module-header {
    background: var(--color-bg-muted);
    color: var(--color-primary);
}

.module-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-bg-muted);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-light);
}

.sidebar-module.active .module-number {
    background: var(--color-primary);
    color: white;
}

.expand-icon {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.sidebar-module.active .expand-icon { transform: rotate(180deg); }

.sidebar-pages {
    list-style: none;
    margin: 0;
    padding: 0 0 0.5rem 0;
    background: var(--color-bg-subtle);
}

.sidebar-pages li a {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem 0.5rem 3rem;
    color: var(--color-text-light);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.sidebar-pages li a:hover {
    color: var(--color-primary);
    background: var(--color-bg-muted);
}

.sidebar-pages li.active a {
    color: var(--color-primary);
    font-weight: 500;
    background: var(--color-bg-muted);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 61px);
    padding: 2rem 1.5rem;
}

.main-content > .container-fluid {
    max-width: calc(var(--content-max-width) + 3rem);
}

/* Home Page */
.home-hero { padding: 3rem 0 4rem; }

.home-hero h1 {
    font-size: 2.75rem;
    color: var(--color-text);
}

.home-hero .lead {
    font-size: 1.25rem;
    color: var(--color-text-light);
}

.home-features { padding: 2rem 0 3rem; }

.feature-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--color-text-light);
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.home-modules { padding: 3rem 0; }

.module-card {
    display: block;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
    color: var(--color-text);
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
    color: var(--color-text);
}

.module-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.module-card-header .module-number {
    font-size: 0.875rem;
    width: 28px;
    height: 28px;
}

.module-card-header i {
    font-size: 1.25rem;
    color: var(--color-primary);
}

.module-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.375rem;
}

.module-card p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.module-link {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 500;
}

.home-cta {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    margin: 3rem -1.5rem 0;
    padding: 3rem 1.5rem;
    border-radius: var(--radius-lg);
    color: white;
}

.home-cta h2 { color: white; }
.home-cta p { color: rgba(255, 255, 255, 0.9); }

.home-cta .btn-primary {
    background: white;
    color: var(--color-primary);
    border-color: white;
}

.home-cta .btn-primary:hover {
    background: var(--color-bg-subtle);
    border-color: var(--color-bg-subtle);
}

/* Module Overview */
.module-overview { max-width: var(--content-max-width); }

.module-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.module-number-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.module-header h1 { margin-bottom: 0.5rem; }

.module-header .lead {
    color: var(--color-text-light);
    margin-bottom: 0;
}

.pages-grid {
    display: grid;
    gap: 1rem;
}

.page-card {
    display: block;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 0.2s ease;
    color: var(--color-text);
}

.page-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
}

.page-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-bg-muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.page-card h3 {
    font-size: 1.0625rem;
    margin-bottom: 0.25rem;
}

.page-link {
    font-size: 0.875rem;
    color: var(--color-primary);
}

.module-nav-bottom {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

/* Page Content */
.page-content { max-width: var(--content-max-width); }

.page-breadcrumb { margin-bottom: 1.5rem; }

.breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 0;
}

.breadcrumb-item a { color: var(--color-text-light); }

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.page-module-ref {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.page-header h1 { margin-bottom: 0.75rem; }

.page-intro {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* Instruction Card */
.instruction-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    overflow: hidden;
}

.instruction-header {
    background: var(--color-bg-subtle);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.instruction-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.what-to-do {
    padding: 1.5rem;
    background: linear-gradient(to right, rgba(13, 115, 119, 0.05), transparent);
    border-bottom: 1px solid var(--color-border);
}

.what-to-do h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.what-to-do p {
    font-size: 1.125rem;
    margin-bottom: 0;
    color: var(--color-text);
}

/* Steps */
.steps {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.steps h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
}

.step-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step-list > li {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 1.5rem;
    border-left: 2px solid var(--color-border);
    margin-left: 1rem;
}

.step-list > li:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.step-list > li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: -1rem;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.step-content { padding-top: 0.25rem; }

.step-screenshot {
    margin-top: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.step-screenshot img {
    display: block;
    width: 100%;
}

.step-note {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    color: var(--color-text-light);
    padding: 0.75rem 1rem;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-sm);
}

/* Industry Examples */
.industry-examples {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.industry-examples h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.industry-examples .nav-tabs {
    border-bottom: 1px solid var(--color-border);
    gap: 0.25rem;
    flex-wrap: wrap;
}

.industry-examples .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    color: var(--color-text-light);
    background: none;
}

.industry-examples .nav-link:hover {
    border-bottom-color: var(--color-border);
    color: var(--color-text);
}

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

.industry-examples .tab-content { padding: 1.25rem 0 0; }

.example-content {
    background: var(--color-bg-subtle);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
}

/* Technical Dropdown */
.technical-details {
    margin: 0;
    border-top: 1px solid var(--color-border);
}

.technical-details summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--color-text-light);
    transition: all 0.2s ease;
    list-style: none;
}

.technical-details summary::-webkit-details-marker { display: none; }

.technical-details summary::after {
    content: '+';
    float: right;
    font-weight: 300;
    font-size: 1.25rem;
    line-height: 1;
}

.technical-details[open] summary::after { content: '−'; }

.technical-details summary:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text);
}

.technical-content {
    padding: 0 1.5rem 1.5rem;
    font-size: 0.9375rem;
    color: var(--color-text-light);
}

.technical-link {
    color: var(--color-primary);
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-warning {
    background: var(--color-warning-bg);
    border-left: 4px solid var(--color-warning);
    color: var(--color-warning);
}

.alert-success {
    background: rgba(56, 161, 105, 0.1);
    border-left: 4px solid var(--color-success);
    color: var(--color-success);
}

.alert-info {
    background: var(--color-info-bg);
    border-left: 4px solid var(--color-info);
    color: var(--color-info);
}

/* Checklist */
.checklist-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.checklist-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checklist-item .form-check-input { margin-top: 0.3rem; }

.checklist-item .form-check-input:checked + span {
    text-decoration: line-through;
    color: var(--color-text-light);
}

/* Page Navigation */
.page-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.page-nav-link {
    display: block;
    padding: 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.page-nav-link:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.page-nav-link.next { text-align: right; }

.nav-direction {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.nav-title {
    display: block;
    font-weight: 500;
    color: var(--color-text);
}

/* Footer */
.site-footer {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem;
    margin-top: 3rem;
}

@media (min-width: 992px) {
    .site-footer { margin-left: var(--sidebar-width); }
}

/* Buttons */
.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-md);
}

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

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
}

/* Utilities */
.content-text { margin-bottom: 1.5rem; }

code {
    background: var(--color-bg-muted);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: var(--color-primary-dark);
}

/* Responsive */
@media (max-width: 991.98px) {
    body { font-size: 17px; }
    h1 { font-size: 1.75rem; }
    .home-hero h1 { font-size: 2rem; }
    .main-content { padding: 1.5rem 1rem; }
    .instruction-header,
    .what-to-do,
    .steps,
    .industry-examples,
    .technical-details summary,
    .technical-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
