/* ==========================================================================
   1. GLOBAL STYLES & RESET
   ========================================================================== */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  background:#0f0f0f;
  color:white;
  font-family:'Poppins', sans-serif;
}

span{
  color:#ff3b30;
}

/* ==========================================================================
   2. NAVBAR & HEADER
   ========================================================================== */
header{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:5px 5%;
  background:rgba(0,0,0,0.55);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  z-index:1000;
}

.logo img{
  height:100px;
  width:auto;
  display:block;
}

nav a{
  color:white;
  text-decoration:none;
  margin-left:25px;
  transition:0.3s;
}

nav a:hover{
  color:#bdbdbd;
}

/* ==========================================================================
   3. HERO SECTION & BUTTONS
   ========================================================================== */
.hero{
  padding-top:100px;
  height:90vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:20px;
  background-image:url('images/hero.jpg');
  background-size:cover;
  background-position:center;
  position:relative;
}

.hero::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:linear-gradient(
    to bottom,
    rgba(0,0,0,0.65),
    rgba(0,0,0,0.45)
  );
  z-index:1;
}

.hero::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:200px;
  background:linear-gradient(
    to bottom,
    transparent,
    #111
  );
  z-index:1;
  pointer-events:none;
}

.hero h1{
  font-size: 46px;             
  font-weight: 600;            
  max-width: 900px;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
  line-height: 1.25;           
  letter-spacing: -0.015em;    
}

.hero p{
  font-size: 18px;             
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero-buttons{
  display:flex;
  gap:20px;
  flex-wrap:wrap;
  justify-content:center;
  position:relative;
  z-index:2;
}

button, .hero-buttons a {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.primary-btn {
  background: rgba(26, 115, 232, 0.25);
  color: white;
  border: 1px solid rgba(26, 115, 232, 0.4);
}

.primary-btn:hover {
  background: rgba(26, 115, 232, 0.4);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 30px rgba(26, 115, 232, 0.3);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.1);
}

form button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
}

form button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   4. SERVICES GRID SECTION
   ========================================================================== */
.services{
  padding:140px 10%;
  background:linear-gradient(to bottom, #111, #0b0b0b);
  border-top:1px solid rgba(255,255,255,0.05);
}

.services h2{
  text-align:center;
  font-size:50px;
  margin-bottom:70px;
}

.service-container{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card{
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 45px 35px;
  border-radius: 22px;
  width: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.card i {
  font-size: 35px;
  margin-bottom: 20px;
  color: #ff3b30;
}

.card img {
  opacity: 0.6; 
  transition: opacity 0.3s ease; 
}

.card:hover img {
  opacity: 1.0;
}

.card:hover{
  transform:translateY(-12px);
  background:rgba(255,255,255,0.08);
  border-color:rgba(255,255,255,0.18);
  box-shadow:0 15px 40px rgba(0,0,0,0.45);
}

.card h3{
  font-size:28px;
  font-weight:600;
  line-height:1.2;
  margin-bottom:15px;
  letter-spacing:-1px;
}

.card p{
  font-size:17px;
  line-height:1.8;
  color:#f5f5f7;
}

/* ==========================================================================
   5. WHY CHOOSE US
   ========================================================================== */
.why-us{
  padding:140px 10%;
  background:#0f0f0f;
  border-top:1px solid rgba(255,255,255,0.05);
}

.why-us h2{
  text-align:center;
  font-size:50px;
  margin-bottom:70px;
}

.why-container{
  display:flex;
  justify-content:center;
  gap:30px;
  flex-wrap:wrap;
}

.why-box{
  width:320px;
  padding:40px;
  background:#181818;
  border-radius:20px;
  transition:0.3s;
  border:1px solid rgba(255,255,255,0.05);
}

.why-box:hover{
  transform:translateY(-10px);
  border-color:rgba(255,255,255,0.2);
  box-shadow:0 15px 40px rgba(0,0,0,0.4);
}

.why-box h3{
  font-size:28px;
  margin-bottom:20px;
}

.why-box p{
  color:#bdbdbd;
  line-height:1.7;
}

/* ==========================================================================
   6. CONTACT SECTION & INFOBAR
   ========================================================================== */
.contact{
  padding:70px 10%;
  background:#111;
  text-align:center;
  border-top:1px solid rgba(255,255,255,0.05);
}

.contact h2{
  font-size:50px;
  margin-bottom:20px;
}

.contact p{
  color:#bdbdbd;
  margin-bottom:30px;
}

.contact-info{
  margin-bottom:50px;
}

.contact-info p{
  color:#d0d0d0;
  margin-bottom:15px;
  font-size:18px;
}

.contact-info i{
  color:#ff3b30;
  margin-right:10px;
}

.call-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-bottom:50px;
  padding:15px 35px;
  border-radius:12px;
  background:linear-gradient(135deg, #1db954, #25d366);
  color:white;
  text-decoration:none;
  font-weight:600;
  transition:all 0.3s ease;
}

.call-button:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 30px rgba(37,211,102,0.35);
}

form{
  max-width:700px;
  margin:auto;
  display:flex;
  flex-direction:column;
  gap:20px;
}

input, textarea{
  padding:18px;
  border:none;
  border-radius:12px;
  background:#1b1b1b;
  color:white;
  font-size:16px;
}

textarea{
  min-height:160px;
  resize:none;
}

form button{
  width:220px;
  margin:auto;
}

/* ==========================================================================
   7. FLOATING WHATSAPP BUTTON
   ========================================================================== */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366; 
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  z-index: 9999; 
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s ease;
}

.whatsapp-button:hover {
  transform: scale(1.05);
  background-color: #128C7E;
}

/* ==========================================================================
   8. INDIVIDUAL SUB-SERVICES PAGES STYLE
   ========================================================================== */
.service-page{
    min-height:100vh;
    padding:120px 10%;
}

.service-page h1{
    font-size:60px;
    margin-bottom:25px;
}

.service-content{
    max-width:900px;
    margin:auto;
    padding:50px;
    border-radius:20px;
    background:rgba(255,255,255,0.05);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    border:1px solid rgba(255,255,255,0.08);
}

.service-content h2{
    margin-top:40px;
    margin-bottom:20px;
}

.service-content ul{
    padding-left:25px;
}

.service-content li{
    margin-bottom:15px;
}

.price{
    font-size:32px;
    font-weight:700;
    color:#ff3b30;
    margin-top:20px;
}

.service-btn{
    display:inline-block;
    margin-top:30px;
    padding:15px 35px;
    border-radius:12px;
    text-decoration:none;
    color:white;
    font-size:18px;
    font-weight:600;
    border:1px solid rgba(255,255,255,0.15);
    background:rgba(255,255,255,0.08);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    transition:0.3s ease;
}

.service-btn:hover{
    transform:translateY(-4px) scale(1.03);
    background:rgba(255,255,255,0.15);
    box-shadow:0 10px 30px rgba(255,255,255,0.2);
}

.service-hero{
    min-height: 50vh; 
    position:relative;
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:160px 10% 60px; 
}

.service-hero::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    height:150px;
    background:linear-gradient(to bottom, transparent, #0f0f0f);
    z-index: 2;
}

.service-overlay {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.service-hero h1{
  font-size: 42px; 
  font-weight:600;
  line-height:1.25;
  letter-spacing:-1px;
  margin-bottom:20px;
}

.service-hero .service-intro{
    font-size:18px;
    color:#e0e0e0;
    line-height:1.7;
    margin-bottom:40px;
    max-width:750px;
    margin-left:auto;
    margin-right:auto;
}

.certified-hero { background-image: url('images/certified-preowned-bg.jpg'); }
.concierge-hero { background-image: url('images/service-concierge-bg.jpg'); }
.usedcar-hero { background-image: url('images/usedcar-bg.jpg'); }
.advisory-hero { background-image: url('images/service-advisory-bg.jpg'); }
.pdi-hero { background-image: url('images/pdi-bg.jpg'); }
.selection-hero { background-image: url('images/vehicle-selection-bg.jpg'); }

.selection-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45); 
    z-index: 1;
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
footer{
  margin-top:120px;
  padding:80px 10% 50px;
  text-align:center;
  background:#050505;
  border-top:1px solid rgba(255,255,255,0.06);
}

footer h2{
  font-size:42px;
  margin-bottom:15px;
}

.footer-logo{
  height:70px;
  width:auto;
  margin-bottom:15px;
}

.footer-tagline{
  color:#d0d0d0;
  margin-bottom:30px;
  font-size:18px;
}

.footer-disclaimer{
  max-width:900px;
  margin:0 auto 35px;
  color:#8f8f8f;
  line-height:1.8;
  font-size:15px;
}

.copyright{
  color:#666;
  font-size:14px;
  margin-top:25px;
}

/* ==========================================================================
   10. SCROLL ANIMATIONS
   ========================================================================== */
.services, .why-us, .contact{
  animation:fadeUp 1s ease;
}

@keyframes fadeUp{
  from{
    opacity:0;
    transform:translateY(40px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* ==========================================================================
   11. GLOBAL INTERSTITIAL TERMS MODAL POP-UP (WITH ACCORDION-PROOF FIXES)
   ========================================================================== */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.modal-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #1c1c1e !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  width: 90% !important;
  max-width: 650px !important;
  height: 80vh !important; 
  max-height: 80vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 24px !important;
  flex-shrink: 0 !important; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.modal-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.modal-header p {
  font-size: 13px;
  color: #8f8f8f;
}

.modal-body-scroll {
  padding: 24px !important;
  overflow-y: scroll !important; 
  display: block !important;
  height: auto !important;
  flex-grow: 1;
}

.modal-body-scroll h3 {
  font-size: 16px !important;
  font-weight: 500;
  color: #ffffff !important;
  margin: 20px 0 8px 0 !important;
  border-left: 2px solid #ff3b30;
  padding-left: 8px;
}

.modal-body-scroll h3:first-of-type {
  margin-top: 0 !important;
}

.modal-body-scroll p {
  font-size: 14px !important;
  color: #d1d1d6 !important;
  line-height: 1.6 !important;
  margin-bottom: 12px !important;
  text-align: justify;
}

.modal-footer-agreement {
  padding: 24px !important;
  background: #121214 !important;
  flex-shrink: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 0 16px 16px;
}

.modal-checkbox-label {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  font-size: 14px;
  color: #ffffff;
  user-select: none;
  margin-bottom: 20px;
}

.modal-checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.modal-checkmark {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-checkbox-label input:checked ~ .modal-checkmark {
  background-color: #ff3b30;
  border-color: #ff3b30;
}

.modal-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.modal-checkbox-label input:checked ~ .modal-checkmark:after {
  display: block;
}

.modal-checkbox-label .modal-checkmark:after {
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.modal-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-cancel-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8f8f8f;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s ease;
}

.modal-cancel-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.modal-submit-btn {
  background: #ff3b30;
  border: 1px solid #ff3b30;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s ease;
}

.modal-submit-btn:hover {
  background: #e02e24;
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.4);
}

/* ==========================================================================
   12. UNIFIED MOBILE VIEWPORTS RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
  /* Header matches home page profile */
  header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 16px !important;
    height: 64px !important; 
    box-sizing: border-box !important;
  }
  
  header .logo {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
  }

  header .logo img {
    width: 115px !important; 
    height: auto !important;
    display: block !important;
  }

  header nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  header nav a {
    font-size: 13px !important;
    margin-left: 10px !important;
    margin-right: 0 !important;
    white-space: nowrap !important; 
  }

  /* FIXED: HOMEPAGE HERO ISOLATED SO IT DOES NOT COLLAPSE */
  .hero {
    padding-top: 130px !important; 
    padding-bottom: 60px !important;
    height: auto !important;
    min-height: 80vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .hero h1 {
    font-size: 32px !important; 
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
    margin-top: 0 !important;
  }
  
  .hero p {
    font-size: 15px !important;
    margin-bottom: 30px !important;
  }

  /* SUB-PAGES HERO ISOLATED - Clean clearance under slim header */
  .service-hero, 
  .selection-hero,
  .concierge-hero, 
  .advisory-hero, 
  .pdi-hero, 
  .usedcar-hero,
  .certified-hero {
    padding-top: 0 !important; 
    padding-bottom: 0 !important;
    height: auto !important; 
    min-height: 340px !important;
  }

  .service-overlay {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    padding-top: 95px !important; 
    padding-bottom: 35px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  .service-hero h1,
  .selection-hero h1,
  .concierge-hero h1,
  .advisory-hero h1,
  .pdi-hero h1,
  .usedcar-hero h1,
  .certified-hero h1 {
    font-size: 26px !important; 
    line-height: 1.3 !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    display: block !important;
  }

  .service-intro {
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 0 10px !important;
    margin-bottom: 20px !important;
  }

  /* Grids and general layouts */
  .services h2, .why-us h2, .contact h2 { font-size: 36px !important; }
  .card, .why-box { width: 100% !important; }
  .service-container, .why-container { flex-direction: column !important; align-items: center !important; }
  form button { width: 100% !important; }

  .service-page { padding: 30px 20px !important; }
  .service-content h2 { font-size: 20px !important; margin-top: 25px !important; }

  /* Lists formatting */
  .service-content ul, .service-page ul, section ul {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
    margin: 20px auto !important;
    max-width: 95%; 
  }

  .service-content li, .service-page li, section li, .service-content ul li {
    list-style-type: none !important;
    font-size: 15px !important; 
    line-height: 1.5 !important;
    margin-bottom: 18px !important;
    display: flex !important;
    align-items: flex-start !important; 
    text-align: left !important;
  }

  .service-content li i, .service-page li i, section li i {
    margin-top: 3px !important; 
    margin-right: 12px !important;
    font-size: 16px !important;
    flex-shrink: 0 !important; 
  }
}

/* ==========================================================================
   13. EXTRA SMALL MOBILE OVERRIDES (Modals)
   ========================================================================== */
@media (max-width: 480px) {
  .modal-card {
    width: 95% !important;
    max-height: 90vh !important;
  }

  .modal-header, 
  .modal-body-scroll, 
  .modal-footer-agreement {
    padding: 16px !important;
  }

  .modal-action-row {
    flex-direction: column-reverse;
    gap: 10px;
    width: 100%;
  }

  .modal-cancel-btn, 
  .modal-submit-btn {
    width: 100% !important;
    text-align: center;
    padding: 12px !important;
    font-size: 15px;
  }
}