/* ============================================
   PGH GROUP — SHARED STYLESHEET
   Red & Charcoal Corporate Theme
============================================ */

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

:root {
  --red: #c0392b;
  --red-dark: #96281b;
  --red-light: #fdf3f2;
  --charcoal: #1e1e1e;
  --charcoal-2: #2c2c2c;
  --charcoal-3: #3a3a3a;
  --white: #ffffff;
  --off-white: #f8f7f5;
  --light: #f0ede8;
  --border: #e5e1db;
  --text-dark: #1a1816;
  --text-mid: #5a5550;
  --text-light: #9a9590;
  --font-sans: 'DM Sans', sans-serif;
  --font-serif: 'DM Serif Display', serif;
  --radius: 6px;
  --max: 1160px;
  --nav-h: 110px;
}

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--white);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.2rem; font-family: var(--font-sans); font-weight: 500; }
p { color: var(--text-mid); line-height: 1.75; }

.label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 12px;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section--gray { background: var(--off-white); }
.section--dark { background: var(--charcoal); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: rgba(255,255,255,0.55); }
.section--dark .label { color: #e87060; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font-sans);
  text-decoration: none;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline-light { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.4); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-outline-dark { background: transparent; color: var(--text-dark); border: 1.5px solid var(--border); }
.btn-outline-dark:hover { border-color: var(--text-dark); }

/* ============================================
   NAV
============================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(30,30,30,0.97);
  backdrop-filter: blur(16px);
  z-index: 200;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img { height: 100px; width: auto; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  padding: 8px 14px;
  border-radius: 4px;
  transition: all 0.18s;
}

.nav-links a:hover, .nav-links a.active { color: var(--white); background: rgba(255,255,255,0.08); }

.nav-cta {
  background: var(--red) !important;
  color: var(--white) !important;
  padding: 9px 20px !important;
  border-radius: var(--radius) !important;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--red-dark) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span { display: block; width: 22px; height: 1.5px; background: white; transition: all 0.3s; }

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--charcoal);
  padding: 20px 28px;
  z-index: 199;
  flex-direction: column;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 0.2s;
}
.mobile-nav a:hover { color: white; }

/* ============================================
   PAGE HERO (inner pages)
============================================ */
.page-hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 72px;
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192,57,43,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero .label { color: #e87060; }
.page-hero h1 { color: var(--white); margin-top: 8px; }
.page-hero p { color: rgba(255,255,255,0.55); margin-top: 16px; max-width: 560px; }

.breadcrumb {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 20px;
}
.breadcrumb a { color: rgba(255,255,255,0.5); }
.breadcrumb a:hover { color: white; }
.breadcrumb span { color: rgba(255,255,255,0.25); margin: 0 8px; }

/* ============================================
   FOOTER
============================================ */
footer {
  background: #141414;
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo img { height: 80px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.38); line-height: 1.7; max-width: 260px; }
.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
  font-family: var(--font-sans);
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-bottom p { font-size: 0.77rem; color: rgba(255,255,255,0.25); margin: 0; }

/* ============================================
   CHATBOT
============================================ */
#chat-bubble {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 56px; height: 56px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(192,57,43,0.45);
  z-index: 998;
  transition: transform 0.2s;
}
#chat-bubble:hover { transform: scale(1.08); }
#chat-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: #22c55e;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  width: 17px; height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: badge-pulse 2s infinite;
}
@keyframes badge-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }

#chat-window {
  position: fixed;
  bottom: 168px;
  right: 28px;
  width: 350px;
  height: 480px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 16px 56px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  z-index: 997;
  overflow: hidden;
  border: 1px solid var(--border);
}
#chat-window.open { display: flex; }
#chat-header {
  background: var(--red);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  flex-shrink: 0;
}
#chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
#chat-header strong { display: block; font-size: 0.9rem; font-weight: 500; }
#chat-header span { font-size: 0.72rem; opacity: 0.75; }
#chat-close { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; padding: 4px; }
#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9f8f7;
}
.msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.55;
}
.bot-msg { background: white; border: 1px solid var(--border); color: var(--text-dark); align-self: flex-start; border-bottom-left-radius: 4px; }
.user-msg { background: var(--red); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.typing-msg { background: white; border: 1px solid var(--border); color: var(--text-light); font-style: italic; align-self: flex-start; border-bottom-left-radius: 4px; }
.quick-replies { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.quick-reply {
  font-size: 0.76rem;
  padding: 6px 12px;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 20px;
  cursor: pointer;
  background: white;
  transition: all 0.15s;
}
.quick-reply:hover { background: var(--red); color: white; }
#chat-input-area {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: white;
  flex-shrink: 0;
}
#chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  outline: none;
  color: var(--text-dark);
}
#chat-input:focus { border-color: var(--red); }
#chat-send {
  width: 38px; height: 38px;
  background: var(--red);
  border: none; border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
#chat-send:hover { opacity: 0.88; }
#chat-send:disabled { opacity: 0.45; cursor: not-allowed; }

/* WhatsApp */
#whatsapp-btn {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 999;
  transition: transform 0.2s;
}
#whatsapp-btn:hover { transform: scale(1.08); }
.whatsapp-tooltip {
  position: absolute;
  right: 66px;
  background: #1a1816;
  color: white;
  font-size: 0.76rem;
  padding: 6px 12px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  font-family: var(--font-sans);
}
#whatsapp-btn:hover .whatsapp-tooltip { opacity: 1; }

/* ============================================
   ANIMATIONS
============================================ */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  #chat-window { width: calc(100vw - 32px); right: 16px; }
  #chat-bubble, #whatsapp-btn { right: 16px; }
  #chat-bubble { bottom: 88px; }
}
