/* Tub Reglazing Directory - Main Stylesheet */

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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --star-color: #fbbf24;
}

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

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

/* Header & Navigation */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.nav-search {
    flex: 1;
    max-width: 400px;
}

.search-input-nav {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.search-input-nav:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: url('../images/hero-tub-reglazing.jpg') center/cover no-repeat;
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom center;
    background-size: cover;
    opacity: 0.3;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    min-width: 150px;
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.95;
    font-weight: 500;
}

/* Main Content */
main {
    padding: 3rem 0;
}

.breadcrumb {
    margin-bottom: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

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

/* About Section */
.about-section {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.about-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

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

/* Search Section */
.search-section {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-input-main {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.search-input-main:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    gap: 1rem;
}

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

.search-result-item:hover {
    background: var(--bg-light);
}

.search-result-icon {
    font-size: 1.5rem;
}

.search-result-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-color);
}

.search-result-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Cities Section */
.cities-section h2 {
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* State Grid on Homepage */
.states-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.state-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.state-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.state-card h3 {
    margin-bottom: 1rem;
    font-size: 1.75rem;
    color: var(--text-color);
}

.state-card h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.state-card h3 a:hover {
    color: var(--primary-color);
}

.state-stats {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* State Page - Cities Grid */
.state-header {
    text-align: center;
    margin-bottom: 3rem;
}

.state-header h1 {
    margin-bottom: 1rem;
}

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

.city-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.city-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

.city-card h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.city-card h3 a:hover {
    color: var(--primary-color);
}

.listing-count {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* City Page */
.city-header {
    text-align: center;
    margin-bottom: 3rem;
}

.city-header h1 {
    margin-bottom: 1rem;
}

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

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.listing-card {
    background: var(--bg-white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.listing-card h3 {
    margin-bottom: 0.5rem;
}

.listing-card h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.listing-card h3 a:hover {
    color: var(--primary-color);
}

.listing-card .address {
    color: var(--text-light);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.listing-card .phone {
    color: var(--text-light);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.listing-card .phone a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Rating */
.rating {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: var(--star-color);
    font-size: 1.1rem;
}

.rating-value {
    font-weight: 600;
    color: var(--text-color);
}

.review-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Listing Detail Page */
.listing-detail {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

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

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

.listing-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.listing-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.listing-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.listing-image:hover img {
    transform: scale(1.02);
}

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

.info-section h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-info p {
    margin-bottom: 0.75rem;
}

.contact-item {
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hour-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg-light);
    border-radius: 4px;
}

.day {
    font-weight: 600;
}

/* Sidebar */
.listing-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-card {
    background: var(--bg-light);
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Back Link */
.back-link {
    margin-top: 2rem;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Social Media Links */
.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.social-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.social-btn.facebook { background: #1877f2; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-btn.twitter { background: #1da1f2; }
.social-btn.linkedin { background: #0077b5; }
.social-btn.youtube { background: #ff0000; }
.social-btn.tiktok { background: #000000; }

/* Footer */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 2.5rem 0;
    margin-top: 4rem;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

footer p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
    }
    
    .nav-search {
        order: 3;
        width: 100%;
        max-width: none;
        margin-top: 1rem;
    }
    
    .search-input-main {
        font-size: 1rem;
        padding: 1rem 1.2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .states-grid-page {
        grid-template-columns: 1fr;
    }
    
    .cities-grid-page {
        grid-template-columns: 1fr;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .listing-content {
        grid-template-columns: 1fr;
    }
    
    .listing-sidebar {
        order: -1;
    }
    
    .nav-links {
        gap: 1rem;
    }
}
