/*
Theme Name: Surfpro Cold Hawaii
Theme URI: https://pcservicecenter.dk
Author: PC Service Center
Author URI: https://pcservicecenter.dk
Description: Custom tema med Surfpro-lignende header. Indhold styres via pagebuilder.
Version: 1.0
Text Domain: surfpro-pc
*/

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

@font-face {
    font-family: 'Recoleta';
    src: url('fonts/recoleta/recoletabold.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #ffffff;
    background: #f0f0f0;
}

h1, h2, h3, h4 {
    font-family: 'Recoleta', serif !important;
}

/* ---------- HEADER ---------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #738ca1; /* ca. samme farve som på screenshot */
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 10px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;

}

/* Logo */

.site-branding {
    display: flex;
    align-items: center;
    margin-right: 32px;
}

.site-logo img {
    display: block;

    width: auto;
}

/* Navigation */

.main-navigation {
    flex: 1;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-navigation li {
    position: relative;
    margin-right: 38px;
}

.main-navigation a {
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: #ffffff;
    padding: 8px 0;
}

.main-navigation .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 6px;
    margin-left: 6px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='white' stroke-width='2.0' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-size: contain;
    transform: translateY(2px);
}


/* ---------- MEGA MENU (global panel) ---------- */

.mega-menu--global {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    background: #738ca1;
    padding: 40px 120px;
    display: none;
}

/* Vis mega-menu når første menupunkt er hovered (moderne browsere med :has) */
.site-header:has(.main-navigation .menu > li:first-child:hover) .mega-menu--global {
    display: block;
}

.mega-menu-inner {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    max-width: 1440px;
    margin: 0 auto;
}

.mega-menu-left-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color:#FFF
}
.mega-menu-list a{
  color:#fff;
  text-decoration: none;
  font-size: 18px;
}

.mega-menu-left ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-left li {
    margin-bottom: 8px;
    font-size: 13px;
    opacity: 0.9;
}

/* Cards */

.mega-menu-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.mega-card {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background-size: 100%;
    background-position: center center;
    min-height: 180px;
     transition: background-size 0.4s ease;
}

.mega-card:hover {
  background-size: 110%;
}

.mega-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.05));
}

.mega-card-title {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    font-size: 26px;
    font-weight: 700;
    color:#fff;
}

/* Eksempel-billeder – byt til rigtige URLs fra mediebiblioteket */
.mega-card--bolgesurf {
    background-image: url('https://via.placeholder.com/420x220?text=B%C3%B8lgesurf');
}
.mega-card--wingfoil {
    background-image: url('https://via.placeholder.com/420x220?text=Wingfoil');
}
.mega-card--windsurf {
    background-image: url('https://via.placeholder.com/420x220?text=Windsurf');
}

/* ---------- UTILITIES HØJRE SIDE ---------- */

.header-utilities {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 40px;
    font-size: 11px;
}

.header-language {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.header-language span:last-child {
    font-size: 9px;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Simple runde ikoner */
.icon-circle {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* ---------- MAIN / FOOTER ---------- */

.site-main {
    margin-top: 80px; /* plads til fixed header */
}

.site-main > *:first-child {
    margin-top: 0;
}

.site-footer {
    padding: 40px 32px;
    text-align: left;
    color: #ddd;
    background: #111;
    font-size: 13px;
}

/* credit-linje */
.site-footer small {
    display: block;
    margin-top: 6px;
    opacity: 0.7;
}

/* Lille breakpoint – ikke fuld mobil-menu, bare lidt spacing */
@media (max-width: 960px) {
    .header-inner {
        padding: 10px 16px;
    }

    .main-navigation li {
        margin-right: 18px;
    }

    .mega-menu--global {
        display: none !important; /* hold det simpelt på mobile */
    }

    .header-utilities {
        display: none; /* kan aktiveres igen hvis du laver mobil-ikoner */
    }
}



/* -------------------------------------------------
   FIX: WP dropdown submenu skal være skjult indtil hover
   ------------------------------------------------- */
.main-navigation .menu li {
  position: relative;
}

.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #738ca1;
  padding: 10px 0;
  margin: 0;
  min-width: 220px;
  z-index: 2000;
}

.main-navigation .sub-menu li {
  margin: 0;
}

.main-navigation .sub-menu a {
  padding: 10px 16px;
  width: 100%;
  display: block;
  font-size: 13px;
  font-weight: 600;
}

/* Vis dropdown ved hover og keyboard navigation */
.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}

/* -------------------------------------------------
   FIX: Mega menu skal ikke afhænge af :has()
   Mega vises kun når body har class .mega-open
   ------------------------------------------------- */
.mega-menu--global {
  display: none !important;
}

body.mega-open .mega-menu--global {
  display: block !important;
}


/* WordPress sub-menu bruges kun som datakilde */
.main-navigation .sub-menu {
    display: none !important;
}

/* Mega menu styres via body class */
.mega-menu--global {
    display: none;
}

body.mega-open .mega-menu--global {
    display: block;
}

.custom-logo{
  height: 80px !important;
  width: 80px !important;
  z-index: 2;
  position: relative;
}
footer .custom-logo{
  height: 160px !important;
  width: 160px !important;
  z-index: 2;
  position: relative;
}

/* Sørg for at mega-menu overlapper headeren lidt,
   så der ikke er et "hul" musen falder igennem */
.mega-menu--global {
  margin-top: -35px;
    padding-top: 75px;
}


/* -----------------------------
   SEARCH OVERLAY
----------------------------- */

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    z-index: 3000;
}

body.search-open .search-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay-inner {
    width: 100%;
    max-width: 600px;
    padding: 40px;
}

.search-form {
    display: flex;
    gap: 12px;
}

.search-field {
    flex: 1;
    font-size: 22px;
    padding: 12px 16px;
    border: none;
    outline: none;
}

.search-submit {
    font-size: 16px;
    padding: 12px 20px;
    cursor: pointer;
}

.search-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 32px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}


/* ---------- FOOTER (Surfpro style) ---------- */
.site-footer{
  background:#738ca1;
  color:#111;
  padding: 70px 0;
}

.footer-inner{
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 0.9fr;
  gap: 80px;
  align-items: start;
}

.footer-title{
  font-weight: 700;
  margin-bottom: 18px;
  font-size: 18px;
}

.footer-text{
  font-size: 16px;
  line-height: 1.9;
  opacity: 0.9;
}

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

.footer-menu li{
  margin: 0 0 12px 0;
}

.footer-menu a{
  color:#111;
  text-decoration:none;
  font-size:16px;
  opacity:0.9;
}

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

.footer-logo-col{
  display:flex;
  justify-content:flex-end;
}

.footer-logo img{
  width: 140px;         /* justér til at matche screenshot */
  height: auto;
  display:block;
}

.footer-social{
  margin-top: 60px;
  display:flex;
  gap: 18px;
  align-items:center;
}

.footer-social-icon{
  display:inline-flex;
  width: 26px;
  height: 26px;
  align-items:center;
  justify-content:center;
  color:#111;
  text-decoration:none;
  font-weight:700;
  font-size:18px;
}

/* Mobil */
@media (max-width: 959px){
  .footer-inner{
    padding: 0 24px;
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-logo-col{
    justify-content:flex-start;
  }
  .footer-social{
    margin-top: 30px;
  }
}


/* Mega menu left list - stagger animation */
.mega-menu-list li {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.mega-menu-list li.is-in {
  opacity: 1;
  transform: translateY(0);
}


/* Stagger animation for mega left list */
.mega-menu-list li {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms ease, transform 300ms ease;
  transition-delay: var(--d, 0ms);
}

.mega-menu-list.is-animating li {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .mega-menu-list li {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
