/**
 * Main CSS.
 *
 * @package roofing
 * @author Masood HQ <hey@masoodhq.com>
 * @version 1.0
 */

/** 
 * ------------------------------
 *  Header 
 * ------------------------------
*/



/*
 * Header chrome wrapper. Sits above the page either way; the body flags set by
 * roofkit_header_feature() decide whether it also leaves the flow.
 */
.roofkit-header {
  position: relative;
  z-index: 99;
}

/* Transparent: overlay whatever section comes first. */
.roofkit-header-transparent .roofkit-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

/* Sticky: pinned, but still taking up its own space. */
.roofkit-header-sticky .roofkit-header {
  position: sticky;
  top: 0;
}

/* Both at once: out of the flow and pinned. */
.roofkit-header-transparent.roofkit-header-sticky .roofkit-header {
  position: fixed;
}

/*
 * The colour the header is dressed in. A tone file re-points these and every
 * rule below follows without knowing the header changed - the same
 * arrangement footer/base.css has with the footer tones. This block is the
 * light tone; there is no file for it.
 */
.header-wrapper {
  --header-bg: transparent;
  --header-text: var(--color-text);
  --header-link: var(--color-heading);
  --header-link-hover: var(--color-primary);
  --header-icon-bg: var(--color-light-bg);
  --header-icon: inherit;
  --header-logo-filter: none;
}

.header {
  height: 3.75rem;
  display: flex;
  align-items: center;
  position: relative;
  background: var(--header-bg);
  color: var(--header-text);
}

.header-wrapper .site-logo img {
  filter: var(--header-logo-filter);
}

/* .home .header {
  margin: 32px 0 0 0;
} */

.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.header-element-wrapper {
  display: flex;
  gap: var(--space-sm);
}

/* Shared by every layout: the CTA and hamburger group at one end of the bar. */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-cta {
  white-space: nowrap;
}

.header .menu-title,
.header .menu-close-icon {
  display: none;
}

.header-element-wrapper .mobile-nav {
  display: none;
  background: var(--header-icon-bg);
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  position: relative;
}

.mobile-nav>span {
  font-size: clamp(var(--fs-lg), 4vw, var(--fs-xl-plus));
  cursor: pointer;
  color: var(--header-icon);
}

.header .menu-close-icon {
  position: absolute;
  top: var(--space-4xl);
  right: var(--container-padding);
  width: 1.875rem;
  height: 1.875rem;
  align-items: center;
  justify-content: center;
  background: var(--header-icon-bg);
  color: var(--header-icon);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.header .menu-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  margin: 0 0 var(--space-xl) 0;
}

.main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.main-menu>li {
  margin: 0;
  padding: 0;
  position: relative;
}

.main-menu>li>a {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  text-decoration: none;
  color: var(--header-link);
  font-weight: var(--fw-medium);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-menu li>a:hover,
.main-menu li.current-menu-item>a {
  color: var(--header-link-hover);
}

/* Hide submenu by default */
.menu-item-has-children .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  min-width: 12.5rem;
  box-shadow: var(--shadow-xs);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) 0;
  z-index: 1000;
}

/* Show submenu on hover */
.menu-item-has-children:hover .sub-menu {
  display: block;
}

/* Submenu items styling */
.sub-menu li {
  list-style: none;
}

.sub-menu li a {
  display: block;
  padding: var(--space-xs) var(--space-lg);
  color: var(--color-text);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

/* Optional: Add smooth transition effect */
.menu-item-has-children .sub-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.625rem);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.menu-item-has-children:hover .sub-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.apply-overlay main:after {
  position: fixed;
  z-index: 1;
  inset: 0;
  background-color: var(--color-overlay);
  content: '';
  cursor: pointer;
}

/** 
 * ------------------------------
 *  Content Area 
 * ------------------------------
*/

/* .main-wrapper {
  margin: var(--space-5xl) 0;
} */

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  background: var(--color-bg);
}

thead tr {
  background: var(--color-light-bg);
  text-align: left;
  font-weight: var(--fw-medium);
  border: var(--border-solid);
}

thead td {
  padding: var(--space-md);
}

tbody tr {
  border: var(--border-solid);
}

td {
  padding: var(--space-md);
  border: var(--border-solid);
}


/* === Accordion === */

.accordion-wrapper h3 {
  font-size: var(--fs-xl);
}

.accordion-item {
  padding: var(--space-xs) 0 0 0;
}

.accordion-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  border-bottom: var(--border-dark);
  padding: 0 0 var(--space-xs) 0;
  margin: 0 0 var(--space-xs) 0;
  cursor: pointer;
}

.accordion-content {
  display: none;
}

.accordion-item.active .accordion-content {
  display: block;
}