/* =============================================
   Re-Plast-Kunststoff GmbH – Frontend Styles
   Mobile First / Clean / Modern
   ============================================= */

/* =============================================
   CSS Variables
   ============================================= */
:root {
  --primary: #82c60d;
  --primary-dark: #6ba30a;
  --primary-light: #c9ec8e;
  --primary-bg: #f0f9e0;

  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
  --transition: 0.3s ease;
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary);
}

ul, ol {
  padding-left: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--gray-900);
}

/* =============================================
   Layout
   ============================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

#main-content {
  padding-top: calc(var(--header-height) + 1rem);
}

.section {
  padding: 4rem 0;
}

.section-sm {
  padding: 2.5rem 0;
}

.section-bg {
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
}

/* =============================================
   Header / Navigation
   ============================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-height);
  transition: all var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--gray-900);
  flex-shrink: 0;
}

.logo-icon {
  font-size: 2rem;
  color: var(--primary);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text strong {
  font-size: 1.125rem;
  font-weight: 700;
}

.logo-text small {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 400;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.nav-list a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--primary-dark);
  background: var(--primary-bg);
}

/* Burger Menu */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  transition: all var(--transition);
  border-radius: 2px;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
    padding: calc(var(--header-height) + 1rem) 1.5rem 2rem;
    z-index: 1000;
    overflow-y: auto;
  }

  .main-nav.open {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-list a {
    padding: 0.875rem 0.75rem;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--gray-100);
  }
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
  position: relative;
  padding: 8rem 0 5rem;
  background: linear-gradient(135deg, var(--primary) 0%, #5a9a06 100%);
  color: var(--white);
  overflow: hidden;
  margin-top: var(--header-height);
}

.hero.hero-small {
  padding: 5rem 0 3rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  max-width: 700px;
}

.hero .subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 600px;
  font-weight: 300;
}

.hero .hero-content {
  font-size: 1.0625rem;
  opacity: 0.85;
  max-width: 550px;
  margin-bottom: 2rem;
}

.hero .hero-content p {
  margin-bottom: 0.5rem;
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(130,198,13,0.3);
}

.btn-white {
  background: var(--white);
  color: var(--primary-dark);
  border-color: var(--white);
}

.btn-white:hover {
  background: var(--gray-100);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* =============================================
   Cards
   ============================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--gray-200);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--gray-600);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--primary-dark);
}

.card-link:hover {
  gap: 0.625rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.news-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.news-card p {
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.news-card .btn {
  margin-top: 0.5rem;
}

/* =============================================
   Text + Image Section
   ============================================= */
.text-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.text-image.reversed {
  direction: rtl;
}

.text-image.reversed > * {
  direction: ltr;
}

.text-image-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.text-image-content p {
  color: var(--gray-600);
  margin-bottom: 1rem;
  font-size: 1.0625rem;
}

.text-image-content ul,
.text-image-content ol {
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.text-image-content li {
  margin-bottom: 0.5rem;
}

.text-image-img img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .text-image {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .text-image.reversed {
    direction: ltr;
  }
}

/* =============================================
   CTA Section
   ============================================= */
.cta-section {
  background: var(--gray-50);
  text-align: center;
  padding: 4rem 0;
}

.cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--gray-600);
  font-size: 1.0625rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   Text Content (Standard Pages)
   ============================================= */
.content-text {
  max-width: 800px;
  margin: 0 auto;
}

.content-text h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.content-text h3 {
  font-size: 1.375rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content-text h4 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.content-text p {
  margin-bottom: 1rem;
  color: var(--gray-700);
  font-size: 1.0625rem;
}

.content-text ul, .content-text ol {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

.content-text li {
  margin-bottom: 0.375rem;
}

.content-text strong {
  color: var(--gray-900);
}

.content-text a {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* =============================================
   Contact Form
   ============================================= */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 768px) {
  .contact-section {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  background: var(--white);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
  color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  transition: all var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(130,198,13,0.15);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  display: none;
}

.form-message.success {
  background: var(--primary-bg);
  color: var(--primary-dark);
  border: 1px solid var(--primary-light);
  display: block;
}

.form-message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  display: block;
}

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Contact Info */
.contact-info h3 {
  font-size: 1.375rem;
  margin-bottom: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.125rem;
}

.contact-info-text h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.contact-info-text p {
  color: var(--gray-600);
  font-size: 0.9375rem;
}

/* =============================================
   Map
   ============================================= */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
  display: block;
}

/* =============================================
   Gallery
   ============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition);
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: var(--white);
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.footer-col p {
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--gray-400);
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
}

/* =============================================
   Back to Top
   ============================================= */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  z-index: 100;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* =============================================
   Loading
   ============================================= */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding-top: var(--header-height);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================
   Animations
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   Utility
   ============================================= */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* =============================================
   Print
   ============================================= */
@media print {
  .site-header,
  .site-footer,
  .back-to-top,
  .burger {
    display: none !important;
  }

  .hero {
    margin-top: 0;
    padding: 2rem 0;
    background: var(--gray-100) !important;
    color: var(--gray-900) !important;
  }

  .hero h1 { color: var(--gray-900) !important; }

  body {
    font-size: 12pt;
  }
}
