/*
Theme Name: Sparwasser Schmidt
Theme URI: https://sparwasser-schmidt.de
Description: Custom theme for Sparwasser & Schmidt Rechtsanwaltsgesellschaft mbH
Version: 1.0
Author: Sparwasser & Schmidt
Author URI: https://sparwasser-schmidt.de
Text Domain: sparwasser-schmidt
Requires at least: 6.0
Requires PHP: 7.4
*/

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

:root {
  --color-primary: #005077;
  --color-accent: #aa9676;
  --color-text: #333333;
  --color-text-light: #0a0a0a;
  --color-white: #fefefe;
  --color-bg: #f0f0f0;
  --color-bg-light: #f5f5f5;
  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1570px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--color-accent); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; }

h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-white);
}

h2 {
  font-size: 35px;
  font-weight: 600;
  color: var(--color-primary);
}

h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-accent);
}

p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 1em;
}

.section-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 15px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: background 0.3s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 15px 30px;
}

.site-logo img,
.site-logo svg {
  height: 50px;
  width: auto;
}

.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.main-navigation a {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-light);
  text-transform: none;
  letter-spacing: 0.5px;
  transition: color 0.3s;
  padding: 5px 0;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--color-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-light);
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-navigation ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 20px 30px;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  .main-navigation.active ul { display: flex; }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  height: 70vh;
  min-height: 450px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: 80px;
}

.hero video,
.hero img.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 80, 119, 0.3);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 60px;
  max-width: 700px;
}

.hero h1 {
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .hero { height: 50vh; min-height: 350px; }
  .hero-content { padding: 0 30px; }
  .hero h1 { font-size: 32px; }
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.section {
  padding: 80px 0;
}

.section-white {
  background: var(--color-white);
}

.section-light {
  background: var(--color-bg-light);
}

.section-dark {
  background: var(--color-primary);
  color: var(--color-white);
}

.section-dark h2,
.section-dark h3,
.section-dark p,
.section-dark a {
  color: var(--color-white);
}

.section-dark .section-label {
  color: rgba(255,255,255,0.7);
}

/* Two Column Layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 30px; }
}

/* Text with Image */
.text-image { padding: 80px 0; }
.text-image .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

@media (max-width: 768px) {
  .text-image .container { grid-template-columns: 1fr; }
}

/* News / Aktuelles section on dark bg */
.news-section {
  background: var(--color-primary);
  padding: 80px 0;
  color: var(--color-white);
}

.news-section h2 {
  color: var(--color-white);
  margin-bottom: 40px;
}

.news-item {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding: 20px 0;
}

.news-item .date {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 5px;
}

.news-item h4 {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-white);
  margin-bottom: 8px;
}

.news-item .more-link {
  font-size: 13px;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Facts / Numbers */
.facts-section {
  background: var(--color-white);
  padding: 60px 0;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.fact-item h3 {
  font-size: 48px;
  color: var(--color-primary);
  font-weight: 700;
}

.fact-item p {
  font-size: 14px;
  color: var(--color-text);
}

/* ============================================
   EXPERTEN (LAWYERS) GRID
   ============================================ */
.experten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px;
}

.experte-card {
  background: var(--color-white);
  overflow: hidden;
}

.experte-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  object-position: top center;
}

.experte-card .card-content {
  padding: 25px;
}

.experte-card h3 {
  margin-bottom: 5px;
}

.experte-card .title {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 300;
}

/* ============================================
   ACCORDION (KOMPETENZEN)
   ============================================ */
.accordion-item {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-main);
}

.accordion-header h3 {
  font-size: 18px;
  color: var(--color-primary);
  transition: color 0.3s;
}

.accordion-header:hover h3 {
  color: var(--color-accent);
}

.accordion-header .icon {
  font-size: 24px;
  color: var(--color-accent);
  transition: transform 0.3s;
}

.accordion-content {
  padding: 0 0 20px;
  display: none;
}

.accordion-item.active .accordion-content {
  display: block;
}

.accordion-item.active .icon {
  transform: rotate(45deg);
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonial-section {
  background: var(--color-primary);
  padding: 80px 0;
  text-align: center;
  color: var(--color-white);
}

.testimonial-section .section-label {
  color: rgba(255,255,255,0.7);
}

.testimonial-content {
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 30px;
  object-fit: cover;
}

.testimonial-text {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 20px;
  color: var(--color-white);
}

.testimonial-author {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

/* ============================================
   CTA LINK BUTTONS
   ============================================ */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 15px;
}

.cta-link::before {
  content: "\2197";
  font-size: 16px;
}

.cta-link:hover {
  color: var(--color-primary);
}

.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 30px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.5px;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #003d5c;
  color: var(--color-white);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 60px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo img,
.footer-logo svg {
  max-width: 200px;
  height: auto;
}

.site-footer p,
.site-footer a {
  color: var(--color-white);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
}

.site-footer a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 15px 0;
}

.footer-bottom nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  justify-content: center;
}

.footer-bottom a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
  color: var(--color-white);
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom nav ul { flex-wrap: wrap; justify-content: center; gap: 15px; }
}

/* ============================================
   PAGE CONTENT (GUTENBERG)
   ============================================ */
.page-content {
  margin-top: 80px;
  padding: 60px 0;
}

.page-content .container {
  max-width: 1200px;
}

.entry-content > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* WordPress Block Styles */
.wp-block-columns {
  display: flex;
  gap: 30px;
}

.wp-block-column {
  flex: 1;
}

.wp-block-image img {
  width: 100%;
  height: auto;
}

.wp-block-heading {
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .wp-block-columns { flex-direction: column; }
}

/* ============================================
   WORDPRESS ADMIN BAR FIX
   ============================================ */
body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}
