/*
Theme Name: Notar Berresheim
Description: Custom Theme for Notar Berresheim
Author: WebMigration
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --primary-color: #002349;
  --secondary-color: #003b7a;
  --text-color: #333333;
  --bg-color: #ffffff;
  --light-bg: #f4f4f4;
  --border-color: #dddddd;
  --link-color: #004b9a;
  --link-hover: #002349;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Roboto', sans-serif; color: var(--text-color); background: var(--bg-color); line-height: 1.6; }
h1, h2, h3, h4, h5, h6 { font-family: 'Libre Baskerville', serif; color: var(--primary-color); margin-bottom: 1rem; }

/* Header */
.site-header { background: var(--bg-color); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; width: 100%; }
.header-inner { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 15px 20px; }
.logo-area { display: flex; align-items: center; gap: 15px; }
.logo-area img { max-height: 80px; }
.site-title { font-size: 1.8rem; margin: 0; line-height: 1.2; }
.site-subtitle { font-family: 'Roboto', sans-serif; font-size: 1rem; font-weight: 300; color: #666; margin: 0; }

/* Navigation */
.main-navigation { display: flex; align-items: center; }
.menu-toggle { display: none; background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--primary-color); }
.nav-menu { display: flex; list-style: none; gap: 20px; margin: 0; }
.nav-menu li { position: relative; }
.nav-menu a { text-decoration: none; color: var(--primary-color); font-weight: 500; font-size: 1.1rem; padding: 10px 0; display: block; transition: color 0.3s; }
.nav-menu a:hover { color: var(--link-hover); }

/* Dropdown */
.nav-menu ul.sub-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--primary-color); min-width: 200px; padding: 10px 0; z-index: 100; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.nav-menu li:hover > ul.sub-menu { display: block; }
.nav-menu ul.sub-menu li { display: block; }
.nav-menu ul.sub-menu a { color: #fff; padding: 8px 20px; font-size: 0.95rem; }
.nav-menu ul.sub-menu a:hover { background: var(--secondary-color); }

/* Right alignment for last 2 items */
.nav-menu > li:nth-last-child(-n+2) ul.sub-menu { left: auto; right: 0; }

/* Banner */
.hero-banner { width: 100%; height: 300px; background: var(--primary-color) center/cover no-repeat; position: relative; }
.hero-banner::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,35,73,0.5); }
.hero-content { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 100%; display: flex; align-items: center; color: #fff; }
.hero-content h1 { color: #fff; font-size: 2.5rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }

/* Layout */
.site-content { max-width: 1200px; margin: 40px auto; padding: 0 20px; display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.main-content { min-width: 0; }
.main-content img { max-width: 200px; float: left; margin: 0 20px 10px 0; }
.main-content::after { content: ""; display: table; clear: both; }

/* Startseite Tätigkeitsfelder links (from WP content) */
.entry-content h3 ~ p > a { color: var(--link-color); text-decoration: none; font-weight: 500; }
.entry-content h3 ~ p > a:hover { color: var(--link-hover); text-decoration: underline; }
.entry-content h3 ~ p { margin-bottom: 4px; }
.entry-content h3 { margin-top: 40px; }

/* Aktuelles spacing */
.aktuelles-feed { margin-top: 10px; }
#bnotk-feed { margin-bottom: 20px; }
.main-content > h2 { margin-top: 50px; }

/* Team Grid */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; margin-top: 30px; }
.team-member { background: var(--light-bg); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.3s, box-shadow 0.3s; }
.team-member:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.team-member img { width: auto; max-width: 100%; max-height: 200px; object-fit: contain; float: none; display: block; margin: 15px auto 0; }
.team-member-info { padding: 20px; }
.team-member-info h3 { font-size: 1.1rem; margin-bottom: 5px; }
.team-member-info .role { color: var(--secondary-color); font-weight: 500; font-size: 0.95rem; margin-bottom: 10px; }
.team-member-info p { font-size: 0.9rem; line-height: 1.5; }

/* Notar portrait */
.notar-intro { display: flex; gap: 30px; margin-bottom: 30px; align-items: flex-start; }
.notar-intro img { width: 350px; max-width: 350px; height: auto; border-radius: 8px; float: none; flex-shrink: 0; object-fit: contain; }

/* BNotK Feed */
.bnotk-feed-list { list-style: none; padding: 0; }
.bnotk-feed-list li { padding: 15px 0; border-bottom: 1px solid var(--border-color); }
.bnotk-feed-list a { font-weight: 500; color: var(--link-color); text-decoration: none; font-size: 1.05rem; }
.bnotk-feed-list a:hover { text-decoration: underline; }
.bnotk-feed-list .feed-date { display: block; font-size: 0.85rem; color: #888; margin: 4px 0; }
.bnotk-feed-list .feed-excerpt { font-size: 0.9rem; color: #555; margin: 0; }

/* Sidebar */
.site-sidebar { background: var(--light-bg); padding: 30px; border-radius: 4px; }
.sidebar-widget { margin-bottom: 30px; }
.sidebar-widget h3 { font-size: 1.3rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; margin-bottom: 15px; }
.contact-table { width: 100%; border-collapse: collapse; }
.contact-table td { padding: 8px 0; vertical-align: top; }
.contact-table td:first-child { font-weight: bold; width: 40%; }

/* Footer */
.site-footer { background: var(--primary-color); color: #fff; padding: 40px 20px; text-align: center; margin-top: 60px; }
.footer-nav { margin-bottom: 20px; }
.footer-nav a { color: #fff; text-decoration: none; margin: 0 10px; }
.footer-nav a:hover { text-decoration: underline; }

/* Forms */
.notar-form { display: flex; flex-direction: column; gap: 15px; }
.notar-form input, .notar-form textarea { width: 100%; padding: 10px; border: 1px solid var(--border-color); font-family: 'Roboto', sans-serif; }
.notar-form button { background: var(--primary-color); color: #fff; border: none; padding: 12px 20px; cursor: pointer; font-size: 1rem; transition: background 0.3s; }
.notar-form button:hover { background: var(--secondary-color); }
.dsgvo-row { display: flex; align-items: flex-start; gap: 10px; }
.dsgvo-row input { width: auto; margin-top: 5px; }

/* Map */
#anfahrt-map { width: 100%; height: 400px; margin-bottom: 20px; border: 1px solid var(--border-color); }

/* Cookie Banner */
#cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; border-top: 1px solid #ddd; padding: 20px; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 9999; display: none; flex-direction: column; align-items: center; text-align: center; }
.cookie-buttons { margin-top: 15px; display: flex; gap: 10px; }
.cookie-btn { padding: 10px 20px; border: none; cursor: pointer; font-weight: bold; }
.cookie-accept { background: var(--primary-color); color: #fff; }
.cookie-decline { background: #eee; color: #333; }

/* Tätigkeitsfelder */
.taetigkeitsfelder-list { list-style: none; padding: 0; columns: 2; column-gap: 30px; }
.taetigkeitsfelder-list li { padding: 5px 0; }
.taetigkeitsfelder-list a { color: var(--link-color); text-decoration: none; font-weight: 500; }
.taetigkeitsfelder-list a:hover { color: var(--link-hover); text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-color); border-top: 1px solid var(--border-color); padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
  .nav-menu.active { display: flex; }
  .nav-menu ul.sub-menu { position: static; box-shadow: none; display: none; padding-left: 20px; background: transparent; }
  .nav-menu li:hover > ul.sub-menu { display: block; }
  .nav-menu ul.sub-menu a { color: var(--text-color); }
  .site-content { grid-template-columns: 1fr; }
  .hero-banner { height: 200px; }
  .notar-intro { flex-direction: column; }
  .notar-intro img { max-width: 100%; width: 100%; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .taetigkeitsfelder-list { columns: 1; }
}
