/* ============================================================
   BetterRoofing — Unified Public Navigation & Footer
   Loaded on all public-facing unauthenticated pages.
   Injected via /js/public-nav.js
   ============================================================ */

/* ===== NAVBAR ===== */
.pub-navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(255,255,255,0.96);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow 0.3s;
}
.pub-navbar.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.08); }
.pub-nav-inner {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 0.85rem 1.25rem;
}
.pub-logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1.35rem; font-weight: 800; color: #2563eb;
    text-decoration: none;
}
.pub-logo:hover { color: #1d4ed8; }
.pub-logo-img {
    max-height: var(--pub-logo-height, 40px);
    max-width: 160px;
    object-fit: contain;
    display: block;
}
.pub-logo-name {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}
.pub-nav-links { display: flex; align-items: center; gap: 1.5rem; }
.pub-nav-link {
    font-size: 0.9rem; font-weight: 500; color: #4b5563;
    text-decoration: none; transition: color 0.2s;
}
.pub-nav-link:hover,
.pub-nav-link.active { color: #2563eb; }
.pub-nav-cta { display: flex; gap: 0.75rem; align-items: center; }

/* Navbar CTA buttons */
.pub-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.55rem 1.15rem; border-radius: 10px; font-weight: 600;
    font-size: 0.85rem; transition: all 0.25s; cursor: pointer;
    white-space: nowrap; text-decoration: none;
}
.pub-btn-outline {
    background: transparent; color: #2563eb; border: 2px solid #2563eb;
}
.pub-btn-outline:hover { background: #eff6ff; }
.pub-btn-primary { background: #2563eb; color: #fff; border: 2px solid #2563eb; }
.pub-btn-primary:hover {
    background: #1d4ed8; border-color: #1d4ed8;
    transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}
.pub-btn-demo { background: #0d9488; color: #fff; border: 2px solid #0d9488; }
.pub-btn-demo:hover {
    background: #0f766e; border-color: #0f766e;
    transform: translateY(-1px); box-shadow: 0 6px 20px rgba(13,148,136,0.35);
}

/* Hamburger button */
.pub-hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.pub-hamburger-line {
    display: block; width: 22px; height: 2px; background: #374151;
    border-radius: 2px; transition: all 0.3s;
}
.pub-hamburger.open .pub-hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.pub-hamburger.open .pub-hamburger-line:nth-child(2) { opacity: 0; }
.pub-hamburger.open .pub-hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.pub-mobile-menu {
    display: none; flex-direction: column;
    background: #fff; border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1.25rem 1.25rem;
    position: fixed; top: 57px; left: 0; width: 100%; z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.pub-mobile-menu.open { display: flex; }
.pub-mobile-link {
    font-size: 0.95rem; font-weight: 500; color: #374151;
    text-decoration: none; padding: 0.65rem 0;
    border-bottom: 1px solid #f3f4f6;
    transition: color 0.2s;
}
.pub-mobile-link.active { color: #2563eb; }
.pub-mobile-link:hover { color: #2563eb; }
.pub-mobile-cta {
    margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.pub-mobile-cta .pub-btn {
    width: 100%; justify-content: center; padding: 0.75rem; font-size: 0.95rem;
}

/* Google Play badge */
.pub-google-play-badge {
    display: inline-flex; align-items: center;
    text-decoration: none; border-radius: 10px;
    border: 2px solid #d1d5db;
    padding: 0 0.6rem 0 0.5rem;
    transition: opacity 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.25s;
    flex-shrink: 0; cursor: pointer;
}
.pub-google-play-badge:hover {
    opacity: 0.9; transform: translateY(-1px);
    border-color: #9ca3af;
    box-shadow:
        -4px -4px 10px rgba(66, 133, 244, 0.4),
         4px -4px 10px rgba(251, 188, 5, 0.4),
        -4px  4px 10px rgba(52, 168, 83, 0.4),
         4px  4px 10px rgba(234, 67, 53, 0.4);
}
.pub-google-play-img {
    height: 34px; width: auto; max-width: 120px; display: block;
}
.pub-mobile-google-play {
    display: flex; justify-content: center;
    text-decoration: none; border-radius: 8px;
    transition: opacity 0.2s;
}
.pub-mobile-google-play:hover { opacity: 0.85; }
.pub-mobile-google-play .pub-google-play-img {
    height: 44px; width: auto; max-width: 144px;
}

/* Apple App Store badge */
.pub-apple-store-badge {
    display: inline-flex; align-items: center;
    text-decoration: none; border-radius: 10px;
    border: 2px solid #d1d5db;
    padding: 0 0.6rem 0 0.5rem;
    transition: opacity 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.25s;
    flex-shrink: 0; cursor: pointer;
}
.pub-apple-store-badge:hover {
    opacity: 0.9; transform: translateY(-1px);
    border-color: #9ca3af;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}
.pub-apple-store-img {
    height: 34px; width: auto; max-width: 120px; display: block;
}
.pub-mobile-apple-store {
    display: flex; justify-content: center;
    text-decoration: none; border-radius: 8px;
    transition: opacity 0.2s;
}
.pub-mobile-apple-store:hover { opacity: 0.85; }
.pub-mobile-apple-store .pub-apple-store-img {
    height: 44px; width: auto; max-width: 144px;
}

/* ===== FOOTER ===== */
.pub-footer { background: #111827; color: #d1d5db; padding: 3rem 0 1.5rem; }
.pub-footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 1.25rem;
}
.pub-footer-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 2rem; padding-bottom: 2rem;
    border-bottom: 1px solid #374151;
}
.pub-footer-brand .pub-logo { color: #fff; font-size: 1.25rem; }
.pub-footer-brand .pub-logo:hover { color: #93c5fd; }
.pub-footer-brand p {
    font-size: 0.85rem; color: #9ca3af; margin-top: 0.6rem;
    max-width: 240px; line-height: 1.65;
}
.pub-footer-links-group { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.pub-footer-col h3 {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: #e5e7eb; margin-bottom: 0.85rem;
}
.pub-footer-col ul { list-style: none; }
.pub-footer-col ul li { margin-bottom: 0.45rem; }
.pub-footer-col ul li a {
    font-size: 0.88rem; color: #9ca3af;
    text-decoration: none; transition: color 0.2s;
}
.pub-footer-col ul li a:hover { color: #fff; }
.pub-footer-bottom {
    padding-top: 1.5rem; text-align: center;
    font-size: 0.8rem; color: #9ca3af;
}
.pub-footer-bottom a {
    color: #9ca3af; text-decoration: underline; transition: color 0.2s;
}
.pub-footer-bottom a:hover { color: #fff; }

/* ===== FOOTER SOCIAL LINKS ===== */
.pub-footer-social {
    display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem;
}
.pub-social-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: #9ca3af;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.pub-social-link:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
    transform: translateY(-2px);
}
.pub-social-icon {
    width: 16px; height: 16px; display: block;
    transition: filter 0.2s;
}
.pub-social-link:hover .pub-social-icon {
    filter: brightness(0) invert(1);
}

/* ===== BOOKING MODAL ===== */
.booking-modal-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0, 0, 0, 0.6);
    align-items: center; justify-content: center;
    padding: 1rem;
}
.booking-modal-content {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    display: flex; flex-direction: column;
    width: 100%; max-width: 720px;
    height: 80vh; max-height: 700px;
    overflow: hidden;
}
.booking-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.booking-modal-title { font-size: 1rem; font-weight: 700; color: #111827; }
.booking-modal-close {
    background: #f3f4f6; border: none; border-radius: 8px;
    width: 32px; height: 32px; font-size: 1rem; cursor: pointer;
    color: #6b7280; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.booking-modal-close:hover { background: #e5e7eb; color: #111827; }
.booking-modal-frame { flex: 1; border: none; width: 100%; min-height: 0; }

@media (max-width: 768px) {
    .booking-modal-content { height: 90vh; max-height: none; border-radius: 10px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .pub-nav-links { display: none; }
    .pub-nav-cta { display: none; }
    .pub-hamburger { display: flex; }
    .pub-footer-top { flex-direction: column; }
    .pub-footer-links-group { gap: 1.5rem; }
}
@media (max-width: 480px) {
    .pub-footer-links-group { flex-direction: column; gap: 1.25rem; }
}
