/* HSV Home Service Listings - Main Stylesheet */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #059669;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 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);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
}

.logo span {
    color: var(--accent-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav > ul > li {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: -0.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.85;
}

/* Dropdown Menu */
.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-toggle::after {
    content: "";
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid white;
    margin-left: 0.25rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    min-width: 220px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
    z-index: 1000;
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--bg-white);
}

nav > ul > li:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-dark);
    font-weight: 400;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    opacity: 1;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4rem 1.5rem;
    text-align: center;
}

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

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Category Hero (for category pages) */
.category-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
}

.category-hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.category-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Category Grid (Home Page) */
.categories-section {
    padding: 2rem 0;
}

.section-title {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.category-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Business Listings */
.listings-section {
    padding: 1rem 0;
}

.business-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
}

.business-info h2 {
    font-size: 1.35rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.business-info .rating {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.business-info .description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.business-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.business-details span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.business-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

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

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #047857;
}

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

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

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag {
    background-color: var(--bg-light);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-light);
    margin: 0 0.5rem;
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 1.5rem;
    margin-top: 3rem;
}

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

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Quote Form Section */
.quote-form-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.quote-form-section h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.quote-form-section > p {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2rem;
}

.quote-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.quote-form .btn-large {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Content Layout with Sidebar */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.main-content {
    min-width: 0;
}

/* Info Sidebar */
.info-sidebar {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.info-sidebar h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.info-sidebar h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-sidebar h4:first-of-type {
    margin-top: 0;
}

.info-sidebar p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.info-sidebar ul {
    list-style: none;
    margin-bottom: 1rem;
}

.info-sidebar ul li {
    font-size: 0.875rem;
    color: var(--text-light);
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.4;
}

.info-sidebar ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.info-sidebar .section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.25rem 0;
}

.info-sidebar .warning-section h4 {
    color: #dc2626;
}

.info-sidebar .warning-section ul li::before {
    color: #dc2626;
}

.info-sidebar .tip-box {
    background: #eff6ff;
    border-left: 3px solid var(--primary-color);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.info-sidebar .tip-box p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-dark);
}

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

    nav ul {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .dropdown-menu {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        min-width: 200px;
    }

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

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

    .business-card {
        grid-template-columns: 1fr;
    }

    .business-actions {
        flex-direction: row;
    }

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

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .quote-form-section {
        padding: 1.5rem;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .info-sidebar {
        position: static;
        max-height: none;
        order: -1;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .content-wrapper {
        grid-template-columns: 1fr 320px;
        gap: 1.5rem;
    }

    .info-sidebar {
        padding: 1.25rem;
    }

    .info-sidebar h3 {
        font-size: 1.1rem;
    }

    .info-sidebar h4 {
        font-size: 0.95rem;
    }
}

/* Guide Page Styles */
.guide-content {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto;
}

.guide-content h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.guide-content h2:first-of-type {
    margin-top: 0;
}

.guide-content h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.guide-content h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.guide-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.guide-content ul,
.guide-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.guide-content li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.guide-content strong {
    color: var(--text-dark);
}

.guide-content .executive-summary {
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 12px 12px 0;
}

.guide-content .executive-summary h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.35rem;
}

.guide-content .executive-summary p {
    color: var(--text-dark);
    margin-bottom: 0;
}

.guide-content .key-takeaways {
    background: #fefce8;
    border: 2px solid #facc15;
    padding: 1.5rem;
    margin-top: 2.5rem;
    border-radius: 12px;
}

.guide-content .key-takeaways h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
    color: #a16207;
}

.guide-content .key-takeaways ul {
    margin-bottom: 0;
}

.guide-content .key-takeaways li {
    color: var(--text-dark);
}

.guide-content .warning-box {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.guide-content .warning-box p {
    color: #991b1b;
    margin-bottom: 0;
}

.guide-content .warning-box strong {
    color: #dc2626;
}

.guide-content .info-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.guide-content .info-box p {
    color: var(--text-dark);
    margin-bottom: 0;
}

.guide-content sup {
    font-size: 0.75em;
    color: var(--primary-color);
}

.guide-content .section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

.guide-cta {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.guide-cta p {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .guide-content {
        padding: 1.5rem;
    }

    .guide-content h2 {
        font-size: 1.35rem;
    }

    .guide-content h3 {
        font-size: 1.15rem;
    }

    .guide-content .executive-summary,
    .guide-content .key-takeaways {
        padding: 1.25rem;
    }
}

/* Sidebar CTA */
.sidebar-cta {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-cta p {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.sidebar-cta .btn {
    width: 100%;
    font-size: 0.9rem;
}
