/* ══════════════════════════════════════════════════════════════
   First Response Plumbing LLC — Shared Styles
   ══════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    padding-top: 72px; /* space for fixed header */
}

/* ── Header ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 72px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.header-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.header-logo-text {
    display: flex;
    flex-direction: column;
}

.header-logo-text .name {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.header-logo-text .license {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 500;
}

.header-logo-text .subtitle {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.header-spacer { flex: 1; }

.header-phone {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #1e40af;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.header-phone:hover { background: #1e3a8a; }

.header-phone svg { width: 16px; height: 16px; }

.header-sms {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #1e40af;
    text-decoration: none;
    transition: background 0.2s;
}

.header-sms:hover { background: #eff6ff; }

.lang-toggle {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    transition: color 0.2s;
}

.lang-toggle:hover { color: #1e40af; border-color: #1e40af; }

/* ── Hamburger ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #334155;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── Mobile nav overlay ── */
.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 999;
    padding: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-nav a:hover, .mobile-nav a.active { background: #eff6ff; color: #1e40af; }

.mobile-nav .nav-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

/* ── Desktop nav (hidden on mobile, shown inline on desktop) ── */
.desktop-nav {
    display: flex;
    gap: 0.25rem;
}

.desktop-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.desktop-nav a:hover, .desktop-nav a.active { background: #eff6ff; color: #1e40af; }

/* ── Main content ── */
.main {
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1.5rem 4rem;
}

/* ── Cards ── */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    margin-bottom: 1.25rem;
}

.card h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1e40af;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0.75rem;
}

/* ── CTA card ── */
.cta-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.cta-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #1e40af;
    color: #fff;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.cta-primary:hover { background: #1e3a8a; }

.cta-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #1e40af;
    border: 2px solid #1e40af;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.cta-secondary:hover { background: #eff6ff; }

.cta-email {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    text-decoration: none;
    margin-top: 0.5rem;
}

.cta-email:hover { color: #1e40af; }

/* ── Badges ── */
.badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

.badge-green { background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; }
.badge-blue { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Services grid ── */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    list-style: none;
}

.services-grid li {
    font-size: 0.9rem;
    color: #334155;
    padding-left: 1.4rem;
    position: relative;
}

.services-grid li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 700;
}

/* ── Area tags ── */
.area-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.area-tags span {
    font-size: 0.78rem;
    color: #334155;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
}

.area-note {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

/* ── Photo card ── */
.photo-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.photo-card img {
    width: 100%;
    height: auto;
    display: block;
}

.photo-card .caption {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
}

/* ── Map ── */
.map-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.78rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

/* ── Sticky mobile CTA ── */
.sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.9rem;
    background: #1e40af;
    color: #fff;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .desktop-nav { display: none; }
    .hamburger { display: flex; }
}

@media (max-width: 768px) {
    .header-phone span { display: none; }
    .header-logo-text .name { font-size: 0.85rem; }
    .header-logo-text .subtitle { display: none; }
    .services-grid { grid-template-columns: 1fr; }
    .main { padding: 0 1rem 6rem; }
    .sticky-cta { display: block; }
    body { padding-bottom: 60px; }
}

@media (min-width: 1025px) {
    .hamburger { display: none; }
    .mobile-nav { display: none !important; }
}

/* ── Scrolling photo bar ── */
.photo-scroll {
    width: 100%;
    overflow: hidden;
    margin: 2rem 0;
    position: relative;
}

.photo-scroll::before,
.photo-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}

.photo-scroll::before {
    left: 0;
    background: linear-gradient(to right, #f8fafc, transparent);
}

.photo-scroll::after {
    right: 0;
    background: linear-gradient(to left, #f8fafc, transparent);
}

.photo-scroll-track {
    display: flex;
    gap: 0.75rem;
    animation: scroll-photos 30s linear infinite;
    width: max-content;
}

.photo-scroll-track img {
    height: 180px;
    width: auto;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

@keyframes scroll-photos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.photo-scroll:hover .photo-scroll-track {
    animation-play-state: paused;
}

@media (hover: none) {
    .photo-scroll:hover .photo-scroll-track {
        animation-play-state: running;
    }
}

@media (max-width: 640px) {
    .photo-scroll-track img { height: 140px; }
}

/* ── Callback form ── */
.callback-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.callback-form input,
.callback-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s;
}

.callback-form input:focus,
.callback-form textarea:focus {
    outline: none;
    border-color: #1e40af;
    background: #fff;
}

.callback-form textarea {
    resize: vertical;
    min-height: 80px;
}

.callback-form button {
    padding: 0.85rem 1.5rem;
    background: #1e40af;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.callback-form button:hover {
    background: #1e3a8a;
}

.form-success {
    display: none;
    text-align: center;
    padding: 1.5rem;
    color: #166534;
    font-weight: 600;
}

/* ── Print stylesheet ── */
@media print {
    .site-header,
    .site-footer,
    .sticky-cta,
    .mobile-nav,
    .photo-scroll,
    .badges,
    .cta-group,
    .callback-form,
    .map-container { display: none !important; }

    body { padding-top: 0; background: #fff; color: #000; }

    .main { max-width: 100%; padding: 0; }

    .card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }

    a { color: #000; text-decoration: none; }
    a[href^="tel:"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
}

/* ── Floating WhatsApp button ── */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 998;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 70px; /* above the sticky call bar */
        right: 16px;
        width: 50px;
        height: 50px;
    }
}
