/* === Red Barn Media Group - Combined Optimized Styles - DVO Heating & Air Conditioning === */

/* === CSS Custom Properties === */
:root {
  /* Colors */
  --color-white: #ffffff;
  --color-red: #d03638;
  --color-red-hover: #b22f30;
  --color-blue: #074a7f;
  --color-blue-hover: #0a5c9d;
  --color-deep-navy: #002f49;
  --color-extra-dark-blue: #001726;
  --color-gray: #c2c1c1;
  --color-gray-666: #666;
  --color-gradient-bg: linear-gradient(to top, #00416d 0%, #074a7f 100%);
  --color-gradient-bg-hero: linear-gradient(
    to right,
    rgba(0, 65, 109, 0.85) 0%,
    rgba(0, 23, 38, 0.85) 42%,
    rgba(208, 54, 56, 0.85) 100%
  );

  /* Typography */
  --font-barlow: barlow-semi-condensed, sans-serif;
  --font-source: source-sans-pro, sans-serif;

  /* Layout */
  --hero-height: 600px;
  --hero-padding: 3rem;
  --transition-standard: 0.25s;
  --border-radius-standard: 0.65rem;
  --border-radius-large: 1rem;
  --border-radius-card: 0.75rem;
  --border-radius-pill: 50rem;
  --box-shadow-dropdown: 0 3rem 3rem rgba(0, 0, 0, 0.175);
}

/* === Base Styles === */
html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-source);
  font-weight: 400;
}

/* === Typography === */
/* OPTIMIZED: Grouped all Barlow-based headings to set shared properties once. */
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6,
.barlow-black,
.barlow-bold,
.barlow-semibold,
.barlow-medium {
  font-family: var(--font-barlow);
  color: var(--color-deep-navy);
  text-transform: uppercase;
}

/* OPTIMIZED: Set only the unique font-weight for each level. */
h1,
.h1,
.barlow-black {
  font-weight: 900;
}
h2,
.h2,
h3,
.h3,
.barlow-bold {
  font-weight: 700;
}
h4,
.h4,
.barlow-semibold {
  font-weight: 600;
}
h5,
.h5,
h6,
.h6,
.barlow-medium {
  font-weight: 500;
}

.source {
  font-family: var(--font-source);
}
p,
ul li,
ol li,
table {
  font-size: 0.85rem;
  font-weight: 300;
}
.fs-8 {
  font-size: 0.65rem;
}

/* === Menu Styles === */
.menu-container {
  background: var(--color-white);
  margin-top: 0 !important; /* !important may be needed for specific overrides */
}

.menu-container.shrink-menu {
  border-bottom: 1px solid var(--color-white);
}

.navbar-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Navigation Links */
/* OPTIMIZED: Increased specificity with .menu-container to avoid !important. */
.menu-container .navbar-light .navbar-nav .nav-link {
  color: var(--color-white);
  font-family: var(--font-source);
  font-weight: 600;
  font-size: 0.9rem;
}

.menu-container .navbar-light .navbar-nav .nav-link.phone {
  color: #2b6dbc;
}

.menu-container .navbar-light .navbar-nav .nav-link:is(:hover, :active) {
  color: #c1c1c1;
}

/* Dropdown Styles */
.nav-item .dropdown-item {
  color: var(--color-obsidian);
  font-family: var(--font-barlow);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* OPTIMIZED: Removed !important, as specificity should be sufficient. */
.nav-item .dropdown-item:is(:focus, :hover) {
  background-color: #eee;
  border-radius: 0.25rem;
}

.dropdown-item:active {
  color: var(
    --color-gold
  ) !important; /* !important likely needed to override Bootstrap's :active state */
  background-color: #eee !important;
}

.dropdown-toggle::after,
.dropend .dropdown-item::after,
.dropstart .dropdown-toggle::before {
  display: none !important; /* !important is okay here for utility-like behavior */
}

.navbar-expand-xl .navbar-nav .dropdown-menu {
  background: #fff;
  border: 0;
  box-shadow: var(--box-shadow-dropdown);
  padding: 0.5rem;
}

.navbar-expand-xl .navbar-nav .dropdown-menu.main-dropdown {
  top: 2.25rem;
  padding: 1rem 0.5rem 0.5rem;
  border-radius: 0 0 var(--border-radius-large) var(--border-radius-large);
  transition: top var(--transition-standard);
}

.navbar-expand-xl .navbar-nav .dropdown-menu.sub-dropdown {
  border-radius: var(--border-radius-large);
}

/* Logo Styles */
.menu-container .container-fluid.dvo-logo-row {
  transition: all var(--transition-standard);
}

.dvo-logo-desktop {
  position: absolute;
  width: 230px;
  height: 120px;
  top: -4rem;
  left: 0;
  right: 0;
  margin: 0 auto;
  transition: all var(--transition-standard);
}

.shrink-menu .dvo-logo-desktop {
  width: 144px;
  height: 75px;
  top: -2.5rem;
}

/* Menu Layout */
.dvo-menu-top-row {
  height: 8rem;
  transition: height var(--transition-standard);
}
.shrink-menu .dvo-menu-top-row {
  height: 6rem;
}
.dvo-menu-padding {
  padding: 0 5rem;
  transition: padding var(--transition-standard); /* OPTIMIZED: Placed transition on parent */
}

.dvo-menu-top-row .dvo-menu-top-col {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  transition: padding var(--transition-standard);
}

.shrink-menu .dvo-menu-top-row .dvo-menu-top-col {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.dvo-menu-top-row .dvo-menu-top-col p {
  font-family: var(--font-barlow);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.nav-fill .nav-item .dropdown-item {
  text-align: left !important;
  color: var(--color-blue);
}

/* === Home Hero Styles === */
.dvo-hero-intro {
  margin-top: 165px;
  background: url(../img/dvo-hero-2000-600.webp) center bottom/cover;
  width: 100%;
  height: var(--hero-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.dvo-hero-intro h1 {
  font-size: 4rem;
  line-height: 1;
}
.dvo-hero-intro h2 {
  font-size: 1.125rem;
  font-weight: 500;
}
.dvo-hero-intro-form-field {
  font-size: 1rem;
}

/* === Navigation Pills Styles === */
.nav-pills .nav-link.dvo-nav-link-selector {
  color: var(--color-gray);
  background: #00416d;
  border: solid 1px var(--color-gray);
  border-radius: var(--border-radius-standard);
  padding: 0.5rem 0.5rem;
  font-family: var(--font-barlow);
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1;
  text-transform: uppercase;
  height: 100%;
}
.nav-pills .nav-link.dvo-nav-link-selector:hover,
.nav-pills .nav-link.active.dvo-nav-link-selector {
  color: var(--color-white);
  background: var(--color-red);
  border-color: var(--color-red);
}
.nav-pills .nav-link.dvo-nav-link-selector small {
  font-size: 75%;
  text-transform: none;
}
svg.dvo-rollover-icon {
  fill: var(--color-gray);
  width: 35px;
  height: 35px;
  margin-bottom: 0.5rem;
  transition: fill var(--transition-standard);
}
svg.dvo-rollover-icon.MOB-MOD,
svg.dvo-rollover-icon.COMM {
  width: 50px;
}
.nav-pills .nav-link:is(:hover, .active) svg.dvo-rollover-icon {
  fill: var(--color-white);
}

/* === Banner Styles === */
/* OPTIMIZED: Base styles are defined once, outside media queries. */
.dvo-stars-bg {
  background-image: url(../img/dvo-stars-bg.svg), var(--color-gradient-bg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
.dvo-finance-bg {
  position: absolute;
  background: url(../img/dvo-banner-finance-830-730.webp);
  background-size: cover;
  width: 648px;
  height: 570px;
  right: 1rem;
  bottom: 0;
}
.dvo-banner-why-choose {
  background: url(../img/dvo-banner-why-choose-2000-450.webp);
  background-color: #eef6ff;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center right;
  height: 450px;
}
.dvo-card-bg-img {
  background-image: url(../img/dvo-banner-card-bg-1600-350.webp);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* === Button Styles === */
.btn {
  /* OPTIMIZED: Removed !important from padding. Specificity of modifiers should be enough. */
  padding: 0.7rem 1rem;
  font-family: var(--font-barlow);
  font-weight: 500;
  border-radius: var(--border-radius-pill);
  text-transform: uppercase;
}

.btn.btn-menu {
  padding: 0.75rem 0.85rem;
  font-size: 0.85rem;
}
.btn.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}
.btn.btn-xl {
  padding: 1.25rem 1.75rem;
  font-size: 1.5rem;
}

.btn-danger {
  color: var(--color-white);
  background: var(--color-red);
  border-color: var(--color-red);
}
.btn-danger:is(:hover, :active, :focus) {
  color: var(--color-white);
  background: var(--color-red-hover);
  border-color: var(--color-red-hover);
}
.btn-primary {
  color: var(--color-white);
  background: var(--color-blue);
  border-color: var(--color-blue);
}
.btn-primary:is(:hover, :active, :focus) {
  color: var(--color-white);
  background: var(--color-blue-hover);
  border-color: var(--color-blue-hover);
}
.btn-252362 {
  color: var(--color-white);
  background: var(--color-red);
  border-color: var(--color-red);
}
.btn-252362:is(:hover, :active, :focus) {
  color: var(--color-white);
  background: var(--color-red-hover);
  border-color: var(--color-red-hover);
}

/* === Color Utility Classes === */
/* NOTE: !important is generally acceptable for utility classes to ensure they override component styles. */
.text-primary {
  color: var(--color-blue) !important;
}
.bg-primary {
  background-color: var(--color-blue) !important;
}
.bg-primary.dark {
  background-color: var(--color-extra-dark-blue) !important;
}
.border-primary {
  border-color: var(--color-blue) !important;
}

.text-danger {
  color: var(--color-red) !important;
}
.bg-danger {
  background-color: var(--color-red) !important;
}
.border-danger {
  border-color: var(--color-red) !important;
}

.bg-light.alt {
  background-color: #eef6ff !important;
}

.dvo-border-shift {
  border-left: 1px solid var(--color-gold);
  border-right: 1px solid var(--color-gold);
}

.text-deep-navy {
  color: var(--color-deep-navy) !important;
}
.bg-deep-navy {
  background-color: var(--color-deep-navy) !important;
}

.text-dark-slate-blue {
  color: var(--color-dark-slate-blue) !important;
}
.bg-dark-slate-blue {
  background-color: var(--color-dark-slate-blue) !important;
}

.text-deep-charcoal {
  color: var(--color-deep-charcoal) !important;
}
.bg-deep-charcoal {
  background-color: var(--color-deep-charcoal) !important;
}

.text-obsidian {
  color: var(--color-obsidian) !important;
}
.bg-obsidian {
  background-color: var(--color-obsidian) !important;
}

.text-666 {
  color: var(--color-gray-666) !important;
}

/* === Component Styles === */
.img-fluid {
  margin-bottom: 2rem;
}

.card.dvo-card {
  background: var(--color-blue);
  /* White inner border */
  border: 2px solid var(--color-white);
  /*Box-shadow to simulate outer red border */
  box-shadow: 0 0 0 2px var(--color-red);
  border-radius: var(
    --border-radius-card
  ) !important; /* Keep !important if overriding BS component children */
  margin-bottom: 1.5rem;
  color: var(--color-white);
}
.card.dvo-card.dark {
  background: #00416d;
  /* White inner border */
  border: 2px solid var(--color-white);
  /*Box-shadow to simulate outer red border */
  box-shadow: 0 0 0 2px var(--color-red);
  border-radius: var(
    --border-radius-card
  ) !important; /* Keep !important if overriding BS component children */
  margin-bottom: 1.5rem;
  color: var(--color-white);
}
.card.dvo-card-alt {
  background: var(--color-blue);
  /* White inner border */
  border: 2px solid var(--color-white);
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: var(--border-radius-card) !important;
  border-bottom-right-radius: var(--border-radius-card) !important;
  color: var(--color-white);
}
.card.dvo-coupon-card {
  background: var(--color-blue);
  outline: 3px dashed var(--color-red);
  outline-offset: 3px;
  border-radius: var(--border-radius-card) !important;
  color: var(--color-white);
}

.card.dvo-coupon-card.first-responders {
  background: var(--color-blue);
  background-image: url(../img/dvo-banner-coupon-bg-first-responders-1600-350.webp);
  background-size: cover;
  background-position: center;
}

.rounded {
  border-radius: var(--border-radius-standard) !important;
}

ul.list-group li.list-group-item,
ol.list-group li.list-group-item,
table.table.table-bordered thead tr th,
table.table.table-bordered tbody tr td {
  background: transparent !important;
  border-color: var(--color-gold);
  color: var(--color-white);
}

/* Accordion Styles */
.accordion-item {
  border: none;
  border-bottom: 1px solid #ccc;
  border-radius: 0;
}

.accordion-item:last-of-type,
.accordion-button {
  border-radius: 0 !important;
}
.accordion-button {
  background-color: transparent;
  box-shadow: none;
  font: var(--font-source);
  font-weight: 500;
  color: black;
}

.accordion-button:not(.collapsed) {
  color: #fff;
}

.accordion-button:focus {
  box-shadow: none;
}

.accordion-button::after {
  display: none !important;
}

.accordion-button .fa-arrow-down-right {
  transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed) .fa-arrow-down-right {
  transform: rotate(-90deg);
}

.accordion-button:focus {
  box-shadow: none; /* Removes default Bootstrap focus glow */
}

.accordion-item {
  background-color: transparent !important;
}

.accordion-body {
  background-color: transparent !important;
}

.accordion-button:not(.collapsed) {
  background: var(--color-gradient-bg) !important;
}
/* Accordion Styles - END */

/* === Utility Classes === */
strong,
em,
u {
  font-weight: inherit !important;
  font-style: inherit !important;
  text-decoration: inherit !important;
}
a {
  text-decoration: none;
}
.dashed {
  border-style: dashed !important;
}
/* === Footer Styles === */
footer {
  border-top: 1.5rem solid var(--color-red);
}
footer h6 {
  color: var(--color-white);
  font-weight: 700;
  margin-bottom: 1rem;
}
footer p {
  margin-bottom: 0.25rem;
}
footer p a {
  color: var(--color-white);
  font-family: var(--font-source);
  font-weight: 500;
}
footer p a:is(:hover, :active, :focus) {
  color: var(--color-red);
}

/* === Media Queries === */
/* OPTIMIZED: Each media query now only contains the styles that need to change at that breakpoint. */
@media (max-width: 1400px) {
  .dvo-menu-top-row,
  .dvo-menu-padding {
    padding: 0 1rem;
  }
  .navbar-light .navbar-nav .nav-link {
    font-size: 0.85rem;
  }

  .dvo-hero-intro {
    background-image: url(../img/dvo-hero-1600-600.webp);
  }
  .dvo-hero-intro-form-top-margin {
    margin-top: -7rem;
  }
  .dvo-banner-why-choose {
    background: url(../img/dvo-banner-why-choose-2000-450.webp);
    background-color: #eef6ff;
    background-size: cover;
    height: 300px;
    width: 100%;
  }
}

@media (max-width: 1200px) {
  .dvo-menu-top-row .dvo-menu-top-col {
    padding-block: 0.5rem;
  }
  .shrink-menu .dvo-menu-top-row .dvo-menu-top-col {
    padding-block: 0.35rem;
  }

  .navbar-nav,
  .shrink-menu .navbar-nav {
    height: fit-content;
  }
  .navbar-nav {
    width: auto;
  }

  .navbar {
    height: 80px;
    transition: height var(--transition-standard);
  }
  .shrink-menu .navbar {
    height: 65px;
  }

  .dvo-logo {
    position: absolute;
    background: url(../img/dvo-logo-230-120.webp);
    background-size: cover;
    width: 196px;
    height: 102px;
    left: 0;
    right: 0;
    margin: 0 auto;
    top: 0.75rem;
    transition: all var(--transition-standard);
    z-index: 10;
  }
  .shrink-menu .dvo-logo {
    width: 144px;
    height: 75px;
    top: 0.5rem;
  }

  .nav-fill .nav-item,
  .nav-fill > .nav-link {
    flex: 1 1 auto;
    text-align: left;
  }
  .rotate-at-mobile {
    transform: rotate(90deg);
  }
  .navbar-light .navbar-nav .nav-link {
    font-size: 1.25rem;
  }

  .dvo-hero-intro {
    margin-top: 208px;
    background-image: url(../img/dvo-hero-1200-600.webp);
  }
  .dvo-hero-intro h1 {
    font-size: 3.5rem;
  }
  .dvo-hero-intro h2 {
    font-size: 1.25rem;
  }

  .dvo-banner-why-choose {
    background: url(../img/dvo-banner-why-choose-2000-450.webp);
    background-color: #eef6ff;
    background-size: cover;
    height: 250px;
    width: 100%;
  }
}

@media (max-width: 991px) {
  .navbar-light .navbar-nav .nav-link {
    font-size: 1.25rem !important;
  }

  .dvo-hero-intro {
    background-image: url(../img/dvo-hero-991-600.webp);
    height: fit-content;
  }
  .dvo-hero-intro-form-top-margin {
    margin-top: 0;
  }
  .dvo-hero-intro .container {
    padding-block: var(--hero-padding);
  }
  .dvo-hero-intro h1 {
    font-size: 3rem;
  }
  .dvo-hero-intro h2 {
    font-size: 1rem;
  }
  .dvo-hero-intro-form-field {
    font-size: 0.85rem;
  }

  .dvo-border-shift {
    border-inline: none;
    border-block: 1px solid var(--color-gold);
  }

  .dvo-finance-bg {
    display: none;
  }
  .dvo-banner-why-choose {
    display: none;
  }
}

@media (max-width: 767px) {
  .dvo-menu-top-row {
    height: 5rem;
    transition: height var(--transition-standard);
  }
  .shrink-menu .dvo-menu-top-row {
    height: 4rem;
  }
  .dvo-logo {
    width: 134px;
    height: 70px;
    top: 1.25rem;
  }
  .shrink-menu .dvo-logo {
    width: 105px;
    height: 55px;
    top: 1.5rem;
  }

  .dvo-hero-intro {
    margin-top: 184px;
    background-image: url(../img/dvo-stars-bg.svg), var(--color-gradient-bg-hero);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: fit-content;
  }
  .dvo-hero-intro .container {
    padding-block: var(--hero-padding);
  }
  .dvo-hero-intro h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 500px) {
  .dvo-hero-intro h1 {
    font-size: 2.25rem;
  }
  .dvo-hero-intro h2 {
    font-size: 0.85rem;
  }
  .dvo-logo {
    width: 125px;
    height: 65px;
    top: 1.75rem;
  }
  .shrink-menu .dvo-logo {
    width: 105px;
    height: 55px;
    top: 1.5rem;
  }
}

@media (max-width: 450px) {
  .dvo-hero-intro h1 {
    font-size: 2rem;
  }
}
