:root {
  --red-color: red;
  --dark-red: darkred;
  --menu-bg-gradient: linear-gradient(to top, #2a2d6e, #30348c);
  --menu-item-padding: 10px 15px;
  --menu-item-font-size: 1.2rem;
  --menu-item-hover-bg: rgba(255,255,255,0.08);
  --header-max-width: 1200px;
  --header-padding: 10px 20px;
  --logo-max-height: 75px;
  --logo-min-height: 45px;
  --logo-height-portrait: 55px;
  --phone-font-size: clamp(1.5rem, 3vw, 1.7rem);
  --footer-padding: 20px 10px;
  --footer-margin-top: 50px;
  --default-font-size: 1rem;
  --small-font-size: 0.9rem;
}

/* Base Styles */
body {
  font-family: 'Open Sans', Arial, sans-serif;
  background: linear-gradient(to top, #dedede, #dedede);
  color: #222;
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  padding: 0;
}

/* Menu Bar Styles */
.menu-bar {
  background: var(--menu-bg-gradient);
  color: white;
  padding: 10px 0;
  text-align: center;
  width: 100%;
  box-shadow: 0px 15px 15px rgba(0, 0, 0, 0.45);
}

.menu-bar .menu {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
}

.menu-bar .menu > li {
  position: relative;
}

.menu-bar .menu > li > a {
  color: white;
  font-size: var(--menu-item-font-size);
  font-weight: bold;
  padding: var(--menu-item-padding);
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent; 
  border-radius: 12px;
}

.menu-bar .menu > li > a:hover {
  background-color: var(--menu-item-hover-bg);
  border-radius: 9px;
  animation: pulse 3s ease-in-out infinite;
}

/* Dropdown Menu */
.menu-bar .menu > li > ul {
  background-color: #30348c;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  position: absolute;
  top: 100%;
  z-index: 1000;
}

.menu-bar .menu > li.active > ul {
  display: block;
}

.menu-bar .menu > li > ul > li > a {
  color: white;
  font-size: var(--small-font-size);
  padding: var(--menu-item-padding);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.menu-bar .menu > li > ul > li:nth-child(odd) > a {
  background: rgba(255, 255, 255, 0.05);
}

.menu-bar .menu > li > ul > li:nth-child(even) > a {
  background: rgba(255, 255, 255, 0.1);
}

.menu-bar .menu > li > ul > li > a:hover {
  background-color: var(--menu-item-hover-bg);
}

/* Active Menu Items */
.menu-bar .menu > li.current > a {
  border-radius: 15px;
  position: relative;
  z-index: 1;
}

.menu-bar .menu > li.current > a::after {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.01) 0%,
    rgba(255, 255, 255, 0.15) 85%
  );
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: -5px;
  bottom: -5px;
  z-index: -1;
}

.menu-bar .menu li.dropdown ul li.current > a {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.2) 1%,
    rgba(255, 255, 255, 0.3) 100%
  );
  border-radius: 0px;
}

.menu-bar .menu li.dropdown {
  border-radius: 20px;
}

/* Header Styles */
.sticky-header {
  background: #edebeb;
  color: #222;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1001;
}

.header-content {
  align-items: center;
  display: flex;
  justify-content: center;
  gap: 15px; 
  margin: 0 auto;
  max-width: var(--header-max-width);
  padding: var(--header-padding);
  width: 100%;
}

.logo img {
  display: block;
  height: 100px;
  max-height: var(--logo-max-height);
  box-shadow: 0 0px 22px rgba(0, 0, 0, 0.1);
}

/* Phone Styles */
.phone {
  align-items: center;
  color: var(--red-color);
  display: flex;
  flex-direction: column;
  font-size: var(--phone-font-size);
  font-weight: bold;
  transform: translateY(0);
  white-space: nowrap;
  line-height: 1;
}

.phone a,
.phone-link {
  color: var(--red-color);
  text-decoration: none;
  line-height: 1;
}

.phone a:hover,
.phone-link:hover,
.phone a:focus,
.phone-link:focus {
  outline: 2px solid var(--red-color);
  outline-offset: 2px;
  text-decoration: underline;
}

.phone-icon-header {
  height: 1em;
  margin-right: 5px;
  width: auto;
}

/* Animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.call-or-text {
  font-size: 1.3rem;
  color: #30348c;
  margin-top: 0.02rem;
  margin-left: 1.8rem;
  line-height: 1;
  animation: pulse 2s ease-in-out infinite;
}

.or-style {
  font-style: italic;
}

/* Address Styles */
.address-container {
  align-items: center;
  display: flex;
  justify-content: center;
  max-width: var(--header-max-width);
  margin: 0 auto;
  padding: 5px 0;
  text-align: center;
  width: 100%;
}

.address-container i {
  color: #30348c;
  font-size: 1.2rem;
  margin-right: 5px;
}

.address-container a {
  color: #30348c;
  font-size: var(--default-font-size);
  font-weight: bold;
  text-decoration: none;
}

.address-container img {
  height: 16px;
  margin-left: 5px;
  vertical-align: middle;
}

.address-container a:hover {
  text-decoration: underline;
}

.pin-icon-header-address {
  height: 2rem;
  width: auto;
}

/* Main Content */
.main-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  max-width: 100%;
  width: 100%;
}

/* Footer Styles */
.footer {
  background: linear-gradient(to top, #15174a, #30348c);
  color: white;
  font-size: var(--default-font-size);
  padding: var(--footer-padding);
  text-align: center;
  box-shadow: 0 0px 45px rgba(0, 0, 0, 0.5);
}

.footer a {
  color: white;
  text-decoration: underline;
}

.footer .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding-bottom: 5px;
}

.footer .footer-section {
  width: 100%;
  max-width: 1000px;
  padding-bottom: 10px;
}

.footer-section.contact-info p {
  margin-bottom: 5px;
  line-height: 1.5;
}

.footer-payments {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.footer .footer-section img {
  height: auto;
  margin: 0 5px;
  max-width: 30px;
}

.footer a,
.footer a:visited,
.footer a:hover,
.footer a:active {
  color: white !important;
  text-decoration: underline; 
}

/* Service Section Styles */
.service-section {
  max-width: 1000px; 
  margin: 40px auto;
  padding: 0 1rem;
}

.service-headline {
  font-size: 2.5rem;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(90deg, #8b0000, #bc0000, #8b0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 3px 3px 10px rgba(255, 0, 0, 0.2);
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.service-headline-divider {
  width: 90px;
  height: 4px;
  background: linear-gradient(to right, #bc0000, #8b0000);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
  margin: 10px auto 25px;
  border-radius: 2px;
}

.service-text {
  font-size: 1.25rem;
  color: #333;
  line-height: 1.6;
  text-align: left;
  margin-bottom: 1rem;
}

.service-subheadline {
  font-size: 1.75rem;
  font-weight: bold;
  background: linear-gradient(90deg, #8b0000, #bc0000, #8b0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 6px rgba(255, 0, 0, 0.2);
  letter-spacing: 1px;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.service-image {
  width: 100%;
  border-radius: 13px;
  box-shadow: 0px 5px 22px rgba(0, 0, 0, 0.6);
  margin-bottom: 1rem;
}

.bottom-images .service-image {
  max-height: 250px; 
  object-fit: cover;
}

/* CTA Section Styles */
.cta-section {
  margin: 40px auto;
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.cta-heading {
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  background: linear-gradient(90deg, #8b0000, #bc0000, #8b0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 3px 3px 10px rgba(255, 0, 0, 0.2);
  letter-spacing: 1.5px;
  margin-bottom: 15px;
}

.cta-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, #ff0000, #8b0000);
  box-shadow: 0px 0px 10px rgba(255, 0, 0, 0.3);
  margin: 10px auto 25px;
  border-radius: 2px;
}

.cta-text {
  font-size: 1.3rem;
  line-height: 1.5;
  color: #333;
  max-width: 800px;
  margin: 0 auto 30px;
}

.cta-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(90deg, #8b0000, #bc0000, #8b0000);
  color: #fff !important;
  text-transform: uppercase;
  font-weight: bold;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Service Areas Styles */
.service-areas {
  background: none;
  padding: 60px 20px;
  text-align: center;
}

.service-areas-heading {
  font-size: 2.5rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #8b0000, #bc0000, #8b0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 3px 3px 10px rgba(255, 0, 0, 0.2);
  letter-spacing: 2px;
}

.service-areas-subheading {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #333;
}

.service-areas-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 500px;
}

.service-areas-list li {
  background: #fff;
  border: 2px solid #8b0000;
  border-radius: 16px;
  padding: 10px 20px;
  font-size: 1.2rem;
  color: #8b0000;
  transition: background 0.3s, color 0.3s;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.55);
  cursor: default;
}

.service-areas-list li:hover {
  background: #8b0000;
  color: #fff;
}

/* Media Queries - Grouped and Optimized */
/* Touch Devices (General) */
@media (pointer: coarse) {
  .header-content {
    align-items: center;
  }
  
  .phone {
    font-size: 1.5rem;
    line-height: 1;
    transform: none;
  }
  
  .call-or-text {
    margin-top: 0 !important;
  }
  
  .address-container {
    margin-top: -10px;
    padding: 0 0 5px 0;
  }
}

/* Touch Devices - Landscape Orientation */
@media (pointer: coarse) and (orientation: landscape) {
  .header-content {
    justify-content: center;
    padding: var(--header-padding);
    gap: 25px;
  }
  
  .logo img {
    max-height: var(--logo-min-height);
  }
  
  .menu-bar {
    padding: 3.75px 0;
  }
  
  .menu-bar .menu > li > a {
    font-size: var(--small-font-size);
    padding: 7.5px 15px;
    border-radius: 12px;
  }
  
  .menu-bar .menu > li > ul {
    background-color: #30348c;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    left: 50%;
    max-height: 60vh;
    max-width: 90vw;
    min-width: 200px;
    overflow-y: auto;
    padding: 5px;
    position: absolute;
    top: 100%;
    transform: translateX(-50%);
    width: auto;
    z-index: 1000;
  }
  
  .menu-bar .menu > li > ul > li {
    width: 100%;
  }
  
  .menu-bar .menu > li > ul > li > a {
    display: block;
    font-size: var(--small-font-size);
    overflow: hidden;
    padding: 8px 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* Scrollbar Styling */
  .menu-bar .menu > li > ul::-webkit-scrollbar {
    width: 10px;
  }
  
  .menu-bar .menu > li > ul::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }
  
  .menu-bar .menu > li > ul::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
  }
  
  .menu-bar .menu > li > ul::-webkit-scrollbar-thumb:hover {
    background: #555;
  }
}

/* Touch Devices - Portrait Orientation */
@media (pointer: coarse) and (orientation: portrait) {
  .header-content {
    padding: var(--header-padding);
  }
  
  .logo img {
    max-height: var(--logo-height-portrait);
  }
  
  .phone {
    transform: none;
  }
  
  .footer {
    margin-top: auto;
    position: static;
  }
}

/* Desktop - Landscape */
@media (min-width: 1024px) and (orientation: landscape) {
  .header-content {
    justify-content: center;
    gap: 40px;
    padding: 10px;
  }
  
  .logo img {
    max-height: 90px;
  }
  
  .phone {
    font-size: 2rem;
    transform: translateY(10%);
    line-height: 1;
  }
  
  .menu-bar .menu > li > ul {
    left: 0;
    max-height: calc(100vh - 150px);
    min-width: 150px;
    overflow-y: auto;
  }
}

/* Enhanced iPhone-specific Fixes */
@media only screen and (max-width: 480px) {
  /* Reset problematic properties first */
  .orbit,
  .slideshow-orbit,
  .orbit-wrapper,
  .orbit-container,
  .orbit-slide,
  .orbit-figure,
  .slideshow-img,
  .orbit-image {
    min-height: unset;
    max-height: unset;
    transform: none;
    -webkit-transform: none;
  }
  
  /* Menu Bar Fixes */
  .menu-bar .menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 5px 0;
  }
  
  .menu-bar .menu > li {
    flex: 0 0 auto;
    margin: 2px;
  }
  
  .menu-bar .menu > li > a {
    font-size: 1.1rem;
    padding: 6px 10px;
    display: block;
    text-align: center;
  }
  
  /* Prevent horizontal overflow */
  body, html {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .grid-container, .main-content {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  /* Dropdown positioning */
  .menu-bar .menu > li > ul {
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    max-width: 90vw;
  }
  
  /* Completely reset slideshow styling */
  .orbit,
  .slideshow-orbit {
    display: block !important;
    width: 100% !important;
    height: 350px !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 0 0 16px 16px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.37) !important;
  }
  
  .orbit-wrapper,
  .orbit-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  .orbit-slide,
  .orbit-figure {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .slideshow-img,
  .orbit-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
  }
  
  /* Fix for slideshow text overlay */
  .slideshow-overlay {
    position: absolute !important;
    width: 90% !important;
    max-width: 90% !important;
    padding: 10px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    top: 10% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10 !important;
  }
  
  .slideshow-overlay h1 {
    font-size: 1.6rem !important;
    margin-bottom: 5px !important;
  }
  
  .slideshow-overlay p {
    font-size: 1rem !important;
    margin-top: 5px !important;
  }
  
  /* iOS-specific fixes */
  @supports (-webkit-touch-callout: none) {
    .orbit-container {
      -webkit-transform: translateZ(0) !important;
      transform: translateZ(0) !important;
      -webkit-backface-visibility: hidden !important;
      backface-visibility: hidden !important;
    }
    
    .slideshow-img,
    .orbit-image {
      transform: translateZ(0) !important;
      -webkit-transform: translateZ(0) !important;
    }
  }
}