/*
Theme Name: Waiken ILW
Theme URI: https://example.com/waiken-ilw
Author: Marcos Parella
Author URI: https://example.com
Description: Classic WordPress theme for Waiken ILW with header (logo left, menus right) and footer (menus left, logo right).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: waiken-ilw
*/

/* CSS Reset and base tokens */
:root {
  --brand-100: #97e2af;
  --brand-200: #0b9c9c;
  --brand-900: #075056;
  --text-900: #0c1b1f;
  --text-600: #4b5563;
  --bg-50: #f8fafc;
  --bg-900: #0b1720;
  --radius-xl: 16px;
  --container: 1200px;
}

@font-face {
  font-family: 'Neurial Grotesk';
  src: url('./assets/css/fonts/NeurialGrotesk-Light.woff2') format('woff2'),
    url('./assets/css/fonts/NeurialGrotesk-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neurial Grotesk';
  src: url('./assets/css/fonts/NeurialGrotesk-Medium.woff2') format('woff2'),
    url('./assets/css/fonts/NeurialGrotesk-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neurial Grotesk';
  src: url('./assets/css/fonts/NeurialGrotesk-Bold.woff2') format('woff2'),
    url('./assets/css/fonts/NeurialGrotesk-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: 'Neurial Grotesk';
  /* font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; */
  color: var(--text-900);
  background: #e1e1e1;
  font-weight: 300;
  color: #333;
  line-height: 1.6;
  font-size: 1.5rem;
}

b {
  font-weight: 600;
}

/* === Header (replaced) ===
   Minimal, Bootstrap-first header styles. All heavy legacy menu rules removed to avoid conflicts.
   This section only affects .site-header and immediate children. Use component-specific classes for
   further customizations instead of global selectors. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--brand-100);
  min-height: 5rem;
}

.site-header:not(.transparent-bg) {
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
}

.site-header .container,
.site-header .container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
  min-height: 7rem;
}

/* Brand */
.site-header .navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.site-header .navbar-brand img {
  max-height: 72px;
  width: auto;
  display: block;
}

/* Toggler */
.site-header .navbar-toggler {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .06);
  color: #e6f3f2;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
}

.site-header .navbar-toggler:focus {
  box-shadow: none;
}

/* Menu links minimal styling (desktop inherits bootstrap .nav-link) */
.site-header .nav-link {
  color: #fff;
  font-weight: 500;
  padding: .5rem .75rem;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  background: rgba(151, 226, 175, .08);
  color: #fff;
  border-radius: .375rem;
}

/* Desktop dropdown box (kept simple) */
.site-header .dropdown-menu {
  border: none;
}

.site-header .dropdown-item {
  color: #111827;
  font-weight: 300;
  font-size: 1.06rem;
}

.site-header .dropdown-item:active {
  background-color: var(--bs-dropdown-link-hover-bg);
}

.site-header #primary-menu-list>li:not(:last-child) {
  margin-right: 3rem;
}

.site-header #primary-menu-list li>ul.dropdown-menu.show {
  left: -2rem;
}

.site-header #primary-menu-list li>ul.dropdown-menu.show::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #ffffff;
  filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, .08));
}

/* Mobile: ensure collapse panel uses full width and brand background; keep simple and non-conflicting */
@media (max-width:991.98px) {
  .site-header .navbar-collapse.show {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    background: var(--brand-900);
    padding: 1rem;
    color: #e6f3f2;
    z-index: 1100;
  }

  .site-header .navbar-collapse .nav-link {
    color: #e6f3f2;
    padding: .9rem 1rem;
  }

  .site-header .custom-logo-link {
    position: absolute;
    left: 50%;
    margin-left: -6rem;
    top: 1.8rem;
  }

  .site-header nav>.container {
    min-height: 5rem;
  }

}

/* Remove legacy header/menu selectors to prevent conflicts below in the file.
   We comment them out so they can be restored if needed. */
/*
.menu.menu--primary,
.menu.menu--footer{ ... }
.site-header .menu.menu--primary { ... }
(site legacy header rules removed)
*/

/* End Header replacement */

/* Footer */
.site-footer {
  background: var(--brand-900);
  color: #fff;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.footer-menus {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem
}

.footer-menus a {
  color: #fff;
  text-decoration: none
}

.footer-menus a:hover,
.footer-menus a:focus {
  color: #fff;
  transform: scale(1.05);
  text-decoration: none;
}

.site-footer .copyright {
  margin-top: 1rem;
  font-size: .875rem;
  color: #cde7e1
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: .5rem
}

@media (max-width:991.98px) {
  .footer-inner {
    flex-direction: column-reverse;
    align-items: center;
    gap: 3rem;
    padding-bottom: 6rem;
    padding-top: 3rem;
  }

  .footer-logo {
    align-self: flex-end;
    width: 100%;
    display: flex;
    justify-content: center
  }

  .footer-menus a:hover,
  .footer-menus a:focus {
    background: rgba(151, 226, 175, .15);
  }
}

/* Content */
main {
  padding-block: 2rem
}

.entry-header h1 {
  margin: 0 0 1rem 0
}

.card {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid #e5e7eb;
  padding: 1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .04)
}

a.button,
.wp-block-button__link {
  display: inline-block;
  background: var(--brand-200);
  color: #052e2e;
  padding: .75rem 1rem;
  border-radius: .75rem;
  text-decoration: none;
  font-weight: 600;
}


/* === Enhanced Header & Footer Navigation === */

/* Primary menu layout: items side-by-side */
.menu.menu--primary,
.menu.menu--footer {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.menu.menu--primary>li,
.menu.menu--footer>li {
  position: relative;
}

/* Links */
.menu.menu--primary>li>a {
  display: inline-block;
  color: #e6f3f2;
  text-decoration: none;
  padding: .65rem .6rem;
  border-radius: .5rem;
  font-weight: 600;
}

.menu.menu--primary>li>a:hover,
.menu.menu--primary>li>a:focus {
  background: #ffffff29;
}

/* Dropdown (white box, black text) */
.menu.menu--primary .sub-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
  padding: .5rem;
  display: none;
  z-index: 1000;
}

.menu.menu--primary .sub-menu a {
  color: #111827;
  text-decoration: none;
  display: block;
  padding: .6rem .75rem;
  border-radius: .5rem;
}

.menu.menu--primary .sub-menu a:hover,
.menu.menu--primary .sub-menu a:focus {
  background: #f1f5f9;
}

/* Show dropdown on hover/focus */
.menu.menu--primary>li:focus-within>.sub-menu,
.menu.menu--primary>li:hover>.sub-menu {
  display: block;
}

/* Mobile dropdown uses the same container menu; ensure nested lists are visible when menu is open */
@media (max-width:991.98px) {
  .menu.menu--primary {
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
  }

  .menu.menu--primary .sub-menu {
    position: static;
    display: block;
    background: #ffffff;
    color: #111827;
    border-radius: 10px;
    padding: .25rem;
  }
}

/* Footer: top-level side-by-side; nested shown below parent */
.site-footer .menu.menu--footer>li>a {
  display: inline-block;
  line-height: 1.9;
  font-weight: 500;
  padding: 0;
}

.site-footer .menu.menu--footer .sub-menu {
  list-style: none;
  margin: .35rem 0 0 0;
  padding: 0;
}

.site-footer .menu.menu--footer .sub-menu>li>a {
  display: block;
  font-weight: 300;
}

.site-footer .menu.menu--footer>li+li {
  margin-left: 1.25rem;
}

/* Respect brand colors for focus outlines */
/* a:focus{
  outline:3px solid var(--brand-100);
  outline-offset:2px;
} */


/* === Mock-accurate dropdown (centered box with top caret) === */
.menu.menu--primary>li {
  position: relative;
}

/* Center dropdown under parent item */
.menu.menu--primary>li>.sub-menu {
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 14px);
  border-radius: 14px;
  padding: .5rem 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .20), 0 2px 6px rgba(0, 0, 0, .05);
}

/* Dropdown items look & spacing */
.menu.menu--primary>li>.sub-menu>li>a {
  font-weight: 600;
  color: #111827;
  padding: .6rem 1rem;
  line-height: 1.2;
}

.menu.menu--primary>li>.sub-menu>li>a:hover {
  background: #f2f5f7;
}

/* Match header gradient height and baseline */
.site-header .header-inner {
  padding: 1rem 0;
}

.menu.menu--primary>li>a {
  font-weight: 600;
  letter-spacing: .01em;
}



/* === Footer mock-specific styles === */
.site-footer {
  padding: 3rem 0;
  background: var(--brand-900);
}

.site-footer .footer-menus {
  width: 100%;
}

.site-footer .menu.menu--footer {
  display: grid;
  grid-auto-flow: column;
  align-items: start;
  gap: 1rem;
}

.site-footer .menu.menu--footer>li {
  min-width: 180px;
}

/* Children stacked under parent */
.site-footer .menu.menu--footer .sub-menu {
  margin: .5rem 0 0 0;
  padding: 0;
}

/* Right-aligned big logo */
.footer-logo img,
.footer-logo svg {
  max-height: 90px;
  height: auto;
  width: auto;
  padding-top: 1rem;
}

@media (max-width:991.98px) {
  .site-footer .footer-menus {
    justify-content: center;
  }

  .site-footer .menu.menu--footer {
    grid-auto-flow: row;
    gap: 0rem;
    width: 90%;
  }

  .site-footer .menu.menu--footer>li+li {
    margin-left: 0;
  }

  .site-footer .menu.menu--footer>li>a,
  .site-footer .menu.menu--footer>li>ul>li>a {
    padding: 0 0 0 2rem;
    width: 100%;
  }

  .footer-logo img {
    max-height: 64px;
    padding-top: initial;
  }
}


/* === Pure CSS reset for WP menus === */
.site-header .menu,
.site-footer .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header .menu>li,
.site-footer .menu>li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header #primary-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

/* .site-footer #footer-menu{ display:grid; grid-auto-flow:column; gap:5rem; align-items:start; } */

/* Header gradient (optional): uncomment to use gradient
.site-header{ background: linear-gradient(180deg, #0d2f3b 0%, #0f3844 100%); }
*/

/* Bootstrap-specific overrides to integrate theme visuals */
.navbar-toggler {
  border: 0;
  color: inherit
}

.navbar-toggler-icon {
  font-size: 1.15rem;
  line-height: 1
}

/* Ensure WP menu items styled like Bootstrap nav links on desktop */
.menu--primary>li>a {
  display: inline-block
}

.menu--primary>li>a.nav-link {
  padding: .5rem .75rem
}

/* .dropdown-menu{ min-width:220px } */

/* Footer collapse spacing when using Bootstrap collapse */
.menu--footer .collapse {
  padding-top: .5rem
}

/* Mobile header fixes: toggler color, collapse full-width, background and spacing */
.site-header .navbar-toggler {
  color: #e6f3f2;
  border: none;
  background: transparent;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center
}

.site-header .navbar-toggler-icon {
  color: inherit;
  font-size: 1.25rem
}

/* When collapse is shown, ensure it occupies intended area and uses brand background */
.site-header .collapse.navbar-collapse.show {
  right: 1rem;
  top: 60px;
  width: min(90vw, 360px);
  background: var(--brand-900);
  color: #e6f3f2;
  padding: .75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.site-header .collapse.navbar-collapse.show .menu--primary>li>a {
  color: #e6f3f2
}

.site-header .collapse.navbar-collapse.show .menu--primary .sub-menu {
  background: #0f2f33;
  color: #e6f3f2;
  border-radius: 10px;
  padding: .5rem
}

.site-header .collapse.navbar-collapse.show .menu--primary .sub-menu a {
  color: #e6f3f2
}

/* Ensure links are visible when collapsed and have spacing */
.site-header .menu.menu--primary>li>a {
  padding: .75rem 1rem
}

.site-header .menu.menu--primary>li {
  margin: 0
}

/* Reset any lingering display:none from earlier rules to avoid hiding items inside collapse */
.site-header .nav-primary .menu--primary {
  display: flex
}

.site-header .nav-primary .menu--primary li {
  display: list-item
}

.site-header .nav-bg {
  display: none;
  pointer-events: none;
}

.site-header:not(.transparent-bg) .nav-bg {
  background: linear-gradient(180deg, #0d2f3b 0%, #0f3844 100%);
  display: initial;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8.6rem;
  object-fit: cover;
}

.navbar {
  padding: 0.75rem 1rem;
}

/*
 * Oculta el botón de play superpuesto en videos en navegadores WebKit (Safari, Chrome)
 */
.site-header .nav-bg::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

/* Opcional: Oculta todos los controles si el anterior no es suficiente */
.site-header .nav-bg::-webkit-media-controls {
  display: none !important;
  opacity: 0 !important;
}

/* Make sure navbar-collapse uses flex column on mobile */
@media (max-width:991.98px) {
  .site-header .collapse.navbar-collapse {
    display: none
  }

  .site-header .collapse.navbar-collapse.show {
    display: flex !important;
    flex-direction: column;
  }

  .site-header:not(.transparent-bg) .nav-bg {
    height: 6.6rem;
  }
}

/* --- Ensure menu UL uses flex on large screens only (don't force on mobile) --- */
@media (min-width: 992px) {
  .site-header .nav-primary .menu--primary {
    display: flex !important;
    gap: 1.5rem;
    align-items: center;
  }

  .site-header .nav-primary .menu--primary>li {
    display: list-item;
  }
}

.navbar-brand img {
  max-height: 42px;
  width: auto;
}

/* === Mobile layout === */
@media (max-width: 991.98px) {
  .navbar {
    justify-content: center;
    position: relative;
  }

  .navbar-toggler {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
  }

  .navbar-brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}

/* === Offcanvas === */
.offcanvas-start {
  width: 100% !important;
  background: #ffffff;
  color: #111827;
  border: none;
}

.offcanvas .navbar-nav .nav-link {
  color: #000;
  font-weight: 500;
  padding: 0.75rem 1rem;
}

.offcanvas .nav-link[aria-expanded="true"] {
  background-color: #f4f9f8;
}

.offcanvas .collapse .nav-link {
  font-weight: 500;
  padding-left: 2rem;
}

.offcanvas-logo {
  max-height: 48px;
  width: auto;
  position: absolute;
  top: 0.8rem;
  left: 50%;
  margin-left: -4rem;
}

.offcanvas-body {
  padding-top: 3rem;
}

/* Ícono dropdown */
.bi-chevron-down {
  transition: transform 0.2s ease;
}

button[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}