/* Frontend Core Styles - Halesowen Aesthetic */
:root {
  --primary: #555555;
  --primary-hover: #444444;
  --bg-dark: #111111;
  --bg-darker: #0a0a0a;
  --bg-light: #f9f9f9;
  --text-main: #333333;
  --text-light: #f4f4f4;
  --border-color: #eaeaea;
}

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

body {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 400;
  color: var(--text-main);
  background: #ffffff;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

/* Cookie Banner */
#cookie-banner {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 10px 20px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#cookie-banner .btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 4px;
  margin-left: 10px;
  font-weight: 600;
}

#cookie-banner .btn.accept {
  background: var(--primary);
}

#cookie-banner .btn.accept:hover {
  background: var(--primary-hover);
}

/* Navbar */
.frontend-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 2%;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.4);
  color: #fff;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.frontend-nav.has-cookie {
  top: 44px;
}

/* Patched Logo Below Nav */
.header-logo-container {
  position: absolute;
  top: 90px;
  /* Just below the nav */
  left: 5%;
  transform: none;
  z-index: 999;
  text-align: left;
  pointer-events: none;
  /* Let clicks pass through around it */
}

.header-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
}

.nav-logo {
  height: 30px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.hero-logo-overlay {
  position: absolute;
  top: 6rem;
  left: 5%;
  z-index: 20;
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
  pointer-events: none;
  transition: all 0.3s ease;
}

.header-logo h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.header-logo span {
  color: var(--primary);
}

.header-logo img:not(.nav-logo) {
  max-height: 55px;
  width: auto;
}

@media (max-width: 768px) {
  .hero-logo-overlay {
    display: none !important;
  }
  .header-logo h1 {
    font-size: 1.1rem !important;
  }
  .nav-logo {
    height: 25px;
  }
}
  transition: transform 0.3s ease;
}

.header-logo:hover img {
  transform: scale(1.05);
}

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

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.5rem 0;
  position: relative;
}

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

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

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

/* Partners Section */
.partners-section {
  padding: 3rem 5%;
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.partners-section h3 {
  margin-bottom: 2rem;
  font-size: 1.25rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.partners-slider {
  display: flex;
  gap: 3rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.partners-slider img {
  max-height: 60px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s;
}

.partners-slider img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* Footer */
.frontend-footer {
  background: var(--bg-darker);
  color: var(--text-light);
  padding: 4rem 5% 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul a {
  color: #bbb;
  font-size: 0.95rem;
}

.footer-col ul a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.85rem;
  color: #777;
}

/* Call to Action Buttons */
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.2s;
  font-family: 'Roboto Condensed', sans-serif;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

/* Page Header (for inner pages) */
.page-header {
  background: url('../images/banner4.jpg') no-repeat center center/cover;
  color: #fff;
  padding: 8rem 5% 4rem;
  text-align: center;
  margin-bottom: 3rem;
  border-bottom: 2px solid var(--primary);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.6);
}

.page-header p {
  color: #bbb;
  font-size: 1.1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.6);
}

/* Content Section Layout */
.content-section {
  padding: 4rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Slider Animations - handled by JS in index.html */

/* CTA Info Tiles */
.cta-tile {
  padding: 5rem 2rem;
  text-align: center;
  border-right: 1px solid #222;
  position: relative;
  background-size: cover;
  background-position: center;
}

.cta-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  /* Dark overlay */
  transition: background 0.3s;
  z-index: 1;
}

.cta-tile:hover::before {
  background: rgba(80, 80, 80, 0.85);
  /* Grayscale overlay on hover */
}

.cta-tile-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.cta-tile-content h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.cta-tile-content p {
  margin-bottom: 1.5rem;
  color: #eee;
  font-size: 1.05rem;
}

.cta-tile-content a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

/* === NEW FOOTER STYLES === */
.main-footer {
  background-color: #1a1a1a;
  color: #a0a0a0;
  font-family: 'Roboto Condensed', sans-serif;
  padding: 2rem 2% 1rem 2%;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid #333;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.footer-col h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #333;
}

/* Column 1: Contact Icons */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.footer-contact-item svg {
  margin-top: 0.2rem;
  color: #fff;
}

/* Column 2: Hours Table */
.footer-hours-row {
  display: flex;
  justify-content: space-between;
  padding: 0.09rem 0;
  border-bottom: 1px solid #2a2a2a;
  align-items: center;
}

.footer-hours-row:last-of-type {
  border-bottom: none;
}

.footer-hours-row .day-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-hours-row svg {
  color: #555;
  width: 16px;
  height: 16px;
}

.footer-hours-text {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #777;
  line-height: 1.5;
}

/* Column 3: Quick Links */
.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-link-list li {
  border-bottom: 1px solid #2a2a2a;
}

.footer-link-list li:last-child {
  border-bottom: none;
}

.footer-link-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #a0a0a0;
  text-decoration: none;
  padding: 0.09rem 0;
  transition: color 0.2s;
}

.footer-link-list a:hover {
  color: #fff;
}

.footer-link-list a::before {
  content: '>';
  font-family: monospace;
  font-weight: bold;
  font-size: 0.8rem;
  color: #fff;
}

/* Bottom Company Info */
.footer-company-info {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-company-info h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.footer-company-meta {
  border-bottom: 1px solid #333;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #888;
}

.footer-company-meta span {
  color: #a0a0a0;
}

.footer-company-meta .separator {
  margin: 0 0.8rem;
  color: #444;
}

.footer-company-disclosure {
  font-size: 0.75rem;
  color: #777;
  line-height: 1.8;
  white-space: pre-wrap;
  /* honors line breaks from textarea */
}

/* Footer Bottom Layout */
.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* === NEW UI MODULES === */

/* SEO Links Box (Just above footer) */
.seo-links-container {
  background: var(--bg-dark);
  padding: 1.5rem 2%;
  border-top: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  text-align: center;
}

.seo-links-container .seo-heading {
  color: #fff;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  font-family: 'Roboto Condensed', sans-serif;
}

.seo-links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.seo-links-grid a {
  display: block;
  break-inside: avoid;
  background: transparent;
  color: #999;
  padding: 0.08rem 0;
  font-size: 0.82rem;
  transition: color 0.2s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Roboto Condensed', sans-serif;
}

.seo-links-grid a::before {
  content: '› ';
  color: var(--primary);
  font-weight: bold;
}

.seo-links-grid a:hover {
  color: #fff;
}

/* Attention Grabber Stripe (For Vehicle Cards) */
.attention-stripe-container {
  position: absolute;
  top: 30px;
  left: -85px;
  width: 250px;
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 0;
  transform: rotate(-45deg);
  z-index: 10;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Top Horizontal Filter Bar (For Showroom) */
.top-filter-bar {
  background: #fff;
  padding: 1.5rem 5%;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid #eaeaea;
}

.top-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  max-width: 1400px;
  margin: 0 auto;
}

.top-filter-group {
  flex: 1;
  min-width: 160px;
}

.top-filter-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #555;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.top-filter-group select,
.top-filter-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fdfdfd;
  font-family: inherit;
  color: #333;
}

/* WhatsApp Floating Button */
@keyframes whatsappBreathe {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(85, 85, 85, 0.7);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(85, 85, 85, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(85, 85, 85, 0);
  }
}

@keyframes fadeInDelay {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  /* Starts hidden for the delay */
  animation: fadeInDelay 0.5s ease 3s forwards, whatsappBreathe 2s infinite ease-in-out 3.5s;
}

.whatsapp-float:hover {
  background-color: #128C7E;
  color: #fff;
}

/* === MOBILE RESPONSIVENESS (Huawei P30 Pro & General Mobile) === */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.mobile-nav-phone {
  display: none;
}

@media (max-width: 768px) {

  /* Global Padding Adjustments */
  section {
    padding: 1rem 2% !important;
  }

  /* Typography Scaling */
  h1 {
    font-size: 2.2rem !important;
  }

  h2 {
    font-size: 1.8rem !important;
  }

  /* Navbar & Hamburger */
  .mobile-menu-toggle {
    display: block;
    z-index: 1001;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
  }

  .mobile-nav-phone {
    display: flex;
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    text-decoration: none;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 1001;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(17, 17, 17, 0.98);
    flex-direction: column;
    padding: 1.5rem 5%;
    gap: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border-top: 1px solid #333;
  }

  .nav-menu.active {
    display: flex;
  }

  /* Hero Section */
  .page-header {
    min-height: 40vh !important;
    padding: 4rem 5% !important;
  }

  /* Grids & Cards */
  .features-grid,
  .cta-tiles,
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .seo-links-grid {
    column-count: 2 !important;
  }

  .footer-col {
    padding-right: 0 !important;
    margin-bottom: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .footer-bottom>div {
    justify-content: center;
  }

  /* Showroom Filters */
  .top-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .top-filter-group {
    width: 100%;
  }

  .top-filter-group[style*="justify-content: flex-end"] {
    justify-content: stretch !important;
  }

  /* Vehicle Detail 2-Column Section Override */
  .content-section[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Forms & Sub-Grids (Sell My Car / Contact) */
  div[style*="display:grid; grid-template-columns:1fr 1fr;"],
  div[style*="display:grid; grid-template-columns:repeat(auto-fit, minmax(400px, 1fr));"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  form[action] div[style*="background:var(--bg-light)"],
  section.content-section div[style*="background:var(--bg-light)"] {
    padding: 1.5rem !important;
  }

  /* We Buy Cars Banner */
  div[style*="padding: 6rem 3rem;"] {
    padding: 2rem 1rem !important;
  }

  div[style*="backdrop-filter: blur(8px)"] {
    padding: 1rem !important;
  }

  /* Featured Vehicles Image Height (reduced by 15%) */
  a[style*="height:220px;"] {
    height: 185px !important;
  }

  /* WhatsApp Button */
  .whatsapp-float {
    bottom: 20px;
    left: 20px;
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

/* SEO links: 3 cols on tablet */
@media (max-width: 1024px) {
  .seo-links-grid {
    column-count: 3;
  }
}

/* SEO links: 1 col on small phones */
@media (max-width: 480px) {
  .seo-links-grid {
    column-count: 2 !important;
  }

  .seo-links-container {
    padding: 1rem 5%;
  }
}