/*
Theme Name: LSP Theme 1
Theme URI: https://localsites.pro
Author: Abhishek Sood
Author URI: https://a8c.in/
Description: High-performance WordPress theme for Local Sites Pro plugin. Features dynamic content, transient caching, SEO optimization, and full integration with LSP data fields.
Version: 2.1.3
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lsp-theme

*/

/* ==========================================================================
   CSS Variables
   Note: Colors and Typography are injected dynamically via wp_head by 
   sm_starter_tailwind_config() from lsp_theme_settings database option.
   Only static utility variables are defined here.
   ========================================================================== */

:root {
    /* Legacy variable references (point to LSP variables injected in head) */
    --sm-primary: var(--lsp-color-primary);
    --sm-secondary: var(--lsp-color-primary-hover);
    --primary-color: var(--lsp-color-primary);
    --secondary-color: var(--lsp-color-primary-hover);
    
    /* Typography references */
    --sm-font-sans: var(--lsp-font-secondary);
    --sm-font-heading: var(--lsp-font-primary);
    
    /* Spacing */
    --sm-spacing-xs: 0.25rem;
    --sm-spacing-sm: 0.5rem;
    --sm-spacing-md: 1rem;
    --sm-spacing-lg: 2rem;
    --sm-spacing-xl: 4rem;
    
    /* Border Radius */
    --sm-radius-sm: 4px;
    --sm-radius-md: 8px;
    --sm-radius-lg: 16px;
    --sm-radius-xl: 24px;
    --sm-radius-full: 9999px;
    
    /* Shadows */
    --sm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --sm-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --sm-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --sm-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: var(--lsp-font-size-base);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--lsp-font-secondary);
    line-height: var(--lsp-line-height);
    color: var(--lsp-color-text);
    background-color: var(--lsp-color-background);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--lsp-font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    color: var(--lsp-color-text);
}

h1 { font-size: var(--lsp-font-size-h1); }
h2 { font-size: var(--lsp-font-size-h2); }
h3 { font-size: var(--lsp-font-size-h3); }

/* ==========================================================================
   Tailwind CSS Color Overrides - Use LSP Theme Editor Variables
   ========================================================================== */

/* Primary Orange Color - Maps to LSP Primary */
.bg-primary-orange {
    background-color: var(--lsp-color-primary) !important;
}

.text-primary-orange {
    color: var(--lsp-color-primary) !important;
}

.border-primary-orange {
    border-color: var(--lsp-color-primary) !important;
}

.hover\:bg-primary-orange:hover {
    background-color: var(--lsp-color-primary) !important;
}

.hover\:text-primary-orange:hover {
    color: var(--lsp-color-primary) !important;
}

.hover\:border-primary-orange:hover {
    border-color: var(--lsp-color-primary) !important;
}

/* Dark Orange - Maps to LSP Primary Hover */
.bg-dark-orange {
    background-color: var(--lsp-color-primary-hover) !important;
}

.hover\:bg-dark-orange:hover {
    background-color: var(--lsp-color-primary-hover) !important;
}

/* Focus states with primary color */
.focus\:border-primary-orange:focus {
    border-color: var(--lsp-color-primary) !important;
}

.focus\:ring-primary-orange:focus {
    --tw-ring-color: var(--lsp-color-primary) !important;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sm-spacing-md);
}

/* ==========================================================================
   Screen Reader Text
   ========================================================================== */

.screen-reader-text,
.sr-only {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus,
.sr-only:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   WordPress Core Styles
   ========================================================================== */

/* Alignments */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.alignwide {
    margin-left: -2rem;
    margin-right: -2rem;
    max-width: calc(100% + 4rem);
}

.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

/* Captions */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--lsp-color-text-muted);
    text-align: center;
    padding: 0.5rem 0;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: var(--sm-radius-md);
}

/* ==========================================================================
   Prose Styles (for content areas)
   ========================================================================== */

.prose {
    color: var(--lsp-color-text);
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1.25em;
}

.prose h2 {
    font-size: 1.5em;
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 700;
    color: var(--lsp-color-text);
}

.prose h3 {
    font-size: 1.25em;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    font-weight: 600;
    color: var(--lsp-color-text);
}

.prose h4 {
    font-size: 1em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: var(--lsp-color-text);
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose blockquote {
    font-style: italic;
    border-left: 4px solid var(--lsp-color-primary);
    padding-left: 1em;
    margin: 1.6em 0;
    color: var(--lsp-color-text-muted);
}

.prose a {
    color: var(--lsp-color-primary);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--lsp-color-primary-hover);
}

.prose img {
    border-radius: var(--sm-radius-lg);
    margin: 2em 0;
}

/* ==========================================================================
   Enhanced Content Styles for Service & Area Pages
   ========================================================================== */

/* Unordered Lists with Custom Checkmarks */
.prose ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5em 0;
}

.prose ul li {
    position: relative;
    padding-left: 2em;
    margin-bottom: 0.75em;
    line-height: 1.7;
}

.prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4em;
    width: 1.25em;
    height: 1.25em;
    background-color: var(--lsp-color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prose ul li::after {
    content: '✓';
    position: absolute;
    left: 0.25em;
    top: 0.35em;
    font-size: 0.75em;
    font-weight: 700;
    color: var(--lsp-color-secondary, #1a1a1a);
}

/* Nested unordered lists */
.prose ul ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose ul ul li::before {
    background-color: transparent;
    border: 2px solid var(--lsp-color-primary);
}

.prose ul ul li::after {
    display: none;
}

/* Ordered Lists with Styled Numbers */
.prose ol {
    list-style: none;
    padding-left: 0;
    margin: 1.5em 0;
    counter-reset: item;
}

.prose ol li {
    position: relative;
    padding-left: 3em;
    margin-bottom: 1em;
    line-height: 1.7;
    counter-increment: item;
}

.prose ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    width: 2em;
    height: 2em;
    background-color: var(--lsp-color-primary);
    color: var(--lsp-color-secondary, #1a1a1a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875em;
}

/* Nested ordered lists */
.prose ol ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose ol ol li::before {
    background-color: var(--lsp-color-background-alt);
    color: var(--lsp-color-text);
    border: 2px solid var(--lsp-color-primary);
    font-size: 0.75em;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2em 0;
    border-radius: var(--sm-radius-lg);
    overflow: hidden;
    box-shadow: var(--sm-shadow-md);
    border: 1px solid var(--lsp-color-border);
}

.prose thead {
    background: linear-gradient(135deg, var(--lsp-color-primary) 0%, var(--lsp-color-primary-hover) 100%);
}

.prose th {
    padding: 1em 1.25em;
    text-align: left;
    font-weight: 700;
    color: var(--lsp-color-secondary, #1a1a1a);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--lsp-color-primary-hover);
}

.prose td {
    padding: 1em 1.25em;
    text-align: left;
    border-bottom: 1px solid var(--lsp-color-border);
    background-color: var(--lsp-color-background);
    transition: background-color 0.2s ease;
}

.prose tbody tr:hover td {
    background-color: var(--lsp-color-background-alt);
}

.prose tbody tr:last-child td {
    border-bottom: none;
}

/* Alternate row colors */
.prose tbody tr:nth-child(even) td {
    background-color: var(--lsp-color-background-alt);
}

.prose tbody tr:nth-child(even):hover td {
    background-color: rgba(var(--lsp-color-primary-rgb, 248, 213, 9), 0.1);
}

/* Responsive tables */
@media (max-width: 768px) {
    .prose table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .prose th,
    .prose td {
        padding: 0.75em 1em;
        font-size: 0.9em;
        white-space: nowrap;
    }
}

/* Definition Lists */
.prose dl {
    margin: 1.5em 0;
}

.prose dt {
    font-weight: 700;
    color: var(--lsp-color-text);
    margin-top: 1em;
    padding-left: 1em;
    border-left: 3px solid var(--lsp-color-primary);
}

.prose dd {
    margin-left: 0;
    padding-left: 1em;
    margin-top: 0.5em;
    margin-bottom: 1em;
    color: var(--lsp-color-text-muted);
    border-left: 3px solid var(--lsp-color-border);
}

/* Enhanced Blockquotes */
.prose blockquote {
    position: relative;
    font-style: italic;
    border-left: none;
    padding: 1.5em 2em 1.5em 4em;
    margin: 2em 0;
    background: linear-gradient(135deg, var(--lsp-color-background-alt) 0%, var(--lsp-color-background) 100%);
    border-radius: var(--sm-radius-lg);
    box-shadow: var(--sm-shadow-sm);
}

.prose blockquote::before {
    content: '"';
    position: absolute;
    left: 0.5em;
    top: 0.25em;
    font-size: 4em;
    font-family: Georgia, serif;
    color: var(--lsp-color-primary);
    opacity: 0.5;
    line-height: 1;
}

.prose blockquote p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.8;
}

.prose blockquote cite {
    display: block;
    margin-top: 1em;
    font-style: normal;
    font-weight: 600;
    color: var(--lsp-color-primary);
    font-size: 0.9em;
}

.prose blockquote cite::before {
    content: '— ';
}

/* Code Blocks */
.prose code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 0.875em;
    background-color: var(--lsp-color-background-alt);
    padding: 0.2em 0.4em;
    border-radius: var(--sm-radius-sm);
    color: var(--lsp-color-primary);
    border: 1px solid var(--lsp-color-border);
}

.prose pre {
    background-color: #1a1a2e;
    color: #e2e8f0;
    padding: 1.5em;
    border-radius: var(--sm-radius-lg);
    overflow-x: auto;
    margin: 2em 0;
    font-size: 0.9em;
    line-height: 1.7;
    box-shadow: var(--sm-shadow-lg);
}

.prose pre code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
    font-size: inherit;
}

/* Horizontal Rules */
.prose hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--lsp-color-primary), transparent);
    margin: 3em 0;
    border-radius: var(--sm-radius-full);
}

/* Strong and Emphasis */
.prose strong {
    font-weight: 700;
    color: var(--lsp-color-text);
}

.prose em {
    font-style: italic;
}

.prose mark {
    background-color: rgba(var(--lsp-color-primary-rgb, 248, 213, 9), 0.3);
    padding: 0.1em 0.3em;
    border-radius: var(--sm-radius-sm);
}

/* Figure and Figcaption */
.prose figure {
    margin: 2em 0;
}

.prose figcaption {
    font-size: 0.875em;
    color: var(--lsp-color-text-muted);
    text-align: center;
    margin-top: 0.75em;
    font-style: italic;
}

/* Address */
.prose address {
    font-style: normal;
    background-color: var(--lsp-color-background-alt);
    padding: 1.5em;
    border-radius: var(--sm-radius-lg);
    margin: 1.5em 0;
    border-left: 4px solid var(--lsp-color-primary);
}

/* Abbreviations */
.prose abbr[title] {
    text-decoration: underline dotted var(--lsp-color-primary);
    cursor: help;
}

/* Subscript and Superscript */
.prose sub,
.prose sup {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.prose sup {
    top: -0.5em;
}

.prose sub {
    bottom: -0.25em;
}

/* ==========================================================================
   Service & Area Page Specific Content Styles
   ========================================================================== */

/* Service highlights list with icons */
.service-content ul,
.area-content ul {
    list-style: none;
    padding: 0;
}

.service-content ul li,
.area-content ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    padding: 0.75em 1em;
    margin-bottom: 0.5em;
    background-color: var(--lsp-color-background-alt);
    border-radius: var(--sm-radius-md);
    border-left: 3px solid var(--lsp-color-primary);
    transition: all 0.2s ease;
}

.service-content ul li:hover,
.area-content ul li:hover {
    transform: translateX(5px);
    box-shadow: var(--sm-shadow-sm);
}

.service-content ul li::before,
.area-content ul li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    height: 1.5em;
    background-color: var(--lsp-color-primary);
    color: var(--lsp-color-secondary, #1a1a1a);
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: 700;
    position: static;
}

.service-content ul li::after,
.area-content ul li::after {
    display: none;
}

/* Benefits/Features grid layout */
.prose ul.benefits-list,
.prose ul.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1em;
}

.prose ul.benefits-list li,
.prose ul.features-list li {
    padding: 1em 1.25em;
    background: white;
    border-radius: var(--sm-radius-lg);
    box-shadow: var(--sm-shadow-sm);
    border: 1px solid var(--lsp-color-border);
}

/* Pricing tables */
.prose table.pricing-table {
    text-align: center;
}

.prose table.pricing-table thead {
    background: var(--lsp-color-secondary, #1a1a1a);
}

.prose table.pricing-table th {
    color: white;
    padding: 1.5em 1em;
}

.prose table.pricing-table th.featured {
    background-color: var(--lsp-color-primary);
    color: var(--lsp-color-secondary, #1a1a1a);
    position: relative;
}

.prose table.pricing-table th.featured::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--lsp-color-primary);
    color: var(--lsp-color-secondary, #1a1a1a);
    font-size: 0.7em;
    padding: 0.25em 0.75em;
    border-radius: var(--sm-radius-full);
    font-weight: 700;
}

/* Comparison tables */
.prose table.comparison-table td:first-child {
    font-weight: 600;
    text-align: left;
    background-color: var(--lsp-color-background-alt);
}

.prose table.comparison-table td {
    text-align: center;
}

/* Check/Cross icons in tables */
.prose table .check::before {
    content: '✓';
    color: #10b981;
    font-weight: 700;
}

.prose table .cross::before {
    content: '✗';
    color: #ef4444;
    font-weight: 700;
}

/* Process/Steps list */
.prose ol.process-list,
.prose ol.steps-list {
    position: relative;
}

.prose ol.process-list::before,
.prose ol.steps-list::before {
    content: '';
    position: absolute;
    left: 1em;
    top: 2em;
    bottom: 2em;
    width: 2px;
    background: linear-gradient(to bottom, var(--lsp-color-primary), var(--lsp-color-border));
}

.prose ol.process-list li,
.prose ol.steps-list li {
    padding-left: 4em;
    padding-bottom: 1.5em;
}

/* Inline icons for lists */
.prose ul li[data-icon]::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* ==========================================================================
   Dark Mode Support (if theme supports it)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .prose pre {
        background-color: #0d1117;
    }
    
    .prose blockquote {
        background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    }
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.navigation.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.navigation.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    background-color: var(--lsp-color-background);
    border: 1px solid var(--lsp-color-border);
    border-radius: var(--sm-radius-md);
    color: var(--lsp-color-text);
    font-weight: 500;
    transition: all 0.2s ease;
}

.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers.current {
    background-color: var(--lsp-color-primary);
    border-color: var(--lsp-color-primary);
    color: var(--lsp-color-secondary);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    padding: 1.5rem;
    background-color: var(--lsp-color-background-alt);
    border-radius: var(--sm-radius-lg);
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--lsp-color-text);
}

.comment-meta {
    font-size: 0.875rem;
    color: var(--lsp-color-text-muted);
    margin-bottom: 0.5rem;
}

.comment-content p {
    margin: 0;
}

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

/* Comment Form */
.comment-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--lsp-color-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--lsp-color-border);
    border-radius: var(--sm-radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--lsp-color-primary);
    box-shadow: 0 0 0 3px rgba(248, 213, 9, 0.1);
}

.comment-form .submit {
    background-color: var(--lsp-color-primary);
    color: var(--lsp-color-secondary);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--sm-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.comment-form .submit:hover {
    background-color: var(--lsp-color-primary-hover);
}

/* ==========================================================================
   Widget Styles
   ========================================================================== */

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--lsp-color-border);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--lsp-color-text);
    transition: color 0.2s ease;
}

.widget a:hover {
    color: var(--lsp-color-primary);
}

/* Categories widget with count */
.widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   Custom Logo
   ========================================================================== */

.custom-logo-link {
    display: inline-block;
}

.custom-logo {
    max-height: 50px;
    width: auto;
}

/* ==========================================================================
   Post Navigation Links
   ========================================================================== */

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.post-navigation a {
    color: var(--lsp-color-primary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-navigation a:hover {
    color: var(--lsp-color-primary-hover);
}

/* ==========================================================================
   Tags
   ========================================================================== */

.tags-links a,
.tagcloud a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    background-color: var(--lsp-color-background-alt);
    border-radius: var(--sm-radius-full);
    font-size: 0.875rem;
    color: var(--lsp-color-text);
    transition: all 0.2s ease;
}

.tags-links a:hover,
.tagcloud a:hover {
    background-color: var(--lsp-color-primary);
    color: var(--lsp-color-secondary);
}

/* ==========================================================================
   Form Elements with Theme Colors
   ========================================================================== */

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--lsp-color-primary) !important;
}

/* Button Primary */
.btn-primary,
button[type="submit"],
input[type="submit"] {
    background-color: var(--lsp-color-primary);
    color: var(--lsp-color-secondary);
}

.btn-primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: var(--lsp-color-primary-hover);
}
