/*
 * grid.css
 * Custom CSS replacing Bootstrap for DiFilippo Globe Life site.
 * Only contains what is actually used across the site's HTML pages.
 * No unused Bootstrap bloat.
 */

/* ─── RESET & BASE ──────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}


/* ─── CONTAINER ─────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1170px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}


/* ─── ROW ───────────────────────────────────────────────────────────────────── */

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
  margin-right: -15px;
}

.row::after {
  content: '';
  display: table;
  clear: both;
}


/* ─── COLUMNS — BASE (mobile first, xs) ─────────────────────────────────────── */

[class*="col-"] {
  position: relative;
  padding-left: 15px;
  padding-right: 15px;
  width: 100%;
}

.col-xs-2  { width: 16.6667%; }
.col-xs-4  { width: 33.3333%; }
.col-xs-6  { width: 50%; }
.col-xs-12 { width: 100%; }

.col-12 { width: 100%; }


/* ─── COLUMNS — sm (≥768px) ─────────────────────────────────────────────────── */

@media (min-width: 768px) {
  .col-sm-2  { width: 16.6667%; }
  .col-sm-3  { width: 25%; }
  .col-sm-6  { width: 50%; }
  .col-sm-7  { width: 58.3333%; }
  .col-sm-11 { width: 91.6667%; }
  .col-sm-12 { width: 100%; }
}


/* ─── COLUMNS — md (≥992px) ─────────────────────────────────────────────────── */

@media (min-width: 992px) {
  .col-md-2  { width: 16.6667%; }
  .col-md-3  { width: 25%; }
  .col-md-4  { width: 33.3333%; }
  .col-md-5  { width: 41.6667%; }
  .col-md-6  { width: 50%; }
  .col-md-7  { width: 58.3333%; }
  .col-md-8  { width: 66.6667%; }
  .col-md-9  { width: 75%; }
  .col-md-11 { width: 91.6667%; }
  .col-md-12 { width: 100%; }
}


/* ─── COLUMNS — lg (≥1200px) ────────────────────────────────────────────────── */

@media (min-width: 1200px) {
  .col-lg-2  { width: 16.6667%; }
  .col-lg-3  { width: 25%; }
  .col-lg-4  { width: 33.3333%; }
  .col-lg-5  { width: 41.6667%; }
  .col-lg-6  { width: 50%; }
  .col-lg-7  { width: 58.3333%; }
  .col-lg-8  { width: 66.6667%; }
  .col-lg-9  { width: 75%; }
  .col-lg-11 { width: 91.6667%; }
  .col-lg-12 { width: 100%; }
}


/* ─── UTILITIES ─────────────────────────────────────────────────────────────── */

.img-responsive {
  max-width: 100%;
  height: auto;
  display: block;
}

.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.pull-left  { float: left !important; }
.pull-right { float: right !important; }

.text-center { text-align: center; }

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* Screen reader only — accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Bootstrap 4 utility classes used on index page */
.bg-light { background-color: #f8f9fa; }
.py-5     { padding-top: 3rem; padding-bottom: 3rem; }

.justify-content-center { justify-content: center; }


/* ─── NAVBAR ────────────────────────────────────────────────────────────────── */

.navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
}

.navbar-default {
  background-color: transparent;
  border: none;
}

.navbar-header {
  display: flex;
  align-items: center;
}

/* Hamburger toggle button */
.navbar-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
}

.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #fff;
  margin: 4px 0;
  border-radius: 1px;
}

/* Nav links */
.nav {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.navbar-nav li a {
  display: block;
  padding: 15px 12px;
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.navbar-nav li a:hover { color: rgba(255,255,255,0.75); }

/* Collapsible nav — desktop always visible */
.navbar-collapse { display: flex !important; }

/* Hidden state for mobile collapse */
.collapse:not(.in) { display: none; }
.collapse.in       { display: block; }


/* ─── NAVBAR — MOBILE ───────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .navbar-toggle {
    display: block;
  }

  .navbar-collapse {
    display: none !important;
    width: 100%;
    flex-direction: column;
  }

  .navbar-collapse.in {
    display: flex !important;
  }

  .navbar-nav {
    flex-direction: column;
    width: 100%;
  }

  .navbar-nav li {
    width: 100%;
  }

  .navbar-nav li a {
    padding: 12px 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
}


/* ─── CAROUSEL (testimonials) ───────────────────────────────────────────────── */

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-inner .item {
  display: none;
  position: relative;
  transition: opacity 0.4s ease;
}

.carousel-inner .item.active {
  display: block;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 0;
  margin: 0;
  list-style: none;
}

.carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-indicators li.active {
  background: #00558c;
}


/* ─── PANEL / ACCORDION ─────────────────────────────────────────────────────── */

.panel-group { margin-bottom: 20px; }

.panel {
  margin-bottom: 5px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.panel-default { border-color: #ddd; }

.panel-heading {
  padding: 12px 15px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.panel-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.panel-collapse {
  overflow: hidden;
  height: 0;
  display: block;
  transition: height 0.3s ease;
}

.panel-collapse.in {
  height: auto;
}

.panel-body {
  padding: 15px;
}


/* ─── FORM ELEMENTS ─────────────────────────────────────────────────────────── */

.form-control {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #00558c;
  box-shadow: 0 0 0 3px rgba(0,85,140,0.15);
}

.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-bottom: 10px;
}

.input-group .form-control {
  flex: 1;
  border-radius: 4px 0 0 4px;
}

.input-group-addon {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: #eee;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 4px 4px 0;
  color: #555;
  font-size: 14px;
}
