/* ============================================================
   JC PAINTING & CONSTRUCTION – GLOBAL STYLESHEET
   ============================================================ */

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

:root {
  --dark:       #111111;
  --dark-mid:   #1e1e1e;
  --dark-light: #2d2d2d;
  --red:        #c0281f;
  --red-dark:   #9e1f17;
  --red-light:  #d93a30;
  --gray-bg:    #f4f5f7;
  --gray-mid:   #e2e5ea;
  --gray-text:  #5a6270;
  --white:      #ffffff;
  --font:       'Inter', sans-serif;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.14);
  --radius:     6px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ── PAGE TRANSITION ── */
.page-fade { animation: pageFadeIn 0.45s ease forwards; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SCROLL ANIMATIONS ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── PROGRESS BAR ── */
#progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--red); z-index: 9999; width: 0%; transition: width 0.1s linear; }

/* ── CONTAINER ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── TOP BAR ── */
.top-bar { background: var(--dark); color: #aaaaaa; font-size: 13px; padding: 8px 0; border-bottom: 2px solid var(--red); }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.top-bar a { color: #aaaaaa; transition: color var(--transition); }
.top-bar a:hover { color: var(--white); }
.top-bar-left { display: flex; gap: 20px; align-items: center; }
.top-bar-right { display: flex; gap: 20px; align-items: center; }

/* ── NAV ── */
nav { background: var(--white); border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 500; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition); }
nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.logo img { height: 58px; width: auto; display: block; transition: transform var(--transition); }
.logo img:hover { transform: scale(1.02); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-size: 22px; font-weight: 900; color: var(--dark); letter-spacing: -0.5px; }
.logo-name span { color: var(--red); }
.logo-sub { font-size: 11px; font-weight: 600; color: var(--gray-text); letter-spacing: 1.5px; text-transform: uppercase; }

.nav-links { display: flex; gap: 6px; list-style: none; align-items: center; }
.nav-links a { color: #333333; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: var(--radius); transition: color var(--transition), background var(--transition); position: relative; }
.nav-links a:hover { color: var(--red); background: rgba(192,40,31,0.06); }
.nav-links a.active { color: var(--red); }
.nav-links a.active::after { content: ''; position: absolute; bottom: -13px; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--red); border-radius: 2px 2px 0 0; }
.nav-cta { background: var(--red) !important; color: var(--white) !important; padding: 10px 22px !important; border-radius: var(--radius) !important; font-weight: 700 !important; transition: background var(--transition), transform var(--transition) !important; }
.nav-cta:hover { background: var(--red-dark) !important; transform: translateY(-1px) !important; }
.nav-cta.active::after { display: none; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; border-radius: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; background: var(--white); border-top: 1px solid var(--gray-mid); }
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 8px 24px 16px; }
.mobile-menu ul li { border-bottom: 1px solid var(--gray-mid); }
.mobile-menu ul li:last-child { border-bottom: none; }
.mobile-menu ul li a { display: block; padding: 13px 0; font-size: 15px; font-weight: 600; color: var(--dark); transition: color var(--transition); }
.mobile-menu ul li a.active, .mobile-menu ul li a:hover { color: var(--red); }

/* ── SECTIONS ── */
.section { padding: 80px 0; }
.section-alt { background: var(--gray-bg); }

.section-header { text-align: center; margin-bottom: 52px; }
.section-label { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.section-header h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; letter-spacing: -0.5px; color: var(--dark); line-height: 1.15; }
.section-header p { margin-top: 14px; font-size: 16px; color: var(--gray-text); max-width: 560px; margin-left: auto; margin-right: auto; }
.rule { width: 48px; height: 4px; background: var(--red); border-radius: 2px; margin: 16px auto 0; }

/* ── PAGE HERO ── */
.page-hero { background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 60%, var(--dark-light) 100%); padding: 60px 0 50px; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; top: 0; right: 0; width: 300px; height: 100%; background: linear-gradient(135deg, transparent 0%, rgba(192,40,31,0.08) 100%); }
.page-hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--red); }
.page-hero-accent { display: none; }
.page-hero-inner { position: relative; }
.page-hero-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 10px; }
.page-hero h1 { font-size: clamp(28px, 4.5vw, 48px); font-weight: 900; color: var(--white); letter-spacing: -0.8px; line-height: 1.1; margin-bottom: 14px; }
.page-hero p { font-size: 16px; color: #bbbbbb; max-width: 560px; line-height: 1.65; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 20px; }
.breadcrumb a { color: rgba(255,255,255,0.55); transition: color var(--transition); }
.breadcrumb a:hover { color: white; }
.breadcrumb span { color: rgba(255,255,255,0.3); }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: var(--radius); font-size: 15px; font-weight: 700; font-family: var(--font); cursor: pointer; border: none; transition: background var(--transition), transform var(--transition), box-shadow var(--transition); text-decoration: none; }
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: var(--white); box-shadow: 0 4px 14px rgba(192,40,31,0.3); }
.btn-red:hover { background: var(--red-dark); box-shadow: 0 6px 20px rgba(192,40,31,0.4); }
.btn-navy { background: var(--dark); color: var(--white); box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.btn-navy:hover { background: var(--dark-mid); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.35); }
.btn-outline-white:hover { border-color: white; background: rgba(255,255,255,0.08); }
.btn-outline-red { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn-outline-red:hover { background: var(--red); color: white; }
.btn-sms { background: #128C7E; color: var(--white); box-shadow: 0 4px 14px rgba(18,140,126,0.3); }
.btn-sms:hover { background: #0f7368; }
.btn-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; box-shadow: 0 4px 14px rgba(220,39,67,0.3); }
.btn-instagram:hover { opacity: 0.9; }

/* ── TRUST BAR ── */
.trust-bar { background: var(--white); border-top: 1px solid var(--gray-mid); border-bottom: 3px solid var(--red); padding: 18px 0; }
.trust-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.trust-pill { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--dark); }
.trust-pill-icon { width: 38px; height: 38px; background: var(--red); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trust-pill-icon svg { width: 18px; height: 18px; fill: white; }
.trust-pill-sub { font-size: 12px; color: var(--gray-text); font-weight: 400; }

/* ── CTA BANNER ── */
.cta-banner { background: var(--dark); padding: 64px 0; text-align: center; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--red); }
.cta-banner::after { content: ''; position: absolute; top: 0; right: 0; width: 400px; height: 100%; background: radial-gradient(ellipse at right, rgba(192,40,31,0.12) 0%, transparent 70%); pointer-events: none; }
.cta-banner h2 { font-size: clamp(24px, 3.5vw, 38px); font-weight: 900; color: white; letter-spacing: -0.5px; margin-bottom: 14px; }
.cta-banner p { font-size: 16px; color: #aaaaaa; max-width: 480px; margin: 0 auto 32px; line-height: 1.65; }
.cta-banner-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
footer { background: var(--dark); color: #aaaaaa; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 44px; }
.footer-logo img { height: 50px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: 13px; line-height: 1.75; color: #888888; margin-bottom: 18px; }
.footer-ig-btn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 4px; transition: opacity var(--transition); }
.footer-ig-btn:hover { opacity: 0.88; }
.footer-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--white); margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: 13px; color: #888888; transition: color var(--transition); }
.footer-col ul a:hover { color: white; }
.footer-phone-block { margin-bottom: 14px; }
.footer-phone { display: block; font-size: 16px; font-weight: 800; color: white; transition: color var(--transition); }
.footer-phone:hover { color: var(--red-light); }
.footer-phone-name { font-size: 12px; color: #555555; margin-top: 2px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 12px; color: #555555; }
.footer-bottom a { color: #555555; transition: color var(--transition); }
.footer-bottom a:hover { color: #aaaaaa; }

/* ── SMS CHAT WIDGET ── */
.sms-widget { position: fixed; right: 24px; bottom: 24px; z-index: 400; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.sms-panel { background: white; border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,0.18); width: 240px; overflow: hidden; transform: scale(0.85) translateY(10px); transform-origin: bottom right; opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; }
.sms-panel.open { opacity: 1; transform: scale(1) translateY(0); pointer-events: all; }
.sms-panel-header { background: var(--dark); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.sms-panel-header span { font-size: 13px; font-weight: 700; color: white; }
.sms-panel-close { background: none; border: none; color: rgba(255,255,255,0.6); font-size: 18px; cursor: pointer; line-height: 1; padding: 0; transition: color var(--transition); }
.sms-panel-close:hover { color: white; }
.sms-panel-body { padding: 14px; }
.sms-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--gray-bg); margin-bottom: 8px; transition: background var(--transition), transform var(--transition); text-decoration: none; }
.sms-option:last-child { margin-bottom: 0; }
.sms-option:hover { background: #e8edf5; transform: translateX(-2px); }
.sms-option-icon { width: 36px; height: 36px; background: #128C7E; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sms-option-icon svg { width: 16px; height: 16px; fill: white; }
.sms-option-name { font-size: 13px; font-weight: 700; color: var(--dark); line-height: 1.2; }
.sms-option-num { font-size: 11px; color: var(--gray-text); }
.sms-panel-note { font-size: 11px; color: var(--gray-text); text-align: center; padding: 10px 14px; border-top: 1px solid var(--gray-mid); }
.sms-toggle { width: 56px; height: 56px; background: #128C7E; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(18,140,126,0.4); transition: background var(--transition), transform var(--transition), box-shadow var(--transition); position: relative; }
.sms-toggle:hover { background: #0f7368; transform: scale(1.08); box-shadow: 0 6px 28px rgba(18,140,126,0.5); }
.sms-toggle svg { width: 24px; height: 24px; fill: white; transition: opacity 0.2s; }
.sms-toggle .icon-open { position: absolute; opacity: 1; }
.sms-toggle .icon-close { position: absolute; opacity: 0; }
.sms-toggle.open .icon-open { opacity: 0; }
.sms-toggle.open .icon-close { opacity: 1; }
.sms-pulse { position: absolute; top: -2px; right: -2px; width: 14px; height: 14px; background: var(--red); border-radius: 50%; border: 2px solid white; }
.sms-pulse::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--red); animation: pulse-ring 1.8s ease infinite; }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(2); opacity: 0; } }

/* ── STICKY MOBILE CALL ── */
.sticky-call { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 300; background: var(--red); color: white; text-align: center; padding: 16px; font-size: 16px; font-weight: 800; transition: background var(--transition); }
.sticky-call:hover { background: var(--red-dark); }

/* ── CARDS ── */
.card { background: white; border-radius: 8px; border: 1px solid var(--gray-mid); overflow: hidden; transition: box-shadow var(--transition), transform var(--transition); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* ── INSTAGRAM SECTION ── */
.instagram-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ig-thumb { position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 1; cursor: pointer; }
.ig-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ig-thumb:hover img { transform: scale(1.08); }
.ig-thumb-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(192,40,31,0.2)); opacity: 0; transition: opacity 0.3s; display: flex; align-items: center; justify-content: center; }
.ig-thumb:hover .ig-thumb-overlay { opacity: 1; }
.ig-icon { width: 36px; height: 36px; }
.ig-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.ig-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); padding: 3px; flex-shrink: 0; }
.ig-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid white; }
.ig-handle { font-size: 18px; font-weight: 800; color: var(--dark); }
.ig-handle span { font-size: 13px; font-weight: 500; color: var(--gray-text); display: block; margin-top: 2px; }

/* ── GALLERY MASONRY ── */
.gallery-masonry { columns: 3; column-gap: 14px; }
.gallery-card { break-inside: avoid; margin-bottom: 14px; border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; display: block; }
.gallery-card img { width: 100%; display: block; transition: transform 0.45s ease; }
.gallery-card:hover img { transform: scale(1.04); }
.gallery-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%); opacity: 0; transition: opacity 0.3s; display: flex; align-items: flex-end; padding: 16px; }
.gallery-card:hover .gallery-card-overlay { opacity: 1; }
.gallery-card-label { font-size: 13px; font-weight: 700; color: white; }

/* FILTER TABS */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.filter-btn { padding: 9px 22px; border-radius: 40px; border: 2px solid #e2e5ea; background: white; font-size: 13px; font-weight: 700; color: #5a6270; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.filter-btn:hover { border-color: var(--red); color: var(--red); }
.filter-btn.active { background: var(--red); border-color: var(--red); color: white; }

/* LIGHTBOX */
#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
#lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
#lightboxImg { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 6px; display: block; }
#lightboxCaption { color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 500; text-align: center; }
#lightboxClose { position: fixed; top: 20px; right: 24px; background: rgba(255,255,255,0.1); border: none; color: white; font-size: 28px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; line-height: 1; }
#lightboxClose:hover { background: rgba(255,255,255,0.2); }
#lightboxPrev, #lightboxNext { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: white; font-size: 24px; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
#lightboxPrev { left: 16px; }
#lightboxNext { right: 16px; }
#lightboxPrev:hover, #lightboxNext:hover { background: rgba(255,255,255,0.2); }

/* ── GBP STRIP ── */
.gbp-strip { background: #4285F4; padding: 20px 0; }
.gbp-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.gbp-strip-text { display: flex; align-items: center; gap: 14px; color: white; font-weight: 600; font-size: 14px; }
.gbp-btn { background: white; color: #4285F4; font-size: 13px; font-weight: 800; padding: 10px 22px; border-radius: 4px; white-space: nowrap; transition: background var(--transition); }
.gbp-btn:hover { background: #f0f4ff; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .instagram-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .top-bar { display: none; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .trust-bar-inner { justify-content: center; }
  .sticky-call { display: block; }
  body { padding-bottom: 52px; }
  footer { padding-bottom: 68px; }
  .sms-widget { right: 16px; bottom: 70px; }
  .gallery-masonry { columns: 2; }
  .instagram-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .gallery-masonry { columns: 1; }
}
