/* ==========================================
   Trusted Plumber Upland CA - Stylesheet
   Color Scheme D: Royal Blue
   Fonts: Playfair Display + Source Sans Pro
   ========================================== */

/* CSS Variables - Royal Blue Color Scheme */
:root {
    --primary: #1D4ED8;
    --primary-dark: #1E40AF;
    --primary-light: #3B82F6;
    --accent: #60A5FA;
    --primary-hover: #1e3fa8;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition-base);
}

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

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

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #172b85 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.4);
    color: white;
}

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

.btn-white:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    color: var(--primary-dark);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* Section Badge */
.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(29, 78, 216, 0.1);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-title {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-medium);
}

/* Top Bar */
.top-bar {
    background: var(--primary-dark);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .availability {
    font-weight: 600;
    color: var(--accent);
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-lg);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo img {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.logo:hover {
    color: var(--text-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-medium);
    font-weight: 600;
    font-size: 0.9375rem;
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: all var(--transition-base);
}

/* Mobile Sticky CTA */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    z-index: 999;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-sticky-cta:hover {
    color: white;
}

/* Hero Section - Multi-Image Style */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-image-collage {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
}

.hero-img {
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-img-1 {
    background-image: url('https://images.unsplash.com/photo-1585704032915-c3400ca199e7?w=800');
}

.hero-img-2 {
    background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=800');
}

.hero-img-3 {
    background-image: url('https://images.unsplash.com/photo-1504328345606-18bbc8c9d7d1?w=800');
}

.hero-img-4 {
    background-image: url('https://images.unsplash.com/photo-1542013936693-884638332954?w=800');
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.92) 0%, rgba(30, 64, 175, 0.88) 50%, rgba(29, 78, 216, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: white;
    padding: 4rem 0;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-cta-group {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--bg-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    margin-bottom: 1.5rem;
}

.about-content p {
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
    line-height: 1.7;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-item h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Services Section - 2 Column Grid */
.services {
    padding: 6rem 0;
    background: var(--bg-light);
}

.services-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-card.service-card-full {
    grid-column: 1 / -1;
    max-width: 600px;
    margin: 0 auto;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform var(--transition-base);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.service-cta {
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-cta:hover {
    gap: 0.75rem;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 6rem 0;
    background: white;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.reason-card {
    padding: 2.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.reason-card:hover {
    background: white;
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.reason-number {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.15;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
}

.reason-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.reason-card p {
    position: relative;
    margin-bottom: 0;
    line-height: 1.7;
}

/* Locations Section - 2 Column Alternating */
.locations {
    padding: 6rem 0;
    background: var(--bg-light);
}

.locations-grid-2col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.location-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.location-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.location-image {
    overflow: hidden;
}

.location-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.location-card:hover .location-image img {
    transform: scale(1.05);
}

.location-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.location-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.location-content p {
    line-height: 1.7;
    margin-bottom: 0;
}

/* Common Problems Section */
.problems {
    padding: 6rem 0;
    background: white;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.problem-card {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
    transition: all var(--transition-base);
}

.problem-card:hover {
    background: white;
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.problem-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.problem-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.problem-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* FAQ Section - Side by Side */
.faq {
    padding: 6rem 0;
    background: var(--bg-light);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

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

.faq-item {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
    transition: all var(--transition-base);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question.active {
    color: var(--primary);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform var(--transition-base);
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.faq-answer.active {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    line-height: 1.7;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-details {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.contact-text a {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.contact-text p {
    margin-bottom: 0;
    color: var(--text-medium);
}

.contact-text span {
    font-size: 0.875rem;
    color: var(--text-light);
}

.contact-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.contact-map iframe {
    display: block;
    width: 100%;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.footer-logo:hover {
    color: white;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.footer-phone {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 0.5rem;
}

.footer-phone:hover {
    color: white;
}

.footer-links h4 {
    color: white;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--accent);
}

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-bottom .disclaimer {
    font-size: 0.75rem;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

/* Icon Bounce on Hover */
.service-card:hover .service-icon,
.feature-item:hover .feature-icon,
.reason-card:hover .reason-number {
    animation: iconBounce 0.5s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        order: -1;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }
    
    .section-title {
        font-size: 1.875rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        gap: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-cta {
        display: none;
    }
    
    .mobile-sticky-cta {
        display: block;
    }
    
    .hero {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero-image-collage {
        display: none;
    }
    
    .hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    }
    
    .services-grid-2col {
        grid-template-columns: 1fr;
    }
    
    .reasons-grid,
    .problems-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .location-card {
        grid-template-columns: 1fr;
    }
    
    .location-card.location-card-right .location-content {
        order: 2;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    body {
        padding-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 2rem 0;
    }
    
    .service-card,
    .reason-card,
    .problem-card {
        padding: 1.5rem;
    }
    
    .location-content {
        padding: 1.5rem;
    }
    
    .btn-large {
        padding: 1rem 1.75rem;
        font-size: 1rem;
    }
}
