/* ===== PHALTOM MOTORS ENHANCED RESPONSIVE STYLES ===== */
/* Complete CSS with mobile-first approach and fixed hamburger menu */

/* Global Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Source Sans Pro', sans-serif;
  background: #ffffff;
  color: #1e2a3e;
  line-height: 1.6;
  overflow-x: hidden;
}

:root {
  --phal-red: #d32f2f;
  --phal-blue: #1e88e5;
  --phal-dark-blue: #0b3b5f;
  --phal-black: #1a1a2e;
  --phal-gray: #f8fafe;
}

a {
  transition: all 0.3s ease;
  color: var(--phal-blue);
}

a:hover {
  color: var(--phal-red);
  text-decoration: none;
  cursor: pointer;
}

/* ========== TOP BAR - FULLY RESPONSIVE ========== */
.top-bar {
  background: var(--phal-dark-blue);
  color: #f0f0f0;
  font-size: 14px;
  padding: 8px 0;
  z-index: 1002;
  position: relative;
}

.top-bar a {
  color: #fff;
  margin: 0 6px;
  transition: 0.2s;
  display: inline-block;
}

.top-bar a:hover {
  color: var(--phal-red);
  cursor: pointer;
}

.top-bar .contact-info span,
.top-bar .contact-info a {
  cursor: pointer;
  transition: 0.2s;
}

/* Mobile Top Bar - Stack content */
@media (max-width: 767.98px) {
  .top-bar .row {
    flex-direction: column;
    text-align: center;
  }
  .top-bar .col-md-8,
  .top-bar .col-md-4 {
    text-align: center !important;
    width: 100%;
  }
  .top-bar .contact-info {
    margin-bottom: 8px;
    font-size: 12px;
  }
  .top-bar .contact-info span,
  .top-bar .contact-info a {
    display: inline-block;
    margin: 0 4px;
  }
  .top-bar .text-right {
    text-align: center !important;
  }
}

/* ========== NAVBAR - COMPLETE MOBILE REDESIGN ========== */
.navbar-phaltom {
  background: #ffffff;
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 2px solid var(--phal-red);
  transition: all 0.3s ease;
}

.navbar-phaltom .navbar-brand img {
  height: 50px;
  width: auto;
}

/* Custom Hamburger Button */
.navbar-phaltom .navbar-toggler {
  border: none;
  padding: 0.5rem;
  outline: none;
  background: transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.navbar-phaltom .navbar-toggler:focus {
  outline: none;
  box-shadow: none;
}

.navbar-phaltom .navbar-toggler-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  position: relative;
}

.navbar-phaltom .navbar-toggler-icon i {
  font-size: 1.6rem;
  color: var(--phal-black);
  line-height: 1;
}

/* Mobile Navigation Styles - COMPLETE OVERHAUL */
@media (max-width: 991.98px) {
  .navbar-phaltom {
    padding: 10px 0;
  }
  
  .navbar-phaltom .navbar-collapse {
    background: #ffffff;
    border-radius: 0 0 20px 20px;
    padding: 0;
    margin-top: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    border-top: 1px solid #eee;
  }
  
  .navbar-phaltom .navbar-nav {
    width: 100%;
    padding: 10px 0;
  }
  
  .navbar-phaltom .nav-item {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
  }
  
  .navbar-phaltom .nav-item:last-child {
    border-bottom: none;
  }
  
  .navbar-phaltom .nav-link {
    padding: 14px 20px !important;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--phal-black) !important;
    transition: all 0.2s ease;
  }
  
  .navbar-phaltom .nav-link:hover {
    background: #f8f9fa;
    color: var(--phal-red) !important;
  }
  
  /* Dropdown toggle styling for mobile */
  .navbar-phaltom .dropdown-toggle::after {
    float: right;
    margin-top: 8px;
    transition: transform 0.3s ease;
  }
  
  .navbar-phaltom .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
  }
  
  /* Dropdown menus on mobile - properly hidden/shown */
  .navbar-phaltom .dropdown-menu {
    position: static !important;
    float: none !important;
    width: 100%;
    background: #f8fafc;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    transition: none;
    border-top: 1px solid #e9ecef;
  }
  
  .navbar-phaltom .dropdown-menu.show {
    display: block;
    animation: slideDown 0.25s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .navbar-phaltom .dropdown-item {
    padding: 12px 20px 12px 40px;
    font-size: 14px;
    color: var(--phal-black);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
  }
  
  .navbar-phaltom .dropdown-item:hover {
    background: rgba(211, 47, 47, 0.08);
    color: var(--phal-red);
    border-left-color: var(--phal-red);
  }
  
  /* Active nav item styling */
  .navbar-phaltom .nav-item.active .nav-link {
    color: var(--phal-red) !important;
    background: rgba(211, 47, 47, 0.05);
  }
}

/* Desktop Dropdown Hover */
@media (min-width: 992px) {
  .navbar-phaltom .dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease-in-out;
    transform: translateY(10px);
  }
  
  .nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .dropdown-item:hover {
    background: var(--phal-red);
    color: white;
  }
}

/* ========== HERO CAROUSEL - RIGHT TO LEFT SCROLL ANIMATION ========== */
.hero-carousel-item {
  height: 85vh;
  min-height: 620px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero-carousel-item .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-content .btn-phaltom-red {
  animation: fadeInUp 0.8s ease 0.4s both;
}

/* Carousel Item Animation - Smooth transition */
.carousel-item {
  transition: transform 0.6s ease-in-out;
}

/* Zoom Animation for active slide */
.carousel-item.active .hero-carousel-item {
  animation: zoomInOut 10s infinite alternate ease-in-out;
}

@keyframes zoomInOut {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

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

/* Hero Responsive */
@media (max-width: 991.98px) {
  .hero-carousel-item {
    height: 70vh;
    min-height: 500px;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .hero-carousel-item {
    height: 60vh;
    min-height: 450px;
  }
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 0.9rem;
  }
  .btn-phaltom-red {
    padding: 10px 24px;
    font-size: 14px;
  }
}

/* ========== SEARCH CARD RESPONSIVE ========== */
.search-card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  margin-top: -70px;
  position: relative;
  z-index: 10;
}

@media (max-width: 991.98px) {
  .search-card {
    margin-top: -50px;
    padding: 1.5rem;
  }
  .search-card .row > div {
    margin-bottom: 12px;
  }
}

@media (max-width: 767.98px) {
  .search-card {
    margin-top: -40px;
    padding: 1.2rem;
  }
  .search-card h4 {
    font-size: 1.3rem;
  }
}

/* ========== CAR GRID RESPONSIVE ========== */
.car-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  height: 100%;
  border: 1px solid #eee;
  cursor: pointer;
}

.car-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.12);
}

.car-img {
  height: 230px;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.car-card:hover .car-img {
  transform: scale(1.02);
}

.car-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--phal-red);
  color: white;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: bold;
  z-index: 2;
}

.car-info {
  padding: 1.2rem;
}

.car-title {
  font-size: 1.3rem;
  font-weight: 800;
}

.car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  border-top: 1px solid #eef2f6;
  padding-top: 12px;
  margin: 12px 0;
}

.car-specs i {
  width: 18px;
  color: var(--phal-red);
}

.price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--phal-dark-blue);
}

/* Car Grid Responsive */
@media (max-width: 991.98px) {
  .car-card {
    margin-bottom: 25px;
  }
  .car-img {
    height: 200px;
  }
  .car-title {
    font-size: 1.2rem;
  }
  .price {
    font-size: 1.3rem;
  }
}

@media (max-width: 767.98px) {
  .car-card {
    margin-bottom: 20px;
  }
  .car-img {
    height: 180px;
  }
  .car-info {
    padding: 1rem;
  }
  .car-specs {
    gap: 6px;
    font-size: 11px;
  }
}

/* Grid Column Responsive */
@media (min-width: 992px) {
  .col-lg-9 .row > div {
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }
}

@media (max-width: 991.98px) and (min-width: 768px) {
  .col-lg-9 .row > div {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 767.98px) {
  .col-lg-9 .row > div {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ========== BUTTON STYLES ========== */
.btn-group-car {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-order-now {
  background: var(--phal-dark-blue);
  color: white;
  border-radius: 40px;
  padding: 8px 20px;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.btn-order-now:hover {
  background: var(--phal-blue);
  color: white;
  transform: translateY(-2px);
}

.btn-wa-icon {
  background: #25d366;
  color: white;
  border-radius: 40px;
  width: 40px;
  height: 40px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.btn-wa-icon:hover {
  transform: scale(1.05);
  color: white;
}

.btn-call-icon {
  background: #007bff;
  color: white;
  border-radius: 40px;
  width: 40px;
  height: 40px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.btn-call-icon:hover {
  transform: scale(1.05);
  color: white;
}

@media (max-width: 767.98px) {
  .btn-order-now {
    padding: 6px 14px;
    font-size: 12px;
  }
  .btn-wa-icon,
  .btn-call-icon {
    width: 34px;
    height: 34px;
  }
}

/* ========== BRAND FILTER SIDEBAR RESPONSIVE ========== */
.brand-filter-sidebar {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.brand-item {
  cursor: pointer;
  transition: 0.2s;
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 8px;
}

.brand-item:hover {
  background: #f0f0f0;
  transform: translateX(5px);
}

.brand-item.active {
  background: var(--phal-red);
  color: white;
}

.brand-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 5px;
}

@media (max-width: 991.98px) {
  .brand-filter-sidebar {
    margin-bottom: 25px;
  }
  .brand-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    min-width: 70px;
    margin: 5px;
    padding: 8px 12px;
  }
  .brand-item img {
    width: 30px;
    height: 30px;
  }
  .brand-name {
    font-size: 12px;
  }
  #brandFilterList {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }
}

/* ========== FIXED BACKGROUND SECTIONS ========== */
.fixed-bg-1 {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.pexels.com/photos/919073/pexels-photo-919073.jpeg?auto=compress&cs=tinysrgb&w=1600') fixed center/cover;
  padding: 80px 0;
  color: white;
  text-align: center;
}

@media (max-width: 767.98px) {
  .fixed-bg-1 {
    padding: 50px 0;
  }
  .fixed-bg-1 h2 {
    font-size: 1.8rem;
  }
  .fixed-bg-1 .lead {
    font-size: 1rem;
  }
}

/* ========== ANIMATED OFFER BANNER ========== */
.animated-offer {
  background: linear-gradient(135deg, #d32f2f, #ff6b6b);
  border-radius: 30px;
  padding: 40px;
  margin: 40px 0;
  color: white;
  transition: all 0.3s ease;
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(211, 47, 47, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
  }
}

.animated-offer h3 i {
  color: #ffaa33;
  animation: bounceIcon 1s ease infinite;
  display: inline-block;
}

@keyframes bounceIcon {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (max-width: 767.98px) {
  .animated-offer {
    padding: 25px;
    margin: 30px 0;
  }
  .animated-offer h3 {
    font-size: 1.3rem;
  }
  .animated-offer p {
    font-size: 0.9rem;
  }
}

/* ========== FOOTER - PROFESSIONAL & RESPONSIVE ========== */
.footer-phaltom {
  background: var(--phal-black);
  color: #ccc;
  padding: 60px 0 30px;
  position: relative;
  background-image: url('https://images.pexels.com/photos/116675/pexels-photo-116675.jpeg?auto=compress&cs=tinysrgb&w=600');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  background-color: rgba(0, 0, 0, 0.88);
}

.footer-phaltom h4 {
  color: white;
  font-weight: 700;
  margin-bottom: 25px;
  font-size: 1.2rem;
  letter-spacing: 1px;
  position: relative;
}

.footer-phaltom h4:after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--phal-red);
  margin-top: 10px;
}

.footer-phaltom a {
  color: #ddd;
  transition: 0.2s;
}

.footer-phaltom a:hover {
  color: var(--phal-red);
  transform: translateX(3px);
  display: inline-block;
}

.footer-phaltom .footer-logo img {
  height: 55px;
  margin-bottom: 15px;
  filter: brightness(1.1);
}

.footer-phaltom .social-icons a {
  background: rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 8px;
  transition: 0.2s;
}

.footer-phaltom .social-icons a:hover {
  background: var(--phal-red);
  transform: translateY(-3px);
}

.subscribe-group .input-group {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  overflow: hidden;
}

.subscribe-group .form-control {
  background: transparent;
  border: none;
  color: white;
  padding: 12px 20px;
}

.subscribe-group .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.subscribe-group .btn-subscribe {
  background: var(--phal-red);
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  color: white;
  font-weight: 600;
  transition: 0.2s;
}

.subscribe-group .btn-subscribe:hover {
  background: #b71c1c;
  transform: scale(1.02);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px;
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
}

/* Footer Responsive */
@media (max-width: 991.98px) {
  .footer-phaltom {
    padding: 50px 0 30px;
  }
  .footer-phaltom .col-md-6 {
    margin-bottom: 35px;
  }
  .footer-phaltom h4 {
    margin-bottom: 20px;
  }
  .subscribe-group .input-group {
    flex-direction: column;
    background: transparent;
  }
  .subscribe-group .form-control {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    margin-bottom: 10px;
  }
  .subscribe-group .btn-subscribe {
    width: 100%;
    border-radius: 50px;
  }
}

@media (max-width: 767.98px) {
  .footer-phaltom {
    padding: 40px 0 20px;
    text-align: center;
  }
  .footer-phaltom h4:after {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-phaltom .social-icons {
    justify-content: center;
  }
  .footer-phaltom .footer-logo img {
    margin: 0 auto 15px;
    display: block;
  }
  .footer-phaltom ul {
    text-align: center;
  }
  .footer-phaltom ul li a {
    display: inline-block;
  }
  .footer-phaltom .footer-bottom {
    font-size: 12px;
  }
}

/* ========== SCROLLING OFFER BANNER ========== */
.offer-scroll {
  background: #ff9800;
  color: #000;
  padding: 10px;
  overflow: hidden;
  white-space: nowrap;
  font-weight: bold;
  position: relative;
  z-index: 5;
}

.offer-scroll p {
  display: inline-block;
  animation: scrollText 18s linear infinite;
  margin: 0;
}

@keyframes scrollText {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

@media (max-width: 767.98px) {
  .offer-scroll {
    font-size: 12px;
    padding: 8px;
  }
  .offer-scroll p {
    animation: scrollText 12s linear infinite;
  }
}

/* ========== BUTTONS & GENERAL UTILITIES ========== */
.btn-phaltom-red {
  background: var(--phal-red);
  color: white;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 700;
  border: none;
  transition: 0.2s;
  display: inline-block;
}

.btn-phaltom-red:hover {
  background: #b71c1c;
  transform: translateY(-2px);
  color: white;
}

.btn-phaltom-blue {
  background: var(--phal-blue);
  color: white;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  display: inline-block;
}

.btn-phaltom-blue:hover {
  background: #0b5e8a;
  color: white;
  transform: translateY(-2px);
}

/* ========== MODAL RESPONSIVE ========== */
@media (max-width: 767.98px) {
  .swal2-popup {
    width: 95% !important;
    padding: 1rem !important;
  }
  .swal2-html-container {
    font-size: 14px;
  }
  .carousel-inner img {
    height: 250px !important;
  }
}

/* ========== MISC RESPONSIVE FIXES ========== */
@media (max-width: 991.98px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 575.98px) {
  .car-specs span {
    width: calc(50% - 8px);
  }
  .price {
    font-size: 1.2rem;
  }
  .car-title {
    font-size: 1.1rem;
  }
  .hero-content .btn-phaltom-red {
    padding: 8px 20px;
    font-size: 13px;
  }
  .search-card h4 {
    font-size: 1.1rem;
  }
}

/* ========== DROPDOWN TOGGLE ENHANCEMENT FOR MOBILE ========== */
@media (max-width: 991.98px) {
  /* Add click handler for dropdown toggles */
  .navbar-phaltom .dropdown-toggle {
    position: relative;
  }
  
  .navbar-phaltom .dropdown-toggle::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    border: none;
    margin-left: 8px;
    transition: transform 0.3s ease;
  }
  
  .navbar-phaltom .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
  }
}

/* ========== CAROUSEL CONTROL STYLES ========== */
.carousel-control-prev,
.carousel-control-next {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
  transition: 0.3s;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  background: var(--phal-red);
}

.carousel-control-prev {
  left: 20px;
}

.carousel-control-next {
  right: 20px;
}

@media (max-width: 767.98px) {
  .carousel-control-prev,
  .carousel-control-next {
    width: 30px;
    height: 30px;
  }
  .carousel-control-prev {
    left: 10px;
  }
  .carousel-control-next {
    right: 10px;
  }
}

/* ========== ANIMATION FOR PAGE LOAD ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: fadeIn 0.5s ease;
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--phal-red);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b71c1c;
}