/*
Theme Name: Axe Man
Theme URI: https://axemantt.com/
Author: Dexter Banfield
Author URI: https://dexterbanfield.com
Description: Axe Man Theme
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: axe-man
*/

/*****************************************/
/* FONTS */
/*****************************************/

@font-face {
    font-family: Choc;
    src: url(fonts/Choc.ttf);
    /*font-weight: 100;*/
}

/*************************************************/
/* VARIABLES */
/*************************************************/    

:root{
    --container: 1200px;
    --pad: 18px;

    /* Mobile navigation background colour */
    --mobile-nav-bg: #030033; /* <-- change this */
    --text: #030033;
    --muted: #666;
    --border: #030033;
    --accent: #55acee;
}

:root{
  --mobile-nav-bg: #030033; /* change to whatever you want */
}

/*************************************************/
/* COMMON */
/*************************************************/    

*{ box-sizing: border-box; }

body{ margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); font-size: 18px; line-height: 2 }

.site-main {
    overflow-x: hidden;
}

h2, h3 {
    margin-top: 0;
    padding-top: 0;
    font-family: Choc;
    font-size: 50px;
    text-transform: uppercase;
    line-height: 1.2;
}

h3 {
    font-size: 35px;
}

a {
    color: var(--text);
}

.container{
    max-width: var(--container);
    width: 100%;
    margin: 0 auto !important;
    padding: 0 var(--pad) !important;
}

.site-header{
    padding: 10px;
    background:#fff;
    position: sticky;
    top:0;
    z-index: 50;
    border-bottom: 4px solid var(--border);
}

.header-inner{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}

.logo-link{
    display:flex;
    align-items:center;
    gap: 10px;
    text-decoration:none;
    color: inherit;
}

.site-title{
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.4px;
}

.site-nav{
    display:flex;
    align-items:center;
    gap: 14px;
}

/*************************************************/
/* MENU */
/*************************************************/    

.menu{
    list-style:none;
    padding:0;
    margin:0;
    display:flex;
    gap: 18px;
    align-items:center;
}
.menu a{
    text-decoration:none;
    color: inherit;
    font-weight: 600;
}
.menu a:hover{ color: var(--accent); }

/*************************************************/
/* SOCIAL */
/*************************************************/    

.social-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width: 38px;
    height: 38px;
    color: inherit;
    text-decoration:none;
}
.social-link i{ font-size: 24px; }

.social-link i:hover{ color: var(--accent) }

/*************************************************/
/* HAMBURGER MENU */
/*************************************************/    

.hamburger{
    display:none;
    appearance:none;
    border: 2px solid var(--border);
    background:#fff;
    width: 44px;
    height: 44px;
    cursor:pointer;
    position: relative;
}

/* Hamburger lines (3 bars) made with one span + pseudo elements */
.hamburger-lines{
    position:absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 2px;
    background: #111;
    transform: translate(-50%, -50%);
    transition: transform .22s ease, background .22s ease, opacity .22s ease;
}
.hamburger-lines::before,
.hamburger-lines::after{
    content:"";
    position:absolute;
    left:0;
    width: 22px;
    height: 2px;
    background:#111;
    transition: transform .22s ease, top .22s ease, opacity .22s ease;
}
.hamburger-lines::before{ top: -7px; }
.hamburger-lines::after{ top: 7px; }

/* When open: animate to X */
.is-open .hamburger-lines{
    background: transparent;
}
.is-open .hamburger-lines::before{
    top: 0;
    transform: rotate(45deg);
}
.is-open .hamburger-lines::after{
    top: 0;
    transform: rotate(-45deg);
}

/*************************************************/
/* CONTENT */
/*************************************************/    

.content .post{
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}
.post-title{ margin: 0 0 10px; font-size: 28px; }
.post-title a{ text-decoration:none; color:inherit; }
.post-excerpt{ color: var(--muted); }

.odd-row {
    background: var(--border);
    padding: 120px 20px !important;

    clip-path: polygon(
        0 8%,
        100% 0,
        100% 92%,
        0 100%
    );
}

.vc_btn3.vc_btn3-color-black.vc_btn3-style-modern {
    font-family: Choc;
    font-size: 40px;
    background: var(--border) !important;
    text-transform: uppercase;
}

/*************************************************/
/* MOBILE MENU */
/*************************************************/    

/* Mobile panel */
.mobile-panel{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(320px, 86vw);
    background: var(--mobile-nav-bg);
    color: #fff;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 80;
    padding: 20px;
}
.mobile-panel-inner{
    padding-top: 70px; /* so it doesn't feel under the header */
    display:flex;
    flex-direction: column;
    gap: 14px;
}

.menu-mobile{
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}
.menu-mobile a{
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

/*************************************************/
/* MOBILE SOCIAL */
/*************************************************/    

.social-link.mobile{
    width: auto;
    height: auto;
    gap: 10px;
    justify-content:flex-start;
    color:#fff;
}
.social-link.mobile span{
    font-weight: 700;
    font-size: 18px;
}

.social-link.mobile:hover {
    color: var(--accent);
}

/* Overlay */
.mobile-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 70;
}

/* Open state */
body.nav-open .mobile-panel{
    transform: translateX(0);
}

/*************************************************/
/* CAROUSEL */
/*************************************************/    

.axe-carousel{
  height: 500px;
  overflow: hidden;
  position: relative;
  width: 100%;
  border-bottom: 4px solid var(--border);
  overflow-x: auto;
}

/* Default: allow vertical page scroll starting on the carousel */
.axe-carousel,
.axe-carousel *{
  touch-action: pan-y;
}

.axe-carousel__track{
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;

  /* iOS-friendly compositor hints */
  transform: translate3d(0,0,0);
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;

  /* Desktop auto-scroll */
  animation: axeCarouselScroll 100s linear infinite;
}

.axe-carousel__item{
  height: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 1px; /* tiny nudge reduces rounding jitter */
}

.axe-carousel__item img{
  height: 100%;
  width: auto;
  max-height: 100%;
  max-width: 90vw;
  object-fit: cover;
  display: block;
  image-orientation: from-image;
}

/* Uses pixel distance that JS sets via --axe-scroll-distance */
@keyframes axeCarouselScroll{
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(calc(-1 * var(--axe-scroll-distance, 0px)),0,0); }
}

/* Pause on hover (desktop) */
.axe-carousel:hover .axe-carousel__track{
  animation-play-state: paused;
}

/* Reduced motion: slow down instead of disabling */
@media (prefers-reduced-motion: reduce){
  .axe-carousel__track{
    animation-duration: 120s;
  }
}

/* =========================
   Mobile: swipe only
   ========================= */
@media (hover: none) and (pointer: coarse) {
  .axe-carousel{
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  /* IMPORTANT: allow horizontal swipes even when touch starts on an image */
  .axe-carousel,
  .axe-carousel *{
    touch-action: pan-x pan-y;
  }

  .axe-carousel__track{
    animation: none !important;
    transform: none !important;
    will-change: auto;
  }

  .axe-carousel__item{
    scroll-snap-align: start;
  }

  /* Optional: hide scrollbar */
  .axe-carousel::-webkit-scrollbar{ display: none; }
  .axe-carousel{ scrollbar-width: none; }
}

/* =========================
   Mobile swipe hint overlay
   ========================= */
.axe-carousel__hint{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;

  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;

  background: rgba(0,0,0,0.65);
  color: #fff;

  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.axe-carousel__hint.is-visible{
  opacity: 1;
}

/* Don’t show hint on desktop */
@media (hover: hover) and (pointer: fine){
  .axe-carousel__hint{ display: none; }
}

/*************************************************/
/* PAGE CONTENT */
/*************************************************/    

.wpb_row {
    padding: 40px 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.odd-row {
    background: var(--border);
    color: #fff;
}

.odd-row a {
    color: #fff;
}

.no-bottom-padding {
    padding-bottom: 0;
}

.no-top-padding {
    padding-top: 0;
}

/*************************************************/
/* IMAGE BORDERS */
/*************************************************/    

.wpb_single_image {
    padding: 20px;
    border: dotted 10px var(--accent);
}

/*************************************************/
/* GRAVITY FORM */
/*************************************************/    

.gfield_label.gform-field-label {
    color: #fff !important;
    font-size: 18px !important;
}

.gfield_required.gfield_required_text {
    color: var(--accent) !important;
}

.gform-field-label.gform-field-label--type-sub {
    color: #fff !important;
}

#gform_submit_button_1 {
    padding: 10px 10px 0 10px;
    background: var(--accent);
    color: var(--border);
    font-size: 60px;
    font-family: Choc;
    text-transform: uppercase;
    line-height: 1 !important;
}

/*************************************************/
/* SCROLL TO TOP */
/*************************************************/    

#scrollTopBtn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: #111;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 25px rgba(0,0,0,0.2);

    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all .3s ease;
    z-index: 999;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    background: #333;
}

/*************************************************/
/* RESPONSIVE */
/*************************************************/    

@media (max-width: 768px) {

    .wpb_row.reverse-order {
        display: flex;
        flex-direction: column;
    }

    /* First column becomes second */
    .wpb_row.reverse-order > .wpb_column:first-child {
        order: 2;
        width: 100%;
    }

    /* Second column becomes first */
    .wpb_row.reverse-order > .wpb_column:last-child {
        order: 1;
        width: 100%;
    }

}

/* Responsive rules */
@media (max-width: 980px){

    body { font-size: 16px; }

    .menu-desktop{ display:none; }
    .social-link-desktop { display: none }
    .hamburger{ display:inline-flex; align-items:center; justify-content:center; }

    h2, h3 {
        font-size: 40px;
    }

    h3 {
        font-size: 25px;
    }

    .social-link.mobile span{
        font-size: 16px;
    }

    #about-the-boat,
    #accomodation {
        scroll-margin-top: 100px;
    }

    #booking {
        scroll-margin-top: -10px;
    }

    .odd-row {
        background: var(--border);
        padding: 120px 20px;

        clip-path: polygon(
            0 4%,
            100% 0,
            100% 96%,
            0 100%
        );
    }

    #gform_submit_button_1 {
        font-size: 50px;
    }

    .gfield_label.gform-field-label {
        font-size: 16px !important;
    }

}

@media (max-width: 500px){

    .site-header{
        padding: 10px 0;
    }

    h2, h3 {
        font-size: 30px;
    }

    h3 {
        font-size: 15px;
    }

    .no-top-padding .vc_column-inner {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .axe-carousel{
      height: 450px;
    }

    #gform_submit_button_1 {
        font-size: 40px;
    }

}