/* ============================================================================
   Brooke Bell - Gorgeous Modern Design (Site-Wide)
   Beautiful gradient styling from search page applied everywhere
   ============================================================================ */

:root {
    --primary-color: #FF6B9D;
    --secondary-color: #FFA500;
    --accent-color: #333333;
    --text-color: #1a1a1a;
    --text-light: #666;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   Reset & Base Styles
   ============================================================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
    line-height: 1.6;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility - Skip to main content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ============================================================================
   Typography
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.75rem;
    color: var(--accent-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

strong {
    font-weight: 600;
}

/* ============================================================================
   Layout & Container
   ============================================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================================
   Header & Navigation
   ============================================================================ */

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
}

.logo h1 {
    font-size: 1.75rem;
    margin: 0;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 0.9;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================================================
   Modern Page Wrapper (Search Page Style - Applied Site-Wide)
   ============================================================================ */

.search-page-wrapper,
.home-page-wrapper,
.page-wrapper {
    min-height: 100vh;
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
}

.search-header,
.home-header,
.modern-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-header .container,
.home-header .container,
.modern-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
}

.search-logo,
.home-logo img,
.modern-logo {
    height: 50px;
    width: auto;
}

.search-brand,
.home-logo h1,
.modern-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    margin: 0;
}

.search-main,
.home-main,
.modern-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Gradient Title Styling */
.gradient-title,
.search-title-section h1,
.hero-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Search Grid Layout */
.search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.search-panel {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    position: relative;
}

.search-panel:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.panel-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.panel-content {
    padding: 40px;
}

.panel-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.panel-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.panel-description {
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Modern Form Styling */
.search-form-custom {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-input-wrapper {
    position: relative;
}

.search-input-custom,
.modern-input {
    width: 100%;
    padding: 18px 22px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.search-input-custom:focus,
.modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.search-btn-custom,
.modern-btn,
.cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.search-btn-custom:hover,
.modern-btn:hover,
.cta-button:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
    text-decoration: none;
}

.search-btn-custom:active,
.modern-btn:active,
.cta-button:active {
    transform: scale(0.98);
}

/* Feature Cards */
.features-grid,
.search-features .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card,
.feature-item {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover,
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.feature-desc,
.feature-text {
    color: #666;
    line-height: 1.6;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 60px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Error Messages */
.search-error-message {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
    animation: slideDown 0.3s ease;
}

.search-error-message.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Styling */
.search-footer,
.home-footer,
.modern-footer {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    margin-top: 60px;
    background: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 968px) {
    .search-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gradient-title,
    .search-title-section h1,
    .hero-title {
        font-size: 2.2rem;
    }
    
    .panel-content {
        padding: 30px;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   Breadcrumb Navigation
   ============================================================================ */

.breadcrumb {
    padding: 20px 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb span[aria-hidden] {
    margin: 0 8px;
}

/* ============================================================================
   Main Content & Provider Page
   ============================================================================ */

main {
    min-height: calc(100vh - 300px);
    padding: 40px 0;
}

.provider-page {
    background-color: var(--light-bg);
}

.provider-article {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* ============================================================================
   Provider Header
   ============================================================================ */

.provider-header {
    border-bottom: 2px solid var(--border-color);
    padding: 40px 0;
    margin-bottom: 40px;
}

.provider-header h1 {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.provider-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 1.05rem;
}

.provider-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-meta strong {
    color: var(--text-light);
}

/* ============================================================================
   Gallery Section
   ============================================================================ */

.gallery {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.main-image-wrapper {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.main-image-wrapper picture,
.main-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.thumbnail-btn {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

.thumbnail-btn:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.thumbnail-btn.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.2);
}

.thumbnail-btn picture,
.thumbnail-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================================================
   Content Wrapper (Two Column Layout)
   ============================================================================ */

.provider-content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .provider-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ============================================================================
   Sidebar Cards
   ============================================================================ */

.provider-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-card,
.details-card {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-card h2,
.details-card h2 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-item strong {
    color: var(--text-light);
    font-size: 0.9rem;
}

.phone-link,
.email-link {
    color: var(--primary-color);
    font-weight: 500;
    word-break: break-all;
}

.phone-link:hover,
.email-link:hover {
    color: var(--secondary-color);
}

/* ============================================================================
   Details List
   ============================================================================ */

.details-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.details-list dt {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.details-list dd {
    padding-left: 0;
    color: var(--accent-color);
    font-weight: 500;
}

/* ============================================================================
   Main Content Section
   ============================================================================ */

.provider-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-section,
.services-section,
.availability-section {
    padding: 30px;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.about-section h2,
.services-section h2,
.availability-section h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

.about-text {
    color: var(--text-light);
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Services List */
.services-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.services-list li {
    padding: 12px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-light);
}

.services-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ============================================================================
   Search Results - Provider Grid
   ============================================================================ */

.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.provider-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.provider-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f0f0f0;
}

.provider-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-image-link:hover .provider-card-image {
    transform: scale(1.05);
}

.provider-card h2 {
    font-size: 1.3rem;
    margin: 20px 20px 10px 20px;
}

.provider-card h2 a {
    color: var(--accent-color);
    text-decoration: none;
}

.provider-card h2 a:hover {
    color: var(--primary-color);
}

.provider-card .provider-meta {
    padding: 0 20px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
}

.provider-card .provider-meta span {
    color: #666;
}

.provider-card .phone,
.provider-card .email {
    padding: 0 20px;
    margin: 5px 0;
    font-size: 0.95rem;
    color: #555;
}

.provider-card .btn-view {
    display: block;
    margin: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.provider-card .btn-view:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.results-count {
    font-size: 1.1rem;
    color: #666;
    margin: 20px 0 30px 0;
}

.search-again {
    margin: 40px 0;
    text-align: center;
}

.search-again a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer {
    background: linear-gradient(135deg, var(--accent-color), #000);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav a {
    color: white;
    font-weight: 500;
}

.footer p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.disclaimer {
    opacity: 0.8;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }

    .nav {
        width: 100%;
        justify-content: center;
        gap: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .provider-header {
        padding: 30px 0;
    }

    .provider-meta {
        flex-direction: column;
        gap: 15px;
    }

    .main-image-wrapper {
        min-height: 300px;
    }

    .thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    main {
        padding: 20px 0;
    }

    .provider-header {
        padding: 20px 0;
        margin-bottom: 20px;
    }

    .gallery {
        margin-bottom: 20px;
    }

    .provider-content-wrapper {
        gap: 20px;
        margin-bottom: 20px;
    }

    .contact-card,
    .details-card,
    .about-section,
    .services-section,
    .availability-section {
        padding: 20px;
    }

    .logo h1 {
        font-size: 1.3rem;
    }
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================================
   TER Affiliate Banner
   ============================================================================ */

.ter-banner {
    margin: 40px 0;
    text-align: center;
    background: var(--gradient-background);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ter-banner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ter-banner a {
    display: inline-block;
}

.ter-banner a:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ter-banner figcaption {
    margin-top: 15px;
    font-size: 1rem;
    color: var(--text-color);
}

.ter-banner figcaption a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ter-banner figcaption a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ============================================================================
   Similar Providers Section
   ============================================================================ */

.similar-providers-section {
    margin-top: 40px;
    padding: 30px 0;
    border-top: 2px solid var(--border-color);
}

.similar-providers-section h2 {
    font-size: 1.75rem;
    margin-bottom: 25px;
    text-align: center;
}

.similar-providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.similar-provider-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.similar-provider-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.similar-provider-image {
    display: block;
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.similar-provider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.similar-provider-card:hover .similar-provider-image img {
    transform: scale(1.05);
}

.similar-provider-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.similar-provider-info h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.similar-provider-info h3 a {
    color: var(--accent-color);
    text-decoration: none;
}

.similar-provider-info h3 a:hover {
    color: var(--primary-color);
}

.similar-provider-location {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.similar-provider-details {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 8px;
}

.similar-provider-reviews {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.similar-provider-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: auto;
}

.similar-provider-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
    text-decoration: none;
}

@media (max-width: 768px) {
    .similar-providers-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .similar-provider-image {
        height: 200px;
    }
    
    .similar-provider-info {
        padding: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --text-light: #a0a0a0;
        --light-bg: #1e1e1e;
        --border-color: #333;
    }

    body {
        background-color: #121212;
    }

    .contact-card,
    .details-card,
    .about-section,
    .services-section,
    .availability-section,
    .similar-provider-card {
        background: #1e1e1e;
        border-color: #333;
    }
}
