/*
 Theme Name:   IFG Astra Child
 Theme URI:    https://ingenieurbuero-ifg.de
 Description:  Astra Child Theme für IFG - Ingenieurbüro für faunistische Gutachten
 Author:       netztaucher
 Author URI:   https://netztaucher.com
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  ifg-astra-child
*/

/* ============================================
   IFG Design System — CSS Custom Properties
   Migrated from prototyp/css/style.css
   ============================================ */

:root {
  /* ── Color: Brand (Forest) ─────────────────── */
  --ifg-forest-900: #0F2920;
  --ifg-forest-800: #153626;
  --ifg-forest-700: #1B4332;
  --ifg-forest-600: #2D6A4F;
  --ifg-forest-500: #40916C;
  --ifg-forest-400: #52B788;
  --ifg-forest-300: #74A68D;
  --ifg-forest-200: #A7D5BA;
  --ifg-forest-100: #D4EDDA;
  --ifg-forest-50:  #EDF5F0;

  /* ── Color: Brand (Amber) ──────────────────── */
  --ifg-amber-900: #6B4106;
  --ifg-amber-800: #8B550C;
  --ifg-amber-700: #A66610;
  --ifg-amber-600: #C17817;
  --ifg-amber-500: #D4963A;
  --ifg-amber-400: #E0AD5C;
  --ifg-amber-300: #ECCC8B;
  --ifg-amber-200: #F5DEB3;
  --ifg-amber-100: #FAF0D8;
  --ifg-amber-50:  #FDF8ED;

  /* ── Color: Neutral ────────────────────────── */
  --ifg-neutral-950: #1C2B1F;
  --ifg-neutral-900: #2A3C2E;
  --ifg-neutral-800: #3A4F3F;
  --ifg-neutral-700: #4A5D4F;
  --ifg-neutral-600: #5E7264;
  --ifg-neutral-500: #617A68;
  --ifg-neutral-400: #98A89D;
  --ifg-neutral-300: #B5C0B8;
  --ifg-neutral-200: #C5BEB5;
  --ifg-neutral-100: #E8E4DE;
  --ifg-neutral-50:  #F7F4EF;
  --ifg-neutral-0:   #FDFBF7;

  /* ── Semantic Aliases ──────────────────────── */
  --ifg-primary:       var(--ifg-forest-700);
  --ifg-primary-dark:  var(--ifg-forest-800);
  --ifg-primary-light: var(--ifg-forest-300);
  --ifg-accent:        var(--ifg-amber-600);
  --ifg-bg:            var(--ifg-neutral-0);
  --ifg-bg-alt:        var(--ifg-neutral-50);
  --ifg-text:          var(--ifg-neutral-950);
  --ifg-text-light:    var(--ifg-neutral-700);
  --ifg-border:        rgba(27, 67, 50, 0.08);
  --ifg-border-strong: rgba(27, 67, 50, 0.16);
  --ifg-overlay:       rgba(15, 41, 32, 0.75);

  /* ── Shadows (forest-green tint) ───────────── */
  --ifg-shadow-sm: 0 1px 2px rgba(27,67,50,0.04);
  --ifg-shadow:    0 2px 8px rgba(27,67,50,0.06), 0 1px 2px rgba(27,67,50,0.04);
  --ifg-shadow-lg: 0 8px 24px rgba(27,67,50,0.08), 0 2px 4px rgba(27,67,50,0.04);
  --ifg-shadow-xl: 0 16px 48px rgba(27,67,50,0.10), 0 4px 8px rgba(27,67,50,0.04);

  /* ── Radius ────────────────────────────────── */
  --ifg-radius-sm:   4px;
  --ifg-radius:      8px;
  --ifg-radius-lg:   12px;
  --ifg-radius-xl:   16px;
  --ifg-radius-full: 9999px;

  /* ── Transitions ───────────────────────────── */
  --ifg-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ifg-duration: 200ms;
  --ifg-transition: var(--ifg-duration) var(--ifg-ease);
}


/* ============================================
   GLOBAL OVERRIDES
   ============================================ */

/* Body background */
body {
  background-color: var(--ifg-bg);
  color: var(--ifg-text);
}

/* ============================================
   HEADER: Glassmorphism Effect
   ============================================ */

/* Transparent header on hero pages */
.ast-primary-header-bar.ast-header-sticked {
  background: rgba(253, 251, 247, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ifg-border);
  box-shadow: var(--ifg-shadow-sm);
}

/* ============================================
   SECTION HEADERS: Amber Accent Underline
   ============================================ */

.ifg-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.ifg-section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
}

.ifg-section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background-color: var(--ifg-amber-600);
  border-radius: 2px;
}

.ifg-section-header p {
  color: var(--ifg-text-light);
  font-size: 1.25rem;
  font-weight: 300;
  max-width: 640px;
  margin: 16px auto 0;
  line-height: 1.8;
}


/* ============================================
   BADGE COMPONENT
   ============================================ */

.ifg-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--ifg-radius-full);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  background-color: var(--ifg-forest-100);
  color: var(--ifg-forest-700);
}

.ifg-badge--green {
  background-color: var(--ifg-forest-700);
  color: #fff;
}

.ifg-badge--amber {
  background-color: var(--ifg-amber-100);
  color: var(--ifg-amber-700);
}


/* ============================================
   REFERENCE CARDS (for CPT archive)
   ============================================ */

.ifg-ref-card {
  background: #fff;
  border-radius: var(--ifg-radius-lg);
  overflow: hidden;
  border: 1px solid var(--ifg-border);
  box-shadow: var(--ifg-shadow);
  transition: all var(--ifg-transition);
}

.ifg-ref-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ifg-shadow-lg);
}

.ifg-ref-card__image {
  height: 200px;
  overflow: hidden;
}

.ifg-ref-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ifg-transition);
}

.ifg-ref-card:hover .ifg-ref-card__image img {
  transform: scale(1.05);
}

.ifg-ref-card__body {
  padding: 20px;
}

.ifg-ref-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.ifg-ref-card__year {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--ifg-text-light);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.ifg-ref-card__body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.ifg-ref-card__body p {
  font-size: 0.9rem;
  color: var(--ifg-text-light);
  margin-bottom: 0.5rem;
}

.ifg-ref-card__client {
  font-size: 0.75rem;
  color: var(--ifg-forest-600);
  font-weight: 600;
}


/* ============================================
   REFERENCE YEAR DIVIDER
   ============================================ */

.ifg-ref-year {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.953rem;
  color: var(--ifg-forest-700);
  border-bottom: 2px solid var(--ifg-border-strong);
  padding-bottom: 12px;
  margin-bottom: 24px;
  margin-top: 40px;
}

.ifg-ref-year:first-child {
  margin-top: 0;
}


/* ============================================
   FILTER BAR
   ============================================ */

.ifg-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.ifg-filter-btn {
  padding: 4px 12px;
  background: var(--ifg-bg-alt);
  border: 1px solid var(--ifg-border);
  border-radius: var(--ifg-radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ifg-transition);
  color: var(--ifg-text-light);
}

.ifg-filter-btn:hover {
  background-color: var(--ifg-forest-50);
  color: var(--ifg-forest-700);
  border-color: var(--ifg-forest-300);
}

.ifg-filter-btn.active {
  background-color: var(--ifg-forest-100);
  border-color: var(--ifg-forest-300);
  color: var(--ifg-forest-700);
}


/* ============================================
   SERVICE CARDS
   ============================================ */

.ifg-service-card {
  background-color: #fff;
  border-radius: var(--ifg-radius-lg);
  padding: 32px;
  border: 1px solid var(--ifg-border);
  box-shadow: var(--ifg-shadow);
  transition: all var(--ifg-transition);
}

.ifg-service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ifg-shadow-lg);
}

.ifg-service-card__icon {
  width: 56px;
  height: 56px;
  background-color: var(--ifg-forest-50);
  color: var(--ifg-forest-700);
  border-radius: var(--ifg-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.6rem;
}


/* ============================================
   COMPETENCE CARDS
   ============================================ */

.ifg-competence-card {
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border-radius: var(--ifg-radius-lg);
  border: 1px solid var(--ifg-border);
  box-shadow: var(--ifg-shadow);
  transition: all var(--ifg-transition);
}

.ifg-competence-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ifg-shadow-lg);
}

.ifg-competence-card__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}


/* ============================================
   ARTGRUPPEN PHOTO CARDS
   ============================================ */

.ifg-artgruppe {
  background: #fff;
  border-radius: var(--ifg-radius-lg);
  border: 1px solid var(--ifg-border);
  box-shadow: var(--ifg-shadow);
  overflow: hidden;
  transition: all var(--ifg-transition);
  display: flex;
  flex-direction: column;
}

.ifg-artgruppe:hover {
  transform: translateY(-4px);
  box-shadow: var(--ifg-shadow-lg);
}

.ifg-artgruppe__image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.ifg-artgruppe__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ifg-artgruppe:hover .ifg-artgruppe__image img {
  transform: scale(1.05);
}

.ifg-artgruppe__text {
  padding: 1.2rem 1rem;
  text-align: center;
}


/* ============================================
   GALLERY
   ============================================ */

.ifg-gallery-item {
  position: relative;
  border-radius: var(--ifg-radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.ifg-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ifg-gallery-item:hover img {
  transform: scale(1.08);
}

.ifg-gallery-item__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  transform: translateY(100%);
  transition: transform var(--ifg-transition);
}

.ifg-gallery-item:hover .ifg-gallery-item__overlay {
  transform: translateY(0);
}


/* ============================================
   STATS / COUNTER SECTION
   ============================================ */

.ifg-stats {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 80px 0;
}

.ifg-stats::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(27, 67, 50, 0.92);
}

.ifg-stat-number {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
}

.ifg-stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .ifg-stats {
    background-attachment: scroll;
  }
  .ifg-stat-number {
    font-size: 2.4rem;
  }
}


/* ============================================
   CTA BANNER
   ============================================ */

.ifg-cta {
  background: var(--ifg-forest-700);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ifg-cta::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(116, 166, 141, 0.08);
  pointer-events: none;
}

.ifg-cta h2 {
  color: #fff;
}

.ifg-cta p {
  color: var(--ifg-forest-200);
  max-width: 550px;
  margin: 0 auto 32px;
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.8;
}


/* ============================================
   TIMELINE
   ============================================ */

.ifg-timeline {
  position: relative;
  padding-left: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.ifg-timeline::before {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ifg-border);
  border-radius: 2px;
}

.ifg-timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1rem;
}

.ifg-timeline-item::before {
  content: '';
  position: absolute;
  left: -2.2rem;
  top: 0.3rem;
  width: 14px;
  height: 14px;
  background: var(--ifg-primary);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--ifg-primary);
}

.ifg-timeline-item__year {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 700;
  color: var(--ifg-primary);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}


/* ============================================
   CONTACT FORM OVERRIDES (Sure Forms Pro)
   ============================================ */

.srfm-input:focus,
.srfm-textarea:focus {
  border-color: var(--ifg-forest-600) !important;
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.08) !important;
}


/* ============================================
   FOOTER OVERRIDES
   ============================================ */

/* Amber accent line under footer headings */
.site-footer .widget-title::after,
.ifg-footer-heading::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--ifg-amber-500);
  margin-top: 12px;
}

/* Footer link hover: slight indent */
.site-footer a:hover {
  padding-left: 0.3rem;
}


/* ============================================
   SCROLL TO TOP (if using Astra's built-in)
   ============================================ */

.ast-scroll-top-icon {
  background-color: var(--ifg-forest-700) !important;
  border-radius: var(--ifg-radius) !important;
  box-shadow: var(--ifg-shadow-lg);
}

.ast-scroll-top-icon:hover {
  background-color: var(--ifg-forest-600) !important;
  transform: translateY(-2px);
}


/* ============================================
   LEGAL PAGES (Impressum, Datenschutz)
   ============================================ */

.ifg-legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 48px;
  border-radius: var(--ifg-radius-lg);
  border: 1px solid var(--ifg-border);
  box-shadow: var(--ifg-shadow);
}

.ifg-legal-content h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ifg-border);
}

.ifg-legal-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

@media (max-width: 600px) {
  .ifg-legal-content {
    padding: 1.5rem;
  }
}


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

.ifg-text-center { text-align: center; }
.ifg-mt-1 { margin-top: 1rem; }
.ifg-mt-2 { margin-top: 2rem; }
.ifg-mt-3 { margin-top: 3rem; }
.ifg-mb-1 { margin-bottom: 1rem; }
.ifg-mb-2 { margin-bottom: 2rem; }
.ifg-mb-3 { margin-bottom: 3rem; }
