/* ------------------------------------------------------------
   ZIMGerm Sovereign CSS v2 — Full Site Edition
   Applies to ALL pages except the front page
   Uses Design System tokens (colors, spacing, fonts)
------------------------------------------------------------ */

/* ------------------------------------------------------------
   GLOBAL RESET
------------------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--zg-font-body);
  color: var(--zg-color-body);
  background: var(--zg-color-background);
  line-height: 1.65;
}

/* ------------------------------------------------------------
   PAGE WRAPPER
------------------------------------------------------------ */
.zg-page {
  max-width: 1200px;
  margin: 80px auto;
  padding: var(--zg-space-6);
}

/* ------------------------------------------------------------
   TYPOGRAPHY
------------------------------------------------------------ */
.zg-page h1,
.zg-page h2,
.zg-page h3,
.zg-page h4 {
  font-family: var(--zg-font-heading);
  color: var(--zg-color-heading);
  font-weight: 700;
}

.zg-page h1 { font-size: var(--zg-text-4xl); margin-bottom: var(--zg-space-4); }
.zg-page h2 { font-size: var(--zg-text-3xl); margin-bottom: var(--zg-space-3); }
.zg-page h3 { font-size: var(--zg-text-2xl); margin-bottom: var(--zg-space-2); }
.zg-page h4 { font-size: var(--zg-text-xl);  margin-bottom: var(--zg-space-2); }

.zg-page p {
  margin-bottom: var(--zg-space-4);
  font-size: var(--zg-text-base);
}

/* ------------------------------------------------------------
   LINKS
------------------------------------------------------------ */
.zg-page a {
  color: var(--zg-color-primary);
  text-decoration: none;
  font-weight: 500;
}

.zg-page a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------
   HERO SYSTEM
------------------------------------------------------------ */
.zg-hero {
  border-bottom-left-radius: var(--zg-radius-lg);
  border-bottom-right-radius: var(--zg-radius-lg);
  overflow: hidden;
  margin-bottom: var(--zg-space-10);
}

.zg-hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* ------------------------------------------------------------
   SECTION SYSTEM
------------------------------------------------------------ */
.zg-section {
  margin-bottom: var(--zg-space-14);
}

.zg-section-title {
  font-size: var(--zg-text-3xl);
  font-family: var(--zg-font-heading);
  margin-bottom: var(--zg-space-6);
}

/* ------------------------------------------------------------
   GRID SYSTEM
------------------------------------------------------------ */
.zg-grid {
  display: grid;
  gap: var(--zg-space-6);
}

.zg-grid-2 { grid-template-columns: repeat(2, 1fr); }
.zg-grid-3 { grid-template-columns: repeat(3, 1fr); }
.zg-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .zg-grid-2,
  .zg-grid-3,
  .zg-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   CARD SYSTEM
------------------------------------------------------------ */
.zg-card {
  background: var(--zg-color-surface);
  border-radius: var(--zg-radius-md);
  padding: var(--zg-space-6);
  box-shadow: var(--zg-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zg-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--zg-shadow-md);
}

.zg-card-title {
  font-family: var(--zg-font-heading);
  font-size: var(--zg-text-xl);
  margin-bottom: var(--zg-space-3);
}

.zg-card-body {
  font-size: var(--zg-text-base);
  color: var(--zg-color-body);
}

/* ------------------------------------------------------------
   BUTTONS
------------------------------------------------------------ */
.zg-btn {
  display: inline-block;
  padding: var(--zg-space-3) var(--zg-space-5);
  background: var(--zg-color-primary);
  color: white;
  border-radius: var(--zg-radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.zg-btn:hover {
  background: var(--zg-color-primary-dark);
}

/* ------------------------------------------------------------
   NAVIGATION MENU (GLOBAL HEADER)
------------------------------------------------------------ */
.zg-header nav a {
  font-family: var(--zg-font-heading);
  font-size: var(--zg-text-sm);
  color: var(--zg-color-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--zg-space-2) var(--zg-space-3);
}

.zg-header nav a:hover {
  color: var(--zg-color-primary);
}

/* ------------------------------------------------------------
   TABLES
------------------------------------------------------------ */
.zg-page table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--zg-space-10);
}

.zg-page th,
.zg-page td {
  padding: var(--zg-space-3);
  border-bottom: 1px solid var(--zg-color-border);
}

.zg-page th {
  background: var(--zg-color-surface-alt);
  font-family: var(--zg-font-heading);
}

/* ------------------------------------------------------------
   FORMS
------------------------------------------------------------ */
.zg-page input,
.zg-page textarea,
.zg-page select {
  width: 100%;
  padding: var(--zg-space-3);
  border: 1px solid var(--zg-color-border);
  border-radius: var(--zg-radius-sm);
  margin-bottom: var(--zg-space-4);
  font-size: var(--zg-text-base);
}

.zg-page input:focus,
.zg-page textarea:focus,
.zg-page select:focus {
  border-color: var(--zg-color-primary);
  outline: none;
}

/* ------------------------------------------------------------
   FOOTER
------------------------------------------------------------ */
.zg-footer {
  padding: var(--zg-space-10) var(--zg-space-6);
  background: var(--zg-color-surface);
  color: var(--zg-color-body);
  margin-top: var(--zg-space-14);
}

.zg-footer a {
  color: var(--zg-color-primary);
}


/* MAIN PAGES — tighten hero spacing */
html body:not(.home):not(.page-template-page-zg) .zgfp-section.zgfp-section-light:first-of-type {
    padding-top: 40px !important;
    padding-right: 40px !important;
    padding-bottom: 40px !important;
    padding-left: 40px !important;
    margin-top: 0 !important;
}





/* 4. Hide empty H1 so it doesn’t create phantom height */
html body:not(.home) .zgfp-heading-l:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}


/* SECTOR PAGES — preserve deeper hero spacing */
html body.page-template-page-zg .zgfp-section.zgfp-section-light:first-of-type {
    padding-top: calc(10px + 0px + 15px) !important;
    padding-right: 40px !important;
    padding-bottom: 40px !important;
    padding-left: 40px !important;
    margin-top: 0 !important;
}


/* SECTOR HERO RESTORE */
.page-template-page-zg .zg-hero-small {
    padding: 120px 40px 80px;
    background: #F8F5EF;
    text-align: center;
}

.page-template-page-zg .zg-hero-small .zg-heading-xl {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: #111111;
    margin-bottom: 24px;
}

.page-template-page-zg .zg-hero-small .zg-body-l {
    font-size: 20px;
    line-height: 1.6;
    color: #333333;
    max-width: 760px;
    margin: 0 auto;
}


/* ============================================================
   SECTOR HERO — FULL RESTORE (Premium Ivory + Depth)
   Applies ONLY to sector pages (page-zg.php)
   ============================================================ */

.page-template-page-zg .zg-hero-small {
    position: relative;
    padding: 140px 40px 100px;
    background: #F8F5EF; /* deep premium ivory */
    text-align: center;
    overflow: hidden;
}

/* Soft overlay for depth */
.page-template-page-zg .zg-hero-small::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35); /* subtle wash */
    pointer-events: none;
}

/* Typography */
.page-template-page-zg .zg-hero-small .zg-heading-xl {
    position: relative;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: #111111;
    margin-bottom: 24px;
    z-index: 2;
}

.page-template-page-zg .zg-hero-small .zg-body-l {
    position: relative;
    font-size: 20px;
    line-height: 1.6;
    color: #333333;
    max-width: 760px;
    margin: 0 auto;
    z-index: 2;
}


/* ============================================================
   SECTOR HERO — FORCE RESTORE (beats reset + unified CSS)
   ============================================================ */

body.page-template-page-zg section.zg-hero-small {
    position: relative;
    padding: 140px 40px 100px !important;
    background: #F8F5EF !important; /* premium ivory */
    text-align: center;
    overflow: hidden;
}

/* Soft overlay */
body.page-template-page-zg section.zg-hero-small::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    z-index: 1;
}

/* Typography above overlay */
body.page-template-page-zg section.zg-hero-small .zg-heading-xl,
body.page-template-page-zg section.zg-hero-small .zg-body-l {
    position: relative;
    z-index: 2;
}


/* SECTOR HERO — deep premium ivory */
body.page-template-page-zg section.zg-hero-small {
    background: #EFE8DA !important; /* deeper, warmer, more serious */
}


/* SECTOR HERO — boxed layout */
body.page-template-page-zg section.zg-hero-small .zg-container {
    max-width: 900px;        /* tighter, more serious */
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}


/* SECTOR HERO — depth */
body.page-template-page-zg section.zg-hero-small {
    position: relative;
}

body.page-template-page-zg section.zg-hero-small::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.03); /* ultra subtle depth */
    pointer-events: none;
}


/* SECTOR HERO TYPOGRAPHY */
body.page-template-page-zg .zg-hero-small .zg-heading-xl {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
    margin-bottom: 20px;
}

body.page-template-page-zg .zg-hero-small .zg-body-l {
    font-size: 20px;
    line-height: 1.65;
    color: #333;
    max-width: 720px;
    margin: 0 auto;
}


/* SECTOR HERO — BOXED LAYOUT */
body.page-template-page-zg section.zg-hero-small {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px; /* optional premium touch */
    overflow: hidden;
}


body.page-template-page-zg section.zg-hero-small {
    background: #EDE4D3 !important; /* deep premium ivory */
}


body.page-template-page-zg section.zg-hero-small::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.03);
    z-index: 1;
}


body.page-template-page-zg section.zg-hero-small .zg-heading-xl,
body.page-template-page-zg section.zg-hero-small .zg-body-l {
    position: relative;
    z-index: 2;
}


/* SECTOR HERO — CENTER THE BOX */
body.page-template-page-zg section.zg-hero-small {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    overflow: hidden;
}


body.page-template-page-zg section.zg-hero-small {
    padding-top: 120px;
    padding-bottom: 80px;
}


/* ============================================================
   SECTOR HERO — FULL OVERRIDE (beats global hero reset)
   ============================================================ */

body.page-template-page-zg section.zg-hero-small {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 140px 40px 100px !important;
    background: #EDE4D3 !important; /* deep premium ivory */
    border-radius: 12px !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
}


/* SECTOR HERO — TRUE BOXED WIDTH */
body.page-template-page-zg section.zg-hero-small {
    width: 100%;
    max-width: 1200px !important;   /* wider, premium, balanced */
    margin-left: auto !important;
    margin-right: auto !important;
}


/* MAIN PAGES — custom hero padding */
body.page-template-page-zg .zgfp-section.zgfp-section-light:first-of-type {
  padding-top: calc(0px + 0px + 0px) !important;
  padding-right: 40px !important;
  padding-bottom: 40px !important;
  padding-left: 40px !important;
  margin-top: 0 !important;
}


/* SECTOR PAGES — normal hero spacing */
body.page:not(.page-template-page-zg) .zgfp-section.zgfp-section-light:first-of-type {
  padding-top: 100px !important;
  padding-right: 40px !important;
  padding-bottom: 60px !important;
  padding-left: 40px !important;
}


/* ============================================================
   ZIMGerm Sector Hero — Base
   ============================================================ */

.zg-hero-sector {
    position: relative;
    padding: 140px 40px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 60px;
    color: #FAF8F4; /* Clean Ivory */
}

.zg-hero-sector .zg-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 26, 43, 0.55); /* Midnight Engineering Blue overlay */
    z-index: 1;
}

.zg-hero-sector .zg-container {
    position: relative;
    z-index: 2;
}

/* Tourism-specific hero image */
.zg-hero-tourism {
    background-image: url('https://design.zimgerm.de/wp-content/uploads/2026/01/t21-scaled.jpg');
    background-size: cover;
    background-position: center;
}


.zg-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}


.zg-section-image-bg {
    background-image: url('https://design.zimgerm.de/wp-content/uploads/2026/01/t21-scaled.jpg');
    background-size: cover;
    background-position: center;
    padding: 120px 40px;
    border-radius: 16px;
    color: #FAF8F4;
    position: relative;
}

.zg-section-image-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 26, 43, 0.55); /* Midnight Engineering Blue overlay */
    border-radius: 16px;
}

.zg-section-image-bg .zg-container {
    position: relative;
    z-index: 2;
}


.zg-section-image-bg {
    background-image: url('https://design.zimgerm.de/wp-content/uploads/2026/01/vic3.avif');
    background-size: cover;
    background-position: center;
    padding: 120px 40px;
    border-radius: 16px;
    color: #FAF8F4;
    position: relative;
}

.zg-section-image-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 26, 43, 0.55); /* Midnight Engineering Blue overlay */
    border-radius: 16px;
}

.zg-section-image-bg .zg-container {
    position: relative;
    z-index: 2;
}


.zg-hero-mining {
    background-image: url('https://design.zimgerm.de/wp-content/uploads/2026/01/pexels-tomfisk-12201831-1-scaled.jpg');
    background-size: cover;
    background-position: center;
}

.zg-hero-energy {
    background-image: url('/wp-content/uploads/energy-hero.jpg');
    background-size: cover;
    background-position: center;
}

.zg-hero-agriculture {
    background-image: url('/wp-content/uploads/agriculture-hero.jpg');
    background-size: cover;
    background-position: center;
}
