/* ============================================================================
   GRÃNFORSYNING THEME â Shared Styles (All Pages except Front Page)
   ============================================================================ */

/* CSS VARIABLES â Design System */
:root {
  /* Colors */
  --gf-black: #0a0f0d;
  --gf-white: #f8faf7;
  --gf-cream: #eef2ea;
  --gf-green-900: #0b1f15;
  --gf-green-800: #122a1c;
  --gf-green-700: #1a3d28;
  --gf-green-500: #2d7a4a;
  --gf-green-400: #3da363;
  --gf-green-300: #6bc48a;
  --gf-accent: #c4f542;
  --gf-stone-500: #8a8578;
  --gf-stone-400: #b5b0a3;
  --gf-stone-300: #d4d0c5;
  --gf-stone-200: #e8e5dc;

  /* Typography */
  --gf-font-display: 'DM Serif Display', serif;
  --gf-font-body: 'Plus Jakarta Sans', sans-serif;

  /* Easing */
  --gf-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gf-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --gf-container-max: 1280px;
  --gf-gutter: clamp(1.25rem, 4vw, 3rem);
  --gf-container-narrow: 720px;
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--gf-font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--gf-black);
  background-color: var(--gf-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* CONTAINER */
.gf-container {
  max-width: var(--gf-container-max);
  padding-left: var(--gf-gutter);
  padding-right: var(--gf-gutter);
  margin-left: auto;
  margin-right: auto;
}

.gf-container--narrow {
  max-width: var(--gf-container-narrow);
}

/* ============================================================================
   NAVIGATION â matches front-page styling
   ============================================================================ */

.gf-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all 0.4s var(--gf-ease-out);
}

/* Light variant â white bg for pages without dark hero */
.gf-nav--light {
  background: var(--gf-white) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.gf-nav--light .gf-nav__logo { color: var(--gf-black) !important; }
.gf-nav--light .gf-nav__links a { color: rgba(10, 15, 13, 0.8) !important; }
.gf-nav--light .gf-nav__links a:hover { color: var(--gf-black) !important; }
.gf-nav--light .gf-nav__links a::after { background: var(--gf-green-500); }
.gf-nav--light .gf-nav__toggle span { background: var(--gf-black) !important; }

/* Dark variant â transparent, for pages with dark hero */
.gf-nav--dark {
  background: transparent !important;
}
.gf-nav--dark .gf-nav__logo { color: var(--gf-white) !important; }

/* Scrolled state */
.gf-nav--scrolled {
  background: rgba(10, 15, 13, 0.85) !important;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  padding: 0.75rem 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
/* When a light nav scrolls, switch to dark glassmorphism */
.gf-nav--light.gf-nav--scrolled .gf-nav__logo { color: var(--gf-white) !important; }
.gf-nav--light.gf-nav--scrolled .gf-nav__links a { color: rgba(248, 250, 247, 0.92) !important; }
.gf-nav--light.gf-nav--scrolled .gf-nav__links a:hover { color: #fff !important; }
.gf-nav--light.gf-nav--scrolled .gf-nav__toggle span { background: var(--gf-white) !important; }

/* Hidden state */
.gf-nav--hidden {
  transform: translateY(-100%);
}

/* Nav inner */
.gf-nav__inner {
  max-width: var(--gf-container-max);
  margin: 0 auto;
  padding: 0 var(--gf-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.gf-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gf-white);
  font-family: var(--gf-font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  transition: opacity 0.3s;
  text-decoration: none;
}
.gf-nav__logo:hover { opacity: 0.8; }

.gf-nav__logo-icon { flex-shrink: 0; }

.gf-nav__logo-text {
  font-family: var(--gf-font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

/* Nav links */
.gf-nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.gf-nav .gf-nav__links a {
  color: rgba(248, 250, 247, 0.92) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
  transition: color 0.3s;
  position: relative;
}
.gf-nav .gf-nav__links a:hover { color: #fff !important; }

.gf-nav .gf-nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--gf-accent);
  transition: width 0.3s var(--gf-ease-out);
}
.gf-nav .gf-nav__links a:hover::after { width: 100%; }

/* CTA button */
.gf-nav__cta {
  background: var(--gf-accent) !important;
  color: var(--gf-green-900) !important;
  padding: 0.55rem 1.25rem;
  border-radius: 100px;
  font-weight: 600 !important;
  transition: transform 0.3s var(--gf-ease-spring), box-shadow 0.3s !important;
}
.gf-nav__cta::after { display: none !important; }
.gf-nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(196, 245, 66, 0.3);
}

/* Mobile nav toggle */
.gf-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 10;
}
.gf-nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--gf-white);
  border-radius: 2px;
  transition: all 0.3s var(--gf-ease-out);
}
.gf-nav__toggle.is-active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.gf-nav__toggle.is-active span:nth-child(2) { opacity: 0; }
.gf-nav__toggle.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
@media (max-width: 768px) {
  .gf-nav__toggle { display: flex; }

  .gf-nav__links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    background: rgba(10, 15, 13, 0.96);
    backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.4s var(--gf-ease-out);
    gap: 1.5rem;
  }
  .gf-nav__links.is-open { transform: translateX(0); }

  .gf-nav__cta {
    margin-top: 1rem;
  }
}

/* ============================================================================
   FOOTER â matches front-page styling
   ============================================================================ */

.gf-footer {
  background: var(--gf-black);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  color: rgba(248, 250, 247, 0.5);
}

.gf-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(248, 250, 247, 0.08);
}

.gf-footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--gf-font-display);
  font-size: 1.1rem;
  color: var(--gf-white);
  margin-bottom: 0.75rem;
}

.gf-footer__tagline {
  font-size: 0.9rem;
  line-height: 1.6;
}

.gf-footer__heading {
  font-family: var(--gf-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gf-white);
  margin-bottom: 1.25rem;
}

.gf-footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.gf-footer__col a {
  font-size: 0.9rem;
  transition: color 0.3s;
}
.gf-footer__col a:hover { color: var(--gf-accent); }

.gf-footer__address {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0.25rem;
}

.gf-footer__bottom {
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
}

@media (max-width: 1024px) {
  .gf-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .gf-footer__grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gf-font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

/* ============================================================================
   SECTION COMPONENTS
   ============================================================================ */

.gf-section-label {
  font-family: var(--gf-font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gf-green-500);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gf-section-label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 2px;
  background-color: var(--gf-green-500);
}

.gf-section-title {
  font-family: var(--gf-font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--gf-black);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.gf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--gf-font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 2rem;
  padding: 0.875rem 1.75rem;
  cursor: pointer;
  transition: all 0.3s var(--gf-ease-out);
  text-transform: none;
  letter-spacing: 0;
}

.gf-btn--primary {
  background-color: var(--gf-accent);
  color: var(--gf-black);
}

.gf-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(196, 245, 66, 0.3);
}

.gf-btn--white {
  background-color: var(--gf-white);
  color: var(--gf-black);
}

.gf-btn--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(248, 250, 247, 0.5);
}

.gf-btn--ghost {
  background-color: transparent;
  border: 2px solid var(--gf-stone-300);
  color: var(--gf-black);
}

.gf-btn--ghost:hover {
  border-color: var(--gf-green-500);
  color: var(--gf-green-500);
}

.gf-btn--ghost-light {
  background-color: transparent;
  border: 2px solid rgba(248, 250, 247, 0.3);
  color: var(--gf-white);
}

.gf-btn--ghost-light:hover {
  border-color: var(--gf-white);
  background-color: rgba(248, 250, 247, 0.1);
}

/* ============================================================================
   ARTICLE CARD
   ============================================================================ */

.gf-article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--gf-stone-200);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--gf-white);
  transition: all 0.4s var(--gf-ease-out);
}

.gf-article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(10, 15, 13, 0.08);
}

.gf-article-card__image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: var(--gf-cream);
}

.gf-article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s var(--gf-ease-out);
}

.gf-article-card:hover .gf-article-card__image img {
  transform: scale(1.05);
}

.gf-article-card__placeholder {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, var(--gf-cream) 0%, var(--gf-stone-200) 100%);
}

.gf-article-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
}

.gf-article-card__category {
  display: inline-block;
  font-family: var(--gf-font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gf-green-500);
  margin-bottom: 0.75rem;
}

.gf-article-card__title {
  font-family: var(--gf-font-display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--gf-black);
  margin-bottom: 0.75rem;
}

.gf-article-card__excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gf-stone-500);
  margin-bottom: 1.5rem;
  flex: 1;
}

.gf-article-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--gf-stone-200);
  font-size: 13px;
  color: var(--gf-stone-400);
}

.gf-article-card__date {
  font-size: 13px;
  color: var(--gf-stone-400);
}

.gf-article-card__read-more {
  font-weight: 600;
  color: var(--gf-green-500);
  text-decoration: none;
  transition: all 0.3s var(--gf-ease-out);
}

.gf-article-card__read-more:hover {
  color: var(--gf-accent);
  transform: translateX(4px);
}

/* ============================================================================
   CTA COMPACT SECTION
   ============================================================================ */

.gf-cta--compact {
  position: relative;
  padding: 60px var(--gf-gutter);
  background: linear-gradient(135deg, var(--gf-green-900) 0%, var(--gf-green-800) 100%);
  color: var(--gf-white);
  overflow: hidden;
  text-align: center;
}

.gf-cta--compact::before,
.gf-cta--compact::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
}

.gf-cta--compact::before {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(61, 163, 99, 0.6) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: float 6s var(--gf-ease-spring) infinite;
}

.gf-cta--compact::after {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(45, 122, 74, 0.5) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: float 8s var(--gf-ease-spring) infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(30px);
  }
}

.gf-cta--compact__inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.gf-cta--compact__title {
  font-family: var(--gf-font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--gf-white);
  margin-bottom: 1rem;
}

.gf-cta--compact__text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gf-stone-300);
  margin-bottom: 2rem;
}

.gf-cta--compact .gf-btn {
  margin: 0 auto;
}

/* ============================================================================
   SCROLL ANIMATIONS
   ============================================================================ */

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--gf-ease-out);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   ELEMENTOR OVERRIDES
   ============================================================================ */

.elementor-admin-bar {
  display: none;
}

.wp-admin-bar {
  display: none !important;
}

/* ============================================================================
   WORDPRESS DEFAULTS
   ============================================================================ */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}
