/*
Theme Name: Floorstack Golf in Europe
Theme URI: https://floor-it.eu/
Description: Golf in Europe child theme on the Floorstack WordPress foundation.
Author: Floor-IT
Author URI: https://floor-it.eu/
Template: floorstack
Version: 0.4.0
Text Domain: floorstack-gie
*/

:root {
  --gie-green: #1f5d42;
  --gie-green-dark: #174733;
  --gie-green-soft: #edf5f0;
}

.gie-site-header {
  border-bottom: 1px solid var(--wp--preset--color--border);
  background: var(--wp--preset--color--surface);
}

.gie-site-header__inner,
.gie-site-footer__inner {
  max-width: var(--wp--style--global--wide-size);
  margin: 0 auto;
  padding: 1rem var(--wp--preset--spacing--md);
}

.gie-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.gie-site-header .wp-block-site-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.gie-site-header .wp-block-site-title a,
.gie-site-footer a {
  color: inherit;
  text-decoration: none;
}

.gie-desktop-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: .95rem;
}

.gie-desktop-nav a {
  color: var(--wp--preset--color--text);
  text-decoration: none;
}

.gie-desktop-nav a:hover,
.gie-desktop-nav a:focus-visible {
  color: var(--gie-green);
}

.gie-mobile-menu {
  display: none;
  position: relative;
}

.gie-mobile-menu summary {
  cursor: pointer;
  font-weight: 700;
}

.gie-mobile-menu nav {
  position: absolute;
  right: 0;
  z-index: 20;
  min-width: 220px;
  margin-top: .5rem;
  padding: .75rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: .5rem;
  background: var(--wp--preset--color--surface);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

.gie-mobile-menu a {
  display: block;
  padding: .55rem .25rem;
  color: var(--wp--preset--color--text);
  text-decoration: none;
}

.gie-site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--wp--preset--color--border);
  background: var(--wp--preset--color--surface);
}

.gie-site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  font-size: .9rem;
  color: var(--wp--preset--color--text-muted);
}

.gie-site-footer__credit a {
  font-weight: 700;
  color: var(--gie-green);
}

.gie-breadcrumbs {
  margin: 0 0 1.25rem;
  font-size: .9rem;
  color: var(--wp--preset--color--text-muted);
}

.gie-breadcrumbs a {
  color: inherit;
}

.gie-course-facts,
.gie-nearby-courses {
  max-width: 100%;
}

.wp-site-blocks main {
  min-height: 55vh;
}

@media (max-width: 760px) {
  .gie-desktop-nav { display: none; }
  .gie-mobile-menu { display: block; }
  .gie-site-header__inner { padding-top: .8rem; padding-bottom: .8rem; }
  .gie-site-footer__inner { display: block; }
  .gie-site-footer__credit { margin-top: .5rem; }
}

.gie-directory-hub-title {
  max-width: var(--wp--style--global--wide-size);
  margin: 0 auto;
  padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--md) var(--wp--preset--spacing--md);
}

.gie-directory-hub-title > h1 {
  margin: 0;
}

.gie-theme-control {
  display: flex;
  align-items: center;
}

.gie-theme-toggle {
  min-height: 40px;
  min-width: 78px;
  padding: 8px 14px;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 999px;
  background: var(--wp--preset--color--surface-alt);
  color: var(--wp--preset--color--text);
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.gie-theme-toggle:hover {
  background: var(--gie-green-soft);
}

.gie-theme-toggle:focus-visible {
  outline: 2px solid var(--gie-green);
  outline-offset: 2px;
}

.gie-theme-toggle__label--light {
  display: none;
}

html[data-gie-resolved="dark"] .gie-theme-toggle__label--dark {
  display: none;
}

html[data-gie-resolved="dark"] .gie-theme-toggle__label--light {
  display: inline;
}

.gie-theme-control--mobile {
  display: flex;
  padding: .8rem 0 0;
  margin-top: .35rem;
  border-top: 1px solid var(--wp--preset--color--border);
}

.gie-theme-control--mobile .gie-theme-toggle {
  width: 100%;
}

html[data-gie-resolved="dark"] {
  --wp--preset--color--background: #111814;
  --wp--preset--color--surface: #17211b;
  --wp--preset--color--surface-alt: #1f2b24;
  --wp--preset--color--text: #edf5ef;
  --wp--preset--color--text-muted: #aebdb2;
  --wp--preset--color--border: #33463a;
  --wp--preset--color--primary: #d8e8dd;
  --wp--preset--color--primary-contrast: #132018;
  --wp--preset--color--secondary: #90a498;
  --wp--preset--color--accent: #79c99a;
  --gie-green: #79c99a;
  --gie-green-dark: #9edbb5;
  --gie-green-soft: #20352a;
}

html[data-gie-resolved="dark"] body,
html[data-gie-resolved="dark"] .wp-site-blocks {
  background: var(--wp--preset--color--background);
  color: var(--wp--preset--color--text);
}

html[data-gie-resolved="dark"] .gie-site-header,
html[data-gie-resolved="dark"] .gie-site-footer,
html[data-gie-resolved="dark"] .gie-mobile-menu nav {
  background: var(--wp--preset--color--surface);
  border-color: var(--wp--preset--color--border);
}

html[data-gie-resolved="dark"] .gie-desktop-nav a,
html[data-gie-resolved="dark"] .gie-mobile-menu a,
html[data-gie-resolved="dark"] .gie-site-header .wp-block-site-title a {
  color: var(--wp--preset--color--text);
}

html[data-gie-resolved="dark"] a {
  color: var(--wp--preset--color--accent);
}

html[data-gie-resolved="dark"] .gie-course-facts,
html[data-gie-resolved="dark"] .gie-nearby-courses__list li,
html[data-gie-resolved="dark"] .card,
html[data-gie-resolved="dark"] .geodir-search-container,
html[data-gie-resolved="dark"] .geodir-categories-container {
  background-color: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--text);
  border-color: var(--wp--preset--color--border) !important;
}

html[data-gie-resolved="dark"] .text-dark,
html[data-gie-resolved="dark"] .text-reset,
html[data-gie-resolved="dark"] .card,
html[data-gie-resolved="dark"] .card-body,
html[data-gie-resolved="dark"] .card-footer,
html[data-gie-resolved="dark"] .form-label,
html[data-gie-resolved="dark"] .geodir_post_meta,
html[data-gie-resolved="dark"] .geodir-entry-title,
html[data-gie-resolved="dark"] .geodir-entry-title a {
  color: var(--wp--preset--color--text) !important;
}

html[data-gie-resolved="dark"] .text-muted {
  color: var(--wp--preset--color--text-muted) !important;
}

html[data-gie-resolved="dark"] input,
html[data-gie-resolved="dark"] select,
html[data-gie-resolved="dark"] textarea,
html[data-gie-resolved="dark"] .form-control,
html[data-gie-resolved="dark"] .input-group-text {
  background-color: #121b16 !important;
  color: var(--wp--preset--color--text) !important;
  border-color: var(--wp--preset--color--border) !important;
}

html[data-gie-resolved="dark"] input::placeholder,
html[data-gie-resolved="dark"] textarea::placeholder {
  color: var(--wp--preset--color--text-muted) !important;
  opacity: .85;
}

html[data-gie-resolved="dark"] .btn-primary {
  background-color: #2f7653 !important;
  border-color: #2f7653 !important;
  color: #fff !important;
}

html[data-gie-resolved="dark"] .btn-outline-primary {
  border-color: #79c99a !important;
  color: #d9f1e2 !important;
}

html[data-gie-resolved="dark"] .btn-outline-primary:hover,
html[data-gie-resolved="dark"] .btn-outline-primary:focus {
  background-color: #2f7653 !important;
  color: #fff !important;
}

html[data-gie-resolved="dark"] .alert-info,
html[data-gie-resolved="dark"] .alert-warning,
html[data-gie-resolved="dark"] .alert-danger,
html[data-gie-resolved="dark"] .alert-success {
  color: var(--wp--preset--color--text);
  border-color: var(--wp--preset--color--border);
}

@media (prefers-color-scheme: dark) {
  html:not([data-gie-resolved]) {
    color-scheme: dark;
  }
}

@media (max-width: 760px) {
  .gie-theme-control--desktop {
    display: none;
  }
}

/* Visual polish: GeoDirectory + Floorstack alignment */
.gie-site-header__inner {
  min-height: 72px;
}

.gie-desktop-nav {
  gap: 1.15rem;
}

.gie-desktop-nav a {
  position: relative;
  padding: .35rem 0;
  font-weight: 600;
}

.gie-desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--gie-green);
  transition: right .18s ease;
}

.gie-desktop-nav a:hover::after,
.gie-desktop-nav a:focus-visible::after {
  right: 0;
}

.geodir-search-container {
  margin: 1.25rem 0 1.5rem;
  padding: .85rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 14px;
  background: var(--wp--preset--color--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .04);
}

.geodir-search-container .geodir-search {
  gap: .65rem !important;
  padding: 0 !important;
}

.geodir-search-container .form-control {
  min-height: 48px;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 10px !important;
  background: var(--wp--preset--color--background);
}

.geodir-search-container .input-group-text {
  min-height: 48px;
  border-radius: 10px 0 0 10px;
}

.geodir-search-container .geodir_submit_search {
  min-height: 48px;
  border-radius: 10px;
  background: var(--gie-green);
  border-color: var(--gie-green);
}

.geodir-search-container .geodir_submit_search:hover,
.geodir-search-container .geodir_submit_search:focus {
  background: var(--gie-green-dark);
  border-color: var(--gie-green-dark);
}

.geodir-map-wrap {
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 16px;
  background: var(--wp--preset--color--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
}

.geodir-map-wrap .geodir-map-container,
.geodir-map-wrap .geodir-map-canvas,
.geodir-map-wrap .main_map_wrapper {
  border-radius: inherit;
}

.geodir-category-list-view > .col,
.geodir-widget-posts > .col {
  display: flex;
}

.geodir-category-list-view .card,
.geodir-widget-posts .card {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--border) !important;
  border-radius: 14px !important;
  background: var(--wp--preset--color--surface);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.geodir-category-list-view .card:hover,
.geodir-widget-posts .card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--gie-green) 42%, var(--wp--preset--color--border)) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

.geodir-category-list-view .card-body,
.geodir-widget-posts .card-body {
  padding: 1rem !important;
}

.geodir-category-list-view .card-footer,
.geodir-widget-posts .card-footer {
  padding: .75rem 1rem !important;
  border-top: 1px solid var(--wp--preset--color--border);
  background: transparent;
}

.geodir-entry-title {
  margin: 0 0 .45rem !important;
  line-height: 1.25;
}

.geodir-entry-title a {
  color: var(--wp--preset--color--text);
  text-decoration: none;
}

.geodir-entry-title a:hover,
.geodir-entry-title a:focus-visible {
  color: var(--gie-green);
}

.geodir_post_meta {
  line-height: 1.5;
}

.gd-badge {
  border-radius: 999px !important;
}

.gie-course-facts {
  margin: 1.75rem 0;
  padding: 1.25rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 14px;
  background: var(--wp--preset--color--surface);
}

.gie-course-facts h2,
.gie-nearby-courses h2 {
  margin-top: 0;
}

.gie-course-facts dl {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) 1.3fr;
  gap: .45rem 1.25rem;
  margin: 0;
}

.gie-course-facts dt {
  font-weight: 700;
}

.gie-course-facts dd {
  margin: 0;
}

.gie-course-facts__official {
  display: inline-block;
  margin-top: .35rem;
  padding: .65rem .9rem;
  border-radius: 9px;
  background: var(--gie-green);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.gie-course-facts__official:hover,
.gie-course-facts__official:focus-visible {
  background: var(--gie-green-dark);
}

.gie-nearby-courses__list li {
  border-radius: 12px;
  background: var(--wp--preset--color--surface);
  transition: transform .18s ease, border-color .18s ease;
}

.gie-nearby-courses__list li:hover {
  transform: translateY(-2px);
  border-color: var(--gie-green);
}

.gie-directory-hub-title {
  padding-top: clamp(2rem, 5vw, 4rem);
}

.gie-directory-hub-title h1 {
  letter-spacing: -.02em;
}

@media (max-width: 760px) {
  .geodir-search-container {
    padding: .7rem;
    border-radius: 12px;
  }

  .geodir-search-container .geodir-search {
    row-gap: .65rem !important;
  }

  .gie-course-facts {
    padding: 1rem;
  }

  .gie-course-facts dl {
    grid-template-columns: 1fr;
    gap: .2rem;
  }

  .gie-course-facts dd {
    margin-bottom: .65rem;
  }
}

html[data-gie-resolved="dark"] .geodir-search-container,
html[data-gie-resolved="dark"] .geodir-map-wrap,
html[data-gie-resolved="dark"] .geodir-category-list-view .card,
html[data-gie-resolved="dark"] .geodir-widget-posts .card,
html[data-gie-resolved="dark"] .gie-course-facts {
  box-shadow: none;
}

html[data-gie-resolved="dark"] .geodir-category-list-view .card:hover,
html[data-gie-resolved="dark"] .geodir-widget-posts .card:hover {
  border-color: var(--gie-green) !important;
}

/* Language pilot */
.gie-nav-nl,
.gie-footer-copy--nl {
  display: none;
}

body.gie-lang-nl .gie-nav-en,
body.gie-lang-nl .gie-footer-copy--en {
  display: none !important;
}

body.gie-lang-nl .gie-nav-nl {
  display: flex;
}

body.gie-lang-nl .gie-footer-copy--nl {
  display: block;
}

.gie-language-control {
  display: none;
  align-items: center;
}

.gie-language-control:has(.floorstack-language-switcher) {
  display: flex;
}

.floorstack-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: 3px;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 999px;
  background: var(--wp--preset--color--surface-alt);
}

.floorstack-language-switcher a {
  min-width: 38px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--wp--preset--color--text);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.floorstack-language-switcher a[aria-current="page"] {
  background: var(--gie-green);
  color: #fff;
}

.floorstack-language-switcher a:hover,
.floorstack-language-switcher a:focus-visible {
  background: var(--gie-green-soft);
}

.gie-language-control--mobile {
  padding: .8rem 0 0;
  margin-top: .35rem;
  border-top: 1px solid var(--wp--preset--color--border);
}

.gie-language-control--mobile .floorstack-language-switcher {
  width: 100%;
}

.gie-language-control--mobile .floorstack-language-switcher a {
  flex: 1;
}

.gie-mobile-links {
  display: block;
}

body.gie-lang-nl .gie-mobile-links.gie-nav-nl {
  display: block;
}

@media (max-width: 760px) {
  .gie-language-control--desktop {
    display: none !important;
  }

  body.gie-lang-nl .gie-desktop-nav.gie-nav-nl {
    display: none;
  }
}

html[data-gie-resolved="dark"] .floorstack-language-switcher {
  border-color: var(--wp--preset--color--border);
  background: var(--wp--preset--color--surface-alt);
}

html[data-gie-resolved="dark"] .floorstack-language-switcher a {
  color: var(--wp--preset--color--text);
}

html[data-gie-resolved="dark"] .floorstack-language-switcher a[aria-current="page"] {
  color: #fff;
}
