/*
Theme Name: Smates AU
Theme URI: https://a8c.in/
Author: A8C Labs
Author URI: https://a8c.in/
Description: A high-performance, conversion-focused WordPress theme for the Home Improvement niche. Built with Tailwind CSS and optimized for SEO. Requires the ServiceMates Core plugin for dynamic content.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sm-starter

*/

/* ==========================================================================
   CSS Variables - Dynamic values set via PHP
   ========================================================================== */

:root {
    --sm-primary: #FFA500;
    --sm-secondary: #FF9800;
    --primary-color: #FFA500;
    --secondary-color: #FF9800;
    
    /* Typography */
    --sm-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --sm-font-heading: var(--sm-font-sans);
    
    /* 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: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--sm-font-sans);
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

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

a:hover {
    color: var(--sm-secondary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--sm-font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    color: #1a1a2e;
}

/* ==========================================================================
   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: #666;
    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: #374151;
    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: #111827;
}

.prose h3 {
    font-size: 1.25em;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    font-weight: 600;
    color: #111827;
}

.prose h4 {
    font-size: 1em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #111827;
}

.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(--sm-primary);
    padding-left: 1em;
    margin: 1.6em 0;
    color: #4b5563;
}

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

.prose a:hover {
    color: var(--sm-secondary);
}

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

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
}

.prose th, .prose td {
    border: 1px solid #e5e7eb;
    padding: 0.75em 1em;
    text-align: left;
}

.prose th {
    background-color: #f9fafb;
    font-weight: 600;
}

/* ==========================================================================
   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: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--sm-radius-md);
    color: #374151;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers.current {
    background-color: var(--sm-primary);
    border-color: var(--sm-primary);
    color: #1f2937;
}

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

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

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

.comment-author {
    font-weight: 600;
    color: #111827;
}

.comment-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.comment-content p {
    margin: 0;
}

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

/* Comment Form */
.comment-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.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 #d1d5db;
    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(--sm-primary);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

.comment-form .submit {
    background-color: var(--sm-primary);
    color: #1f2937;
    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(--sm-secondary);
}

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

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

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.widget a {
    color: #374151;
    transition: color 0.2s ease;
}

.widget a:hover {
    color: var(--sm-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(--sm-primary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-navigation a:hover {
    color: var(--sm-secondary);
}

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

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

.tags-links a:hover,
.tagcloud a:hover {
    background-color: var(--sm-primary);
    color: #1f2937;
}
