/*
Theme Name: Horseback Riding Directory
Theme URI: https://localhorsbackriding.com
Description: A comprehensive directory theme for horseback riding businesses across the United States
Author: Al
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: horseback-directory
Tags: directory, business-listing, custom-post-types, two-columns, responsive-design
*/

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

a {
    color: #2c5530;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1a3319;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c5530;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ===== Header ===== */
.site-header {
    background-color: #2c5530;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.site-title {
    font-size: 1.8rem;
    margin: 0;
}

.site-title a {
    color: white;
}

/* ===== Navigation ===== */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.main-navigation a {
    color: white;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
}

.main-navigation a:hover {
    color: #a8d5a8;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #2c5530 0%, #4a7c4e 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.location-prompt {
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.location-prompt strong {
    color: #ffd700;
}

/* ===== Search Form ===== */
.directory-search-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.search-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c5530;
}

.search-field input,
.search-field select {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #2c5530;
}

.search-submit {
    background-color: #2c5530;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-end;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background-color: #1a3319;
}

/* ===== Directory Listings ===== */
.directory-listings {
    padding: 3rem 0;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.listing-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.listing-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.listing-content {
    padding: 1.5rem;
}

.listing-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.listing-location {
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.listing-location::before {
    content: "📍";
}

.listing-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-badge {
    background-color: #e8f5e9;
    color: #2c5530;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.listing-excerpt {
    color: #666;
    margin-bottom: 1rem;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.listing-phone,
.listing-website {
    font-size: 0.875rem;
}

.view-details-btn {
    background-color: #2c5530;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
}

.view-details-btn:hover {
    background-color: #1a3319;
    color: white;
}

/* ===== Single Listing Page ===== */
.single-listing-header {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.listing-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.listing-main-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.listing-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: fit-content;
}

.listing-info-box {
    margin-bottom: 1.5rem;
}

.listing-info-box h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2c5530;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    font-size: 1.25rem;
    min-width: 24px;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-btn {
    background-color: #2c5530;
    color: white;
    padding: 1rem;
    text-align: center;
    border-radius: 4px;
    font-weight: 600;
    display: block;
}

.contact-btn.secondary {
    background-color: #4a7c4e;
}

.contact-btn:hover {
    background-color: #1a3319;
    color: white;
}

/* ===== Filters & Sidebar ===== */
.archive-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.filters-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== State Pages ===== */
.state-header {
    background: linear-gradient(135deg, #2c5530 0%, #4a7c4e 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.state-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-box {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ===== Footer ===== */
.site-footer {
    background-color: #2c5530;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

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

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

.footer-section a {
    color: rgba(255,255,255,0.8);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .archive-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .listing-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .search-fields {
        grid-template-columns: 1fr;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .state-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .state-stats {
        grid-template-columns: 1fr;
    }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* ===== Loading States ===== */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination .current {
    background-color: #2c5530;
    color: white;
    border-color: #2c5530;
}

.pagination a:hover {
    background-color: #f0f0f0;
}

/* Full width post content */
.single-post .entry-content,
.single-post .post-content,
.single-post .site-content,
.single-post .content-area {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
}
