/* ===================================
   RA Jörg Ritter - Styles
   =================================== */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --color-primary: #c41e3a;
    --color-primary-dark: #8a1520;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg: #ffffff;
    --color-bg-light: #f9faf9;
    --color-bg-lighter: #fafafa;
    --color-border: #e0e0e0;

    /* Typography */
    --font-family: Arial, Helvetica, sans-serif;
    --font-size-base: 16px;
    --line-height: 1.6;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Layout */
    --container-width: 1200px;
    --border-radius: 8px;

    /* Transitions */
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

/* ===================================
   Header & Navigation
   =================================== */

.header {
    background: var(--color-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: var(--spacing-sm) 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: var(--transition);
    padding: var(--spacing-xs) var(--spacing-sm);
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #c41e3a;
    color: #fff;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-text);
    margin: 3px 0;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    background: white;
    color: var(--color-text);
    padding: var(--spacing-md) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: var(--spacing-sm);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-xs);
    font-weight: bold;
    color: #333;
}

.hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    font-size: 2.5rem;
    margin: 0;
    padding: 0 20px;
    text-align: center;
    width: 90%;
    /* SEO-only: Hide visually but keep for search engines */
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 300;
    color: var(--color-text);
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-light);
}

.hero-images {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    height: 400px;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-images-wrapper {
    display: flex;
    height: 100%;
}

.hero-images img {
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    transition: width 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.hero-images img:nth-child(1) {
    width: 70%;
}

.hero-images img:nth-child(2) {
    width: 15%;
}

.hero-images img:nth-child(3) {
    width: 15%;
}


.slider-dots {
    display: none;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===================================
   Sections
   =================================== */

.section {
    padding: var(--spacing-xl) 0;
}

.section:nth-child(even) {
    background: var(--color-bg-lighter);
}

.section-title {
    font-family: 'Times New Roman', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: #333;
}

.section-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   Kanzlei Section
   =================================== */

.kanzlei-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-lg);
    align-items: start;
}

.kanzlei-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

.kanzlei-text h3 {
    color: #666;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-size: 1.3rem;
}

.kanzlei-text p {
    margin-bottom: var(--spacing-sm);
}

.kanzlei-text ul {
    list-style: disc;
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.kanzlei-text ul li {
    margin-bottom: var(--spacing-xs);
}

.kanzlei-image {
    position: sticky;
    top: 100px;
}

.kanzlei-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.languages {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--color-bg-light);
    border-left: 4px solid var(--color-primary);
}

/* ===================================
   Rechtsgebiete Section
   =================================== */

.rechtsgebiete-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: var(--spacing-lg);
}

.rechtsgebiet-card {
    background: white;
    padding: 18px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.rechtsgebiet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-icon {
    width: 28px;
    height: 28px;
    margin: 0 auto 10px;
    color: #666;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.rechtsgebiet-card h3 {
    font-family: 'Times New Roman', serif;
    color: #666;
    margin-bottom: 0;
    font-size: 15px;
    font-weight: normal;
}

.rechtsgebiet-card p {
    color: #555;
}

/* ===================================
   Werdegang Section
   =================================== */

.werdegang-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-lg);
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.werdegang-image {
    position: sticky;
    top: 100px;
}

.werdegang-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.timeline {
    position: relative;
    padding-left: var(--spacing-md);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #666;
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-md);
}

.timeline-marker {
    position: absolute;
    left: -7px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #666;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #666;
}

.timeline-content h3 {
    color: #666;
    margin-bottom: var(--spacing-xs);
}

.timeline-content p {
    margin-bottom: var(--spacing-xs);
}

/* ===================================
   Kontakt Section
   =================================== */

.kontakt-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.kontakt-info h3 {
    color: #666;
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
}

.kontakt-item {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.kontakt-item .icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.kontakt-item a {
    color: #c41e3a;
    text-decoration: none;
}

.kontakt-item a:hover {
    color: #8a1520;
    text-decoration: underline;
}

.kontakt-image {
    position: sticky;
    top: 100px;
}

.kontakt-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.kontakt-map {
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.map-placeholder {
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-light);
    padding: var(--spacing-md);
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: #f5f5f5;
    color: #333;
    padding: var(--spacing-md) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    color: #333;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #c41e3a;
}

/* ===================================
   Modal Styles
   =================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 40px;
    border: 1px solid #888;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #666;
    padding-bottom: 15px;
}

.modal-header h2 {
    color: #666;
    margin: 0;
    font-family: 'Times New Roman', serif;
    font-size: 32px;
}

.modal-content h3 {
    color: #666;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-content h4 {
    color: #333;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 16px;
}

.modal-content p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.modal-content ul {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.modal-content a {
    color: #c41e3a;
    text-decoration: none;
}

.modal-content a:hover {
    text-decoration: underline;
}

.close {
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-images {
        height: 250px;
    }

    .hero-images img:nth-child(3) {
        display: none;
    }

    .hero-images img:nth-child(1) {
        left: 0 !important;
        width: 70% !important;
    }

    .hero-images img:nth-child(2) {
        left: 70% !important;
        width: 30% !important;
    }

    .section-title {
        font-size: 2rem;
    }

    .kanzlei-content {
        grid-template-columns: 1fr;
    }

    .kanzlei-image {
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: var(--spacing-sm);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .rechtsgebiete-grid {
        grid-template-columns: 1fr;
    }

    .werdegang-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .werdegang-image {
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }

    .kontakt-grid {
        grid-template-columns: 1fr;
    }

    .kontakt-image {
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero {
        padding: var(--spacing-md) 0;
    }

    .section {
        padding: var(--spacing-md) 0;
    }
}

/* Utility Classes - Security: remove inline styles */
.text-left {
    text-align: left;
}

.mt-2 {
    margin-top: 2rem;
}
