/* -------------------------------------- */
/* GLOBAL                                 */
/* -------------------------------------- */
*:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* -------------------------------------- */
/* SIDEBAR (hidden by default)            */
/* -------------------------------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: -16.67vw; /* 250px -> 16.67vw */
  width: 16.67vw; /* 250px -> 16.67vw */
  height: 100%;
  background-color: #F16629;
  padding-top: 2vh;
  transition: left 0.3s ease;
  z-index: 1050;
}
.sidebar.active {
  left: 0;
}
.sidebar .btn-close {
  margin-left: auto;
  margin-right: 2vw;
  filter: invert(1) brightness(2);
  opacity: 1;
}

/* Group wrapper so we can toggle .open state */
.sidebar-group {
  border-top: 0.1vw solid #fff;
  border-bottom: 0.1vw solid #fff;
}

/* Make the toggle look like other links */
.sidebar-dropdown-toggle {
  position: relative;
  color: #fff !important;
  background: none;
  border: none;
  display: block;
  width: 100%;
  padding: 2vh 2vw;
  font-size: 1.1rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sidebar-dropdown-toggle:hover,
.sidebar-dropdown-toggle:focus {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Caret indicator */
.sidebar-caret {
  position: absolute;
  right: 2vw;
  top: 50%;
  width: 0.6em;
  height: 0.6em;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-50%) rotate(-45deg); /* pointing right/down */
  transition: transform 0.2s ease;
}
.sidebar-group.open .sidebar-caret {
  transform: translateY(-50%) rotate(45deg); /* rotated to point up/left */
}

/* Submenu container with slide effect via max-height */
.sidebar-submenu {
  background: rgba(255,255,255,0.06);
  transition: max-height 0.25s ease, opacity 0.2s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}

/* Expanded state */
.sidebar-group.open .sidebar-submenu {
  max-height: 60vh; /* enough room for several items */
  opacity: 1;
}

/* Submenu links */
.submenu-link {
  color: #fff !important;
  text-decoration: none;
  display: block;
  padding: 1.5vh 2vw 1.5vh 4vw; /* indent */
  font-size: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  transition: background 0.2s, color 0.2s;
}
.submenu-link:first-child {
  border-top: 0;
}
.submenu-link:hover,
.submenu-link:focus {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Remove double borders for first/last items next to main links */
.sidebar-link-main + .sidebar-group { border-top: 0; }
.sidebar-group + .sidebar-link { border-top: 0; }

/* Optional: tighter borders on the dropdown group itself */
.sidebar-group {
  margin: 0;
}

/* Keep hover from applying on the container when submenu is open */
.sidebar-group.open .sidebar-dropdown-toggle:hover {
  background: rgba(255,255,255,0.08);
}

/* -------------------------------------- */
/* NAVBAR CONTAINER PADDING               */
/* -------------------------------------- */
.navbar .container-fluid {
  position: relative;
  display: flex;            /* keep your existing flex layout */
  align-items: center;
  justify-content: space-between; /* hamburger on one side, links on the other */
  padding: 0.5rem 1rem;
}

/* -------------------------------------- */
/* NAVBAR TWEAKS                          */
/* -------------------------------------- */
.navbar {
  height: 10vh;
  box-shadow: 0 0.2vw 0.6vw rgba(0,0,0,0.10); /* smaller, lighter shadow */
}

.btn-outline-secondary {
  border-color: #888;
  color: #444;
  border-radius: 2vw;
}
.btn-outline-secondary:hover {
  background-color: #f8f9fa;
}

/* Custom transition and hover for nav buttons */
.nav-link-btn {
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav-link-btn:hover,
.nav-link-btn:focus {
  background: #F16629;
  color: #fff;
  border-color: #F16629;
}

/* Active/selected state */
.active-nav-btn,
.nav-link-btn.active {
  background: #fff !important;
  color: #444 !important;
  border-color: #fff !important;
  box-shadow: 0 0.2vw 0.8vw rgba(241,102,41,0.10);
  cursor: default;
  pointer-events: none; /* disables click on the active button */
}

/* -------------------------------------- */
/* HAMBURGER (sidebar toggle)             */
/* -------------------------------------- */
#openSidebar {
  background-color: #F16629;
  border: none;
  width: 6vw;;
  height: 11vh;              /* taller button, but less than full 100px nav */
  position: relative;
  top: -2vh; 
  left: -1vw;           /* lift upward by 10px so it doesn’t touch bottom */
  display: flex;
  align-items: flex-end; /* align icon at bottom inside */
  justify-content: flex-end; /* align icon to right inside */
  padding: 1vw;         /* give it some inner spacing */
  border-radius: 1.5vw;
}

#openSidebar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2030%2024'%3E%3Cpath%20stroke='white'%20stroke-width='2.5'%20stroke-linecap='round'%20d='M4%208h22M4%2012h22M4%2016h22'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: -0.5vw -0.5vw;   
  background-size: 3.5vw 3.5vw;
  width: 3.5vw;
  height: 3.5vw;
}

/* Sidebar improved styles */
.sidebar-nav {
  margin: 0;
  padding: 0;
}
.sidebar-link {
  color: #fff !important;
  background: none;
  border: none;
  display: block;
  width: 100%;
  padding: 2vh 2vw;
  font-size: 1.1rem;
  text-align: left;
  text-decoration: none;
  border-top: 0.1vw solid #fff;
  border-bottom: 0.1vw solid #fff;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.sidebar-link-main {
  border-top: none;
}
.sidebar-link-last {
  border-bottom: none;
}
.sidebar-link:hover,
.sidebar-link:focus {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}

/* -------------------------------------- */
/* LOGO CONTAINER (fixed width + offset) */
/* -------------------------------------- */
.logo-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 50%;                /* vertical center: */
  transform: translate(-50%, -50%);
  width: auto;             /* let the img size itself */
  text-align: center;
  z-index: 10;             /* stay on top of everything else */
}

/* size your logo however you like */
.logo-container .navbar-logo {
  height: 4.3rem;          /* tweak to taste */
  object-fit: contain;
}

/* -------------------------------------- */
/* “Get a Quote” BUTTON                   */
/* -------------------------------------- */
.btn-quote {
  display: inline-block;        /* allow width to apply */
  min-width: 10rem;             /* adjust this to the width you need */
  background-color: #F16629;
  color: #fff;
  border-radius: 2vw;
  padding: 0.375rem 1.25rem;    /* top/bottom, left/right */
  font-weight: 500;
  text-align: center;           /* center the text */
  margin-right: 1vw;            /* space from right edge */
  white-space: nowrap;          /* prevent wrapping */
  transition: background 0.2s, color 0.2s;
}
.btn-quote:hover {
  background-color: #d94e2a;
  color: #fff;
}

/* -------------------------------------- */
/* BODY & CONTENT OFFSET                  */
/* -------------------------------------- */
body {
  padding-top: 10vh; /* keep content below the fixed navbar */
}

/* -------------------------------------- */
/* FOOTER STYLES                          */
/* -------------------------------------- */
.footer-mobile { display: none !important; }
.footer-desktop { display: block !important; }

.footer-orange-top {
  position: absolute;
  top: -10vh; /* how much it sticks out above the grey */
  left: 0;
  width: 100%;
  height: 20vh; /* thickness of the orange bar */
  background: #F16629;
  border-top-left-radius: 3vw;
  border-top-right-radius: 3vw;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.footer-cover-btn {
  margin-top: 2vh;
  background: #fff;
  color: #F16629;
  font-weight: 600;
  border-radius: 999px;
  padding: 1vh 2vw;
  font-size: 1.25rem;
  box-shadow: 0 0.5vw 2vw rgba(0,0,0,0.08);
  border: none;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  position: relative;
  z-index: 2;
}

.footer-top-wrapper {
  width: 100%;
  z-index: 1;
  background-color: #B0B0B0; /* lighter grey */
  color: #ffffff;
  border-top-left-radius: 3vw;
  border-top-right-radius: 3vw;
  padding-top: 3vh;
  padding-bottom: 5vh;
}

/* Footer Logo */
.footer-logo {
  max-width: 8vw;
  height: auto;
}

.footer-desktop .footer-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1em;
}

/* Footer link styles */
.footer-links a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1.1em;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.footer-links a:hover {
  text-decoration: underline;
  color: #F16629;
}

.footer-desktop .footer-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 0.7em;
}

/* Bottom legal bar */
.footer-bottom {
  font-size: 0.9rem;
  font-weight: 600;
  color: #F16629;
}
.insurefin-logo {
  height: 8rem;      /* much larger logo */
  max-width: 100%;    /* allow full width if needed */
  margin-top: -2em;
  margin-bottom: 2em;
}
.social-icon {
  width: 4rem;        /* much larger icons */
  height: 4rem;
  opacity: 0.9;
}
.social-icon:hover {
  opacity: 1;
}

/* -------------------------------------- */
/* NAVBAR SHRINK - SMOOTHER TRANSITION    */
/* -------------------------------------- */
.navbar {
  transition: height 0.4s cubic-bezier(.4,0,.2,1), background 0.3s, box-shadow 0.3s;
}

.logo-container,
.dropdown,
#openSidebar,
.btn-quote {
  transition: opacity 0.3s, transform 0.3s;
}

.navbar-shrink {
  height: 5vh !important;
  min-height: 5vh !important;
  box-shadow: 0 0.2vw 0.8vw rgba(0,0,0,0.07);
  background: #fff !important;
}

.navbar-shrink .dropdown,
.navbar-shrink #openSidebar {
  opacity: 0;
  transform: translateY(-2vh);
  pointer-events: none;
}

.navbar-shrink .logo-container {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.navbar-shrink .btn-quote {
  opacity: 1 !important;
  transform: translateY(-50%);
  display: block !important;
  margin: 0 auto;
  float: none;
  position: absolute;
  right: 1vw;
  top: 50%;                /* center vertically */
  z-index: 999;
  font-size: 0.85rem;      /* smaller text */
  min-width: 7rem;         /* smaller button width */
  padding: 0.25rem 0.8rem; /* less padding */
  pointer-events: auto !important;
  transition: font-size 0.3s, padding 0.3s, transform 0.3s;
}

/* -------------------------------------- */
/* SCROLL TO TOP BUTTON                   */
/* -------------------------------------- */
.scroll-top-btn {
  position: fixed;
  bottom: 8vh;
  right: 2vw;
  background: #F16629;
  border: none;
  border-radius: 0.5vw;
  width: 2.5vw;
  height: 2.5vw;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.5vw 2vw rgba(0,0,0,0.12);
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.scroll-top-btn svg {
  display: block;
}
.scroll-top-btn.show {
  opacity: 1;
  pointer-events: auto;
}

/* -------------------------------------- */
/* MOBILE PORTRAIT (360px–425px)         */
/* -------------------------------------- */
@media (max-width: 430px) and (orientation: portrait) {
  html, body {
    overflow-x: hidden;
  }
  .navbar .nav-link-btn.btn-outline-secondary {
    display: none !important;
  }
  .navbar .container-fluid {
    padding: 0.5rem 1rem;
    height: auto;
  }
  /* — NAVBAR‑SHRINK: disable height collapse on mobile */
  .navbar-shrink {
    height: 44px !important; /* use px for more predictable rendering */
    min-height: 44px !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: 0 0.2rem 0.8rem rgba(0,0,0,0.07);
    transition: height 0.4s cubic-bezier(.4,0,.2,1);
  }
  .navbar-shrink .container-fluid {
    height: 44px !important;         /* match navbar height */
    padding: 0.5rem 1rem;
  }
  .navbar-shrink .logo-container {
    /* undo any hiding */
    opacity: 1 !important;
    pointer-events: auto !important;

    /* switch to absolute so we can pin it at the left */
    position: absolute !important;
    top: 50% !important;                /* vertical center */
    left: 1rem !important;              /* small gutter from left edge */
    transform: translateY(-50%) !important;  /* perfect vertical centering */

    /* layer it above the quote button if need be */
    z-index: 1002 !important;
  }
  .navbar-shrink .logo-container .navbar-logo {
    height: 2.2rem !important;      /* shrink logo for smaller navbar */
    transition: height 0.3s;
  }
  /* Only vertical movement when shrunk */
  .navbar-shrink .btn-quote {
    display: block !important;
    position: absolute;
    right: 0.2em;
    top: 50%;                       /* center vertically */
    transform: translateY(-50%);    /* center vertically */
    font-size: 0.9rem !important;
    padding: 0.35rem 0.8rem !important;
    min-width: 6.5rem !important;
    color: #fff !important;
    background-color: #F16629 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    filter: none !important;
    z-index: 999 !important;
    pointer-events: auto !important;
    float: none !important;
    margin-top: 0 !important;
    transition: font-size 0.3s, padding 0.3s, transform 0.3s;
  }
  .btn-quote {
    display: inline-block !important;
    background-color: #F16629 !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    min-width: 8rem !important;
    text-align: center !important;
    white-space: nowrap !important;
    transition: background 0.2s, color 0.2s, transform 0.3s ease !important;
  }
  /* LOGO: center and shrink */
  .navbar:not(.navbar-shrink) .logo-container {
    width: auto;
    margin-top: -0.5rem; 
  }
  .navbar-shrink .logo-container,
  .navbar-shrink .logo-container a {
    pointer-events: auto !important;   /* allow clicks */
    z-index: 1002 !important;          /* sit above the quote button */
  }
  .logo-container .navbar-brand {
    position: relative;
    z-index: 1002;
  }
  .logo-container .navbar-logo {
    height: 3.5rem;
  }
  /* HAMBURGER ICON: adjust position and size */
  #openSidebar {
    width: 6rem;
    height: 5rem;
    padding: 0.5rem;
    top: -3vh;
    left: -2vh;
    border-radius: 1rem;
  }
  #openSidebar .navbar-toggler-icon {
    width: 4rem;
    height: 3rem;
    background-size: 4rem 4rem;
    background-position: -1rem -1rem; /* right and down */
  }
  .sidebar {
    width: 50vw;           /* take up more of the screen when open */
    left: -50vw;           /* hide off‑screen by its full width */
  }
  .sidebar.active {
    left: 0;               /* slide fully into view */
  }
  /* shrink the close button inside sidebar */
  .sidebar .btn-close {
    margin-right: 1.5rem;
    width: 2rem;
    height: 2rem;
  }

  /* FOOTER – REORDERED & RESTYLED FOR MOBILE */
  .footer-mobile { display: block !important; }
  .footer-desktop { display: none !important; }

  .footer-orange-top {
    position: relative !important;
    margin-top: 3rem !important;         /* slightly less space above */
    background: #F16629 !important;
    padding: 2.5rem 0 2.5rem 0 !important; /* more vertical padding for button */
    display: flex !important;
    justify-content: center !important;
    z-index: 0 !important;
    margin-bottom: -35vw !important;       /* less negative margin for better overlap */
    border-top-left-radius: 5vw !important;
    border-top-right-radius: 5vw !important;
  }
  .footer-cover-btn {
    width: 70% !important;
    max-width: 15rem !important;
    margin: 0 auto !important;
    padding: 0.7rem 0 !important;
    font-size: 1.05rem !important;
    text-align: center !important;
  }

  .footer-top-wrapper {
    background-color: #B0B0B0 !important;
    padding: 2.5rem 1rem 3rem !important;   /* more top padding for separation */
    border-top-left-radius: 5vw !important;
    border-top-right-radius: 5vw !important;
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
    margin-bottom: 0 !important;
    padding-bottom: 1.5rem !important;
  }

  /* Row 1: logo centered & square */
  .footer-top-wrapper .row:nth-child(1) {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 1rem !important;
  }
  .footer-top-wrapper .row:nth-child(1) .col-12 {
    text-align: center !important;
  }
  .footer-logo {
    width: 40vw !important;          /* was 50vw, now 70vw */
    max-width: 90px !important;     /* optional cap */
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
  }

  /* Row 2: 2‑column grid */
  .footer-top-wrapper .row:nth-child(2) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
  }
  .footer-top-wrapper .row:nth-child(2) > .col-md-2:nth-of-type(1),
  .footer-top-wrapper .row:nth-child(2) > .col-md-2:nth-of-type(2),
  .footer-top-wrapper .row:nth-child(2) > .col-md-2:nth-of-type(3) {
    width: 100% !important;
  }
  /* Cover in first cell */
  .footer-top-wrapper .row:nth-child(2) > .col-md-2:nth-of-type(1) {
    grid-column: 1 !important;
  }
  /* Company & Help in second cell */
  .footer-top-wrapper .row:nth-child(2) > .col-md-2:nth-of-type(2),
  .footer-top-wrapper .row:nth-child(2) > .col-md-2:nth-of-type(3) {
    grid-column: 2 !important;
  }
  .footer-title {
    font-size: 1.1rem !important;
    margin-bottom: 0.9rem !important;
  }
  .footer-links a {
    font-size: 0.8rem !important;            /* smaller text */
    color: #e0e0e0 !important;              /* light white-grey */
    font-weight: 400 !important;           /* optional: lighter feel */
    text-decoration: none;
    margin-bottom: 2vh !important;
    display: block;
    transition: color 0.2s ease;
  }  
  .footer-top-wrapper .row:nth-child(2) > .col-md-2:nth-of-type(1) .footer-links a {
    margin-bottom: 1rem !important;
  }
  /* Paragraph spans both columns */
  .footer-top-wrapper .row:nth-child(2) .col-md-6 {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    margin: 1rem 0 !important;
  }

  .footer-top-wrapper .row:nth-child(3) .col-12 {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2.5rem !important;          /* your desired space between icons */
    line-height: 0;                  /* kill inline line box artifacts */
    font-size: 0;                    /* hides any stray text node like "-" */
  }

  .footer-top-wrapper .row:nth-child(3) .col-12 a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;        /* no underline */
    color: inherit;                           /* no link color bleed */
    background: transparent;
    border: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* remove iOS tap overlay */
  }

  .footer-top-wrapper .row:nth-child(3) .col-12 a::before,
  .footer-top-wrapper .row:nth-child(3) .col-12 a::after {
    content: none !important;                 /* prevent any CSS separators */
  }

  .footer-top-wrapper .row:nth-child(3) .col-12 .social-icon {
    display: block;    /* remove inline-image baseline gap */
  }
  .footer-desc {
    max-width: 90% !important;
    text-decoration: none;
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    color: #e0e0e0 !important;              /* light white-grey */
    margin-bottom: -3rem !important;
    font-weight: 400 !important;
    transition: color 0.2s ease;
    margin-bottom: 0.5rem !important; /* space below */
  }

  /* Row 4: Insure.Fin logo + social icons */
  .footer-top-wrapper .row:nth-child(4) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;       /* add space between logo and icons */
  }

  .insurefin-logo {
    height: 8rem !important;    /* up from 4.5rem */
    object-fit: contain !important;
    margin-bottom: -2rem !important;
  }
  .social-icons {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2.5rem !important; 
  }
  .social-icon {
    width: 3.5rem !important;   /* larger icons */
    height: 3.5rem !important;
  }
  .social-icon:last-child {
    margin-right: 0 !important;
  }
  .footer-bottom {
    font-size: 0.6rem !important;
    padding: 1rem 1.5rem !important;     /* add left/right padding */
    text-align: center !important;
    background: #fff !important;
    color: #F16629 !important;
    margin: 0 auto !important;           /* center if you constrain width */
    max-width: 100%;                      /* or e.g. 500px for a fixed width */
    box-sizing: border-box;               /* ensure padding doesn’t overflow */
  }

  /* — SCROLL‑TO‑TOP BUTTON: reposition & resize for thumb reach */
  .scroll-top-btn {
    bottom: 4rem;         /* higher above bottom UI */
    right: 1rem;          /* closer to right edge */
    width: 3rem;
    height: 3rem;
    border-radius: 50%;   /* make it a perfect circle */
  }
  /* you can also tweak its SVG stroke for visibility */
  .scroll-top-btn svg path {
    stroke-width: 3;
  }
}