/*
Theme Name: CycleBar
Theme URI: https://cyclebarcastrovalley.com
Author: Matt Pleli
Description: Clean CycleBar theme styles for header, nav, CTA, and footer. Elementor controls page content.
Version: 0.2.1
Text Domain: cyclebar
*/

/* =Base
-------------------------------------------------------------- */

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    color: #f1f1f1;
    background-color: #000000;
}

/* Links */

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

a:hover,
a:focus {
    text-decoration: underline;
}

/* Simple content padding for non-Elementor templates */

.page-content {
    padding: 40px 24px;
}

/* Headings */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin: 0 0 0.5em;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }

p {
    margin: 0 0 1em;
}

/* Utility container */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =Header
-------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    background-color: #000000;
}

/* Announcement banner */

.announcement-banner {
    background-color: #d0021b;
    color: #ffffff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.announcement-banner__container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 24px;
}

.announcement-banner__copy p {
    margin: 0;
}

.announcement-banner__copy a {
    font-weight: 600;
    text-decoration: underline;
}

/* Global nav wrapper and background bar */

.global-nav-wrapper {
    background-color: transparent;
    color: #ffffff;
}

.global-nav__bg {
    display: none;
}

/* Main nav */

.global-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
}

.global-nav__content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Skip link */

.global-nav__skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.global-nav__skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 8px 12px;
    background: #ffffff;
    color: #000000;
    z-index: 1001;
}

/* Logo */

.navbar-header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.global-nav__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.global-nav__logo-img {
    display: block;
    max-height: 32px;
    width: auto;
}

/* Primary menu */

.global-nav__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    flex: 1 1 auto;
}

.primary-menu {
    flex: 1 1 auto;
}

.primary-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}

.primary-menu__list a {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Header CTA button */

.button,
.cta_button {
    font-family: inherit;
}

.button.cta_button.cta_button--primary {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 999px;
    background-color: #d0021b;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
    transition: background-color 0.2s ease-in-out;
}

.button.cta_button.cta_button--primary:hover,
.button.cta_button.cta_button--primary:focus {
    background-color: #ff2b39;
    text-decoration: none;
}

/* Mobile menu toggle */

.menu-open {
    display: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin-left: 8px;
    cursor: pointer;
    box-shadow: none;
    width: 40px;
    height: 32px;
    align-items: center;
    justify-content: center;
    /*1/1 fix for hamburger*/
    flex-direction: column;
    gap: 4px;
}

/* keep button transparent, no red */

.site-header .menu-open,
.global-nav-wrapper .menu-open {
    background: #000000 !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* each .bar span is one line */

.menu-open .menu-open__bar {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    margin: 0 !important;
    background-color: #ffffff !important;
    border-radius: 2px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* extra safety */

.site-header .menu-open .menu-open__bar,
.global-nav-wrapper .menu-open .menu-open__bar {
    background-color: #ffffff !important;
}

/* When JS toggles global-nav--open on the nav */

.global-nav--open .primary-menu {
    display: block;
}

.global-nav--open .global-nav__bg {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

/* =Footer
-------------------------------------------------------------- */

.cb-footer {
    background-color: #000000;
    color: #f1f1f1;
    padding: 40px 0 24px;
    font-size: 14px;
}

/* Social row */

.cb-footer-social {
    padding: 16px 0 8px;
}

.cb-footer-social-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Footer headings and "Follow us" label */

.cb-footer-heading,
.global-footer__heading,
.cb-footer-social-label,
.global-footer__social-text,
.global-footer__social-text--large {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 20px;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.cb-footer-social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-footer-social-icons a svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Divider */

.cb-footer-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 16px 0 24px;
}

/* Footer nav columns */

.cb-footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 64px;
    justify-content: space-between;
}

.cb-footer-col {
    min-width: 150px;
}

.cb-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cb-footer-menu li + li {
    margin-top: 4px;
}

.cb-footer-menu a {
    font-size: 14px;
}

.cb-footer-menu a:hover,
.cb-footer-menu a:focus {
    text-decoration: underline;
}

/* Footer bottom */

.cb-footer-bottom {
    margin-top: 24px;
}

.cb-footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cb-footer-bottom-left {
    font-size: 12px;
}

.cb-footer-logo {
    max-height: 24px;
    width: auto;
}

/* Legal links */

.cb-footer-legal-bar {
    margin-top: 16px;
}

.cb-footer-legal-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
}

.cb-footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.cb-footer-legal-link {
    opacity: 0.8;
}

.cb-footer-legal-link:hover,
.cb-footer-legal-link:focus {
    opacity: 1;
}

/* =Responsive
-------------------------------------------------------------- */

@media (max-width: 960px) {
    .global-nav {
        padding: 10px 16px;
    }

    /* Anchor mobile dropdown to the sticky header */
    .site-header .global-nav {
        position: relative !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }   

    .site-header .global-nav__content-wrapper {
        width: 100% !important;
    }

    .navbar-header__container {
        gap: 16px;
    }

    .global-nav__actions {
        justify-content: flex-end;
        gap: 16px;
    }

    .site-header .primary-menu {
        display: none;
        position: absolute !important;
        top: 100% !important;

        /* key change, make it follow the full header width */
        left: 50% !important;
        right: auto !important;
        width: 100vw !important;
        transform: translateX(-50%) !important;

        background-color: #000000;
        padding: 16px 24px 24px;
        z-index: 2000 !important;
    }


    .primary-menu__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Hide header CTA pill on mobile when hamburger shows */

    .global-nav__actions .button.cta_button.cta_button--primary {
        display: none !important;
    }

    .menu-open {
        display: flex;
    }

    .cb-footer-social-inner,
    .cb-footer-bottom-inner,
    .cb-footer-legal-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cb-footer-columns {
        flex-direction: column;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .announcement-banner__container {
        padding-inline: 12px;
        text-align: center;
    }

    .global-nav__logo-img {
        max-height: 28px;
    }
}

/* Mobile hamburger and menu behavior */
@media (max-width: 960px) {
  .navbar-header__container {
    position: relative;
  }

  .global-nav__actions .button.cta_button.cta_button--primary {
    display: none !important;
  }

.site-header .menu-open {
  display: flex !important;
  position: absolute !important;
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  background: #000000  !important;
  border: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  z-index: 99999 !important;
  border-radius: 4px;

  flex-direction: column !important;
  gap: 6px !important;
  align-items: center !important;
  justify-content: center !important;
}

.site-header .menu-open .menu-open__bar {
  display: block !important;
  width: 24px !important;
  height: 2px !important;
  margin: 0 !important;
  background-color: #ffffff !important;
  border-radius: 2px !important;
  opacity: 1 !important;
  visibility: visible !important;
}


  /* .primary-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: #000000;
    padding: 16px 24px 24px;
  } */

  .primary-menu__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .global-nav--open .primary-menu {
    display: block;
  }

  .global-nav--open .global-nav__bg {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
  }
}

@media (min-width: 961px) {
  .menu-open {
    display: none !important;
  }
}
