/*
Theme Name: MarSea Tours 3.1.4
Theme URI: https://marseatours.com/
Description: Child theme for MarSea Tours (parent folder marsea-tours-2.0.10) with dedicated desktop and mobile navigation, Captain Log styling, portal spacing fixes, bold navigation, and corrected homepage CTA styling.
Author: MarSea Tours
Version: 3.1.5
Template: marsea-tours-2.0.10
Text Domain: marsea-tours-2-0-17
*/

/* ========================================
   MARSEA STAFF + CAPTAIN PORTALS
   ======================================== */

body:is(.marsea-portal-page, .page-id-567, .page-id-576)
.marsea-generic-inner > .wp-block-post-title {
  display: none !important;
}

body:is(.marsea-portal-page, .page-id-567, .page-id-576)
.marsea-generic-main {
  margin-top: 0 !important;
  padding-top: 75px !important;
}

body:is(.marsea-portal-page, .page-id-567, .page-id-576)
.marsea-generic-inner,
body:is(.marsea-portal-page, .page-id-567, .page-id-576)
.marsea-generic-inner > .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body:is(.marsea-portal-page, .page-id-567, .page-id-576)
.entry-content > :is(.mcp, .mtfsp) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ========================================
   CAPTAIN LOG POSTS
   ======================================== */

.marsea-generic-inner:has(.captain-log-marker) > .marsea-post-featured {
  display: none !important;
}

.marsea-generic-inner:has(.captain-log-marker)
.marsea-post-meta .wp-block-post-author-name {
  display: none !important;
}

.marsea-generic-inner:has(.captain-log-marker)
.wp-block-post-content {
  width: 100% !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.marsea-generic-inner:has(.captain-log-marker)
.wp-block-post-content .wp-block-image {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 42px !important;
  margin-bottom: 42px !important;
}

.marsea-generic-inner:has(.captain-log-marker)
.wp-block-post-content .wp-block-image img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.marsea-generic-inner:has(.captain-log-marker)
.wp-block-post-content > .wp-block-group:last-child {
  width: 100% !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

.marsea-generic-inner:has(.captain-log-marker)
.wp-block-post-content > .wp-block-group:last-child h2,
.marsea-generic-inner:has(.captain-log-marker)
.wp-block-post-content > .wp-block-group:last-child p {
  text-align: center !important;
}

.marsea-generic-inner:has(.captain-log-marker)
.wp-element-button {
  display: inline-block !important;
  background: #18B9D7 !important;
  color: #FFFFFF !important;
  border-radius: 999px !important;
  padding: 14px 30px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

/* ========================================
   HEADER BASE
   ======================================== */

.site-header {
  position: relative;
  z-index: 1000;
  background: #fff;
}

.site-header-inner {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.site-logo {
  flex: 0 0 auto;
  margin: 0 !important;
}

.desktop-header-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 22px !important;
  margin-left: auto !important;
}

.marsea-mobile-menu {
  display: none;
}

/* ========================================
   MOBILE HEADER - native details menu
   ======================================== */

@media (max-width: 767px) {
  .site-header {
    border: 0 !important;
    box-shadow: none !important;
  }

  .site-header-inner {
    width: calc(100% - 30px) !important;
    max-width: none !important;
    min-height: 82px !important;
    margin: 0 auto !important;
    padding: 12px 0 !important;
  }

  .site-logo {
    width: 190px !important;
    max-width: calc(100% - 70px) !important;
  }

  .site-logo img {
    display: block !important;
    width: 190px !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .desktop-header-actions {
    display: none !important;
  }

  .marsea-mobile-menu {
    display: block !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
  }

  .marsea-mobile-menu > summary {
    list-style: none !important;
  }

  .marsea-mobile-menu > summary::-webkit-details-marker {
    display: none !important;
  }

  .marsea-mobile-menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 6px !important;
    cursor: pointer !important;
  }

  .marsea-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
  }

  .marsea-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #06233E;
    border-radius: 2px;
  }

  .marsea-mobile-menu-panel {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    padding: 0;
    margin: 0;
    background: #fff;
    z-index: 999999;
    overflow-y: auto;
  }

  .marsea-mobile-menu[open] .marsea-mobile-menu-panel {
    display: block;
  }

  .marsea-mobile-menu[open] .marsea-mobile-menu-toggle {
    position: fixed !important;
    top: 22px !important;
    right: 18px !important;
    z-index: 1000001 !important;
    opacity: 1 !important;
    background: #fff;
  }

  .marsea-mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: 14px 20px;
    border-bottom: 1px solid #e7edf2;
  }

  .marsea-mobile-logo img {
    display: block;
    width: 190px;
    max-width: 70vw;
    height: auto;
  }

  .marsea-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 42px;
    line-height: 1;
    color: #06233E;
    pointer-events: none;
  }

  .marsea-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 28px 24px 44px;
  }

  .marsea-mobile-links a {
    display: block;
    padding: 18px 4px;
    border-bottom: 1px solid #e7edf2;
    color: #06233E !important;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
  }

  .marsea-mobile-links .marsea-mobile-book {
    margin-top: 26px;
    padding: 14px 24px;
    border: 0;
    border-radius: 999px;
    background: #18B9D7;
    color: #fff !important;
    text-align: center;
  }

  .marsea-generic-inner:has(.captain-log-marker) {
    width: calc(100% - 30px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .marsea-generic-inner:has(.captain-log-marker) .wp-block-post-content {
    width: 100% !important;
    max-width: none !important;
  }
}


/* ========================================
   HEADER NAVIGATION WEIGHT
   ======================================== */

.desktop-navigation .wp-block-navigation-item__content {
  font-weight: 800 !important;
}

@media (max-width: 767px) {
  .marsea-mobile-links a:not(.marsea-mobile-book) {
    font-weight: 800 !important;
  }
}

/* ========================================
   HOMEPAGE FINAL CTA BUTTON FIX
   ======================================== */

/* The parent theme gives .button-white a white rectangular wrapper.
   Keep the aqua pill button but remove the white box around it. */
.premium-final-cta .wp-block-button.button-white {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.premium-final-cta .wp-block-button.button-white .wp-block-button__link {
  margin: 0 !important;
}

/* The actual native summary remains visible and operable as the close control. */
.marsea-mobile-menu[open] .marsea-hamburger{display:none}
.marsea-mobile-menu[open] .marsea-mobile-menu-toggle::after{content:"×";font-size:42px;line-height:1;color:#06233E}
.marsea-mobile-menu[open] .marsea-mobile-close{visibility:hidden}
body.marsea-menu-open{overflow:hidden}
.marsea-mobile-menu-toggle:focus-visible{outline:3px solid #087b99;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.marsea-mobile-menu-panel{scroll-behavior:auto}}

/* Homepage: protect the copy and let the boat photograph shine through. */
body.home .cinematic-hero > .wp-block-cover__background {
  opacity: 1 !important;
  background: linear-gradient(90deg, rgba(3,38,65,.88) 0%, rgba(3,38,65,.78) 28%, rgba(3,38,65,.55) 43%, rgba(3,38,65,.16) 56%, rgba(3,38,65,0) 70%, rgba(3,38,65,0) 100%) !important;
}
@media (max-width: 760px) {
  body.home .cinematic-hero > .wp-block-cover__background {
    background: linear-gradient(180deg, rgba(3,38,65,.82) 0%, rgba(3,38,65,.68) 50%, rgba(3,38,65,.22) 100%) !important;
  }
}

body.home .cinematic-hero .hero-text-link a { color: #c6f3fb !important; }

/* Compact, responsive public site footer. */
.mst-site-footer{background:#133a56;color:#fff;padding:36px 24px 24px;font-size:18px;line-height:1.5;margin-top:0}
.mst-site-footer *{box-sizing:border-box}
.mst-site-footer-inner{max-width:1280px;margin:0 auto}
.mst-site-footer a{color:#fff!important;text-decoration:none!important}
.mst-site-footer a::after{content:none!important}
.mst-site-footer a:hover{text-decoration:underline!important;text-underline-offset:4px}
.mst-site-footer a:focus-visible{outline:3px solid #13b4ca;outline-offset:5px}
.mst-site-footer p{margin:0;color:#d4e5ef;font-size:16px;line-height:1.5}
.mst-site-footer-top{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.mst-site-footer-brand>a{font-size:24px;font-weight:800}
.mst-site-footer-brand p{margin-top:6px}
.mst-site-footer-nav{display:flex;flex-wrap:wrap;gap:14px 24px;font-size:18px;font-weight:700}
.mst-site-footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px 24px;flex-wrap:wrap;border-top:1px solid #426178;margin-top:26px;padding-top:20px}
.mst-site-footer-bottom nav{display:flex;gap:12px 22px;flex-wrap:wrap;font-size:16px}
@media(max-width:760px){.mst-site-footer{padding:30px 20px 24px}.mst-site-footer-top,.mst-site-footer-bottom{align-items:flex-start;flex-direction:column}.mst-site-footer-nav{gap:12px 20px}}

/* A subtle MarSea turquoise divider anchors the white navigation. */
.site-header { border-bottom: 2px solid #13b4ca !important; }
