@charset "utf-8";

/* Font-Faces - Lokale Fonts (keine Google Fonts) */

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/opensans-400.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/opensans-700.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Handlee';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/handlee-400.woff2') format('woff2');
    font-display: swap;
}


/* Reset & Base Styles */

* {
    box-sizing: border-box;
}

/* Bilder haben transparenten Hintergrund */
img,
picture {
    background: transparent !important;
    background-color: transparent !important;
}

/* Alle Bild-Elemente mit PNG explizit transparent */
img[src*=".png"],
picture img[src*=".png"],
[style*="background-image"][style*=".png"] {
    background: transparent !important;
    background-color: transparent !important;
}

.clear {
    clear: both;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-size: 100%;
    font-family: 'Open Sans', sans-serif;
}


/* Header Section */

.header {
    padding: 0 0 50px 0;
}

.header h1,
.header h2 {
    font-family: Handlee, cursive;
    color: #333;
    font-size: 60px;
    font-weight: 400;
    margin: 0 5px;
    text-align: center;
    line-height: 60px;
}

.header h2 {
    padding: 20px 5px 10px 5px;
}

.underline {
    border-bottom: 2px solid currentColor;
    display: inline-block;
    line-height: 0.75;
    text-shadow: 2px 2px #f4f4f4, 2px -2px #f4f4f4, -2px 2px #f4f4f4, -2px -2px #f4f4f4;
}


/* Navigation */

nav {
    position: relative;
    width: 100%;
    height: 100px;
    background: #fff;
    border-bottom: 2px solid #333;
    padding: 20px 0;
    z-index: 100;
}

nav .mycontainer {
    width: 90%;
    margin: 0 auto;
}

.logo {
    float: left;
}

.logo img {
    border: 0;
    width: 64px;
    height: auto;
    max-width: 64px;
    background: transparent;
}

.menu {
    float: left;
    display: block;
    position: relative;
    padding: 12px 20px 12px 40px;
}

.topnav,
.topnav li {
    list-style: none;
    height: 36px;
    padding: 0;
    margin: 0;
}

.topnav li {
    display: block;
    float: left;
    margin-right: 18px;
}

.topnav li.current a {
    color: #d94f5c;
}

.topnav a {
    text-align: center;
    padding: 0.25em 0.5em;
    text-decoration: none;
    display: block;
    position: relative;
    color: #333;
    transition: color 0.3s;
    -webkit-touch-callout: none;
    -khtml-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.topnav li.current a::before {
    transform: scale3d(1, 1, 1);
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
}

.topnav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #d94f5c;
    transform: scale3d(0, 1, 1);
    transition: transform 0.1s;
}

.topnav a:hover {
    color: #929292;
}

/* Focus-Indikatoren für Barrierefreiheit (nur bei Tastatur-Navigation) */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid #d94f5c;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Focus für Navigations-Links */
.topnav a:focus-visible {
    outline-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Focus für Formulare */
form.search input:focus-visible {
    outline-color: #d94f5c;
    border-color: #d94f5c;
}

form.search button:focus-visible {
    outline-color: #d94f5c;
}


/* Search Form */

form.search {
    position: relative;
    float: right;
    margin: 12px 0;
    width: 15%;
}

.startseite.startwindow form.search {
    float: none;
    margin: 12px auto;
    width: 80%;
    position: relative;
}

.startwindow form.search {
    width: 70%;
    max-width: 500px;
    margin: 20px auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    white-space: nowrap;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    border: 0;
}


form.search input {
    margin: 0;
    padding: 0.25em 0.5em;
    border: 1px solid #ccc;
    width: 100%;
}

input[type=text] {
    border-radius: 10px;
    font-size: 16px;
    line-height: 24px;
    color: #444;
}


/* Window & Container */

.startwindow {
    height: auto;
    width: 100%;
    background: #f4f4f4;
    overflow: visible;
}

/* Name Header mit Bild und transparentem Streifen */
.name-header-image {
    background: #f4f4f4;
    padding: 0;
}

.name-hero-image {
    position: relative;
    width: 100%;
    height: 500px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    overflow: hidden;
    background-color: #f4f4f4;
}

/* Fallback wenn Bild nicht vorhanden - Gradient basierend auf Geschlecht */
/* NUR wenn KEIN inline background-image gesetzt ist */
/* WICHTIG: Diese Regeln überschreiben NICHT inline styles mit !important */
body#w .name-hero-image:not([style*="background-image"]),
body#w .name-hero-image[style=""] {
    background: linear-gradient(135deg, #e7c0b1 0%, #f4d9c9 100%);
}

body#m .name-hero-image:not([style*="background-image"]),
body#m .name-hero-image[style=""] {
    background: linear-gradient(135deg, #97a4b2 0%, #b8c5d3 100%);
}

.name-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 20px;
    text-align: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    max-height: 25%;
    min-height: auto;
}

.name-hero-title {
    font-family: Handlee, cursive;
    font-size: 72px;
    font-weight: 400;
    color: #1a9fb8;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: visible;
    white-space: nowrap;
}

.name-gender-info {
    text-align: center;
    padding: 30px 20px;
}

@media (min-width: 1200px) {
    .name-hero-image {
        height: 800px;
    }
}

@media (max-width: 768px) {
    .name-hero-image {
        height: 200px;
        background-size: 100% !important;
    }
    
    .name-hero-overlay {
        padding: 8px 10px;
        max-height: 15% !important;
        min-height: auto;
    }
    
    .name-hero-title {
        font-size: 36px;
        line-height: 1.1;
    }
}

@media (max-width: 470px) {
    .name-hero-image {
        height: 300px;
        background-size: 100% !important;
    }
    
    .name-hero-overlay {
        padding: 6px 8px;
        max-height: 15% !important;
        min-height: auto;
    }
    
    .name-hero-title {
        font-size: 28px;
        line-height: 1.1;
    }
    
    /* Mobile: Startseite Submenu 100% Breite */
    .window.bg.startseite .submenu-dp a {
        width: 100% !important;
    }
}

.window {
    height: auto;
    width: 100%;
    background: #f4f4f4;
    position: relative;
    overflow: visible;
}

.window::after,
.window::before {
    position: absolute;
    content: '';
    pointer-events: none;
    top: -70px;
    left: 0;
    z-index: 10;
    width: 50%;
    height: 70px;
    background: inherit;
}

.window::before {
    border-radius: 0 80px 0 0;
}

.window::after {
    left: 50%;
    border-radius: 80px 0 0 0;
}

.window.bg {
    background: #97a4b2;
}

/* Barrierefreiheit: Weißer Text auf grauem Hintergrund in .window.bg */
.window.bg p,
.window.bg .text p,
.window.bg h2,
.window.bg .header h2,
.window.bg .underline,
.window.bg .submenu-dp a {
    color: #fff !important;
}

/* Ausnahme: Seltenheit-Text hat immer schwarze Schrift */
.seltenheit-text {
    color: #333 !important;
}

/* Ausnahme: thirdthird-box ohne bg hat schwarze Schrift */
.window:not(.bg) .thirdthird-box p {
    color: #333 !important;
}

/* Geschlechtsspezifische Farben für Namensseiten */

#w .window.bg {
    background: #e7c0b1;
}

/* Barrierefreiheit: Weißer Text auch für weibliche Namen */
#w .window.bg p,
#w .window.bg .text p,
#w .window.bg .thirdthird-box p,
#w .window.bg h2,
#w .window.bg .header h2,
#w .window.bg .underline,
#w .window.bg .submenu-dp a {
    color: #fff !important;
}

#w .window:not(.bg) .halfbox .bigletter {
    border-color: #e7c0b1;
}

#w .window.bg .underline {
    text-shadow: 2px 2px #e7c0b1, 2px -2px #e7c0b1, -2px 2px #e7c0b1, -2px -2px #e7c0b1;
}

#w .window:not(.bg) .halfbox .bigletter p,
#w .window:not(.bg) h2,
#w h1,
#w .startwindow h1 {
    color: #e7c0b1;
}

#m .window.bg {
    background: #97a4b2;
}

/* Barrierefreiheit: Weißer Text auch für männliche Namen */
#m .window.bg p,
#m .window.bg .text p,
#m .window.bg .thirdthird-box p,
#m .window.bg h2,
#m .window.bg .header h2,
#m .window.bg .underline,
#m .window.bg .submenu-dp a {
    color: #fff !important;
}

#m .window:not(.bg) .halfbox .bigletter {
    border-color: #97a4b2;
}

#m .window.bg .underline {
    text-shadow: 2px 2px #97a4b2, 2px -2px #97a4b2, -2px 2px #97a4b2, -2px -2px #97a4b2;
}

#m .window:not(.bg) .halfbox .bigletter p,
#m .window:not(.bg) h2,
#m h1,
#m .startwindow h1 {
    color: #97a4b2;
}

.mycontainer {
    position: static;
    margin: 0 auto;
    width: 1000px;
    overflow: visible;
    display: block;
}

.startwindow .mycontainer,
.window .mycontainer {
    padding-bottom: 150px;
}


/* Start Page Specific */

.startwindow h1 {
    font-family: Handlee, cursive;
    font-weight: 400;
    font-size: 80px;
    width: 100%;
    text-align: center;
    padding: 50px 0 0 0;
    margin: 20px 0 0 0;
    line-height: 100%;
    vertical-align: middle;
    overflow: visible;
}

.startwindow.categorypage h1 {
    font-size: 70px;
    padding: 20px 0 0 0;
    margin: 10px 0 0 0;
}

/* Name-Detail-Seiten: H1 ohne Margin */
.name-header-image .name-hero-title,
.startwindow.name-header-image h1,
.startwindow.name-header-image .name-hero-title {
    margin: 0 !important;
    padding: 0 !important;
}

.startseite h1 {
    color: #97a4b2;
}

.startseite .halfbox {
    margin-bottom: 40px;
}


/* Submenu */

.submenu-dp {
    padding: 40px 0 0 0;
    position: relative;
}

.startseite .submenu-dp a {
    width: 50%;
}

.submenu-dp a {
    position: relative;
    float: left;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    color: #333;
    display: block;
    width: 25%;
    height: 200px;
    text-align: center;
    padding: 0 20px;
}


/* Submenu auf Namensseiten (ohne Icons) */

.window.bg .submenu-dp a {
    width: 25%;
    height: auto;
    padding: 10px 20px;
}

.window.bg .submenu-dp a::before,
.window.bg .submenu-dp a::after {
    display: none;
}


/* Startseite: Kreise und Icons wieder anzeigen */

.window.bg.startseite .submenu-dp a {
    width: 50%;
    height: 200px;
    padding: 0 20px;
}

.window.bg.startseite .submenu-dp a::before,
.window.bg.startseite .submenu-dp a::after {
    display: block;
}

.submenu-dp a:hover {
    color: #fff;
    transition: all 0.3s;
}

/* Hover-Effekt für Submenü auf grauem Hintergrund */
.window.bg .submenu-dp a:hover {
    color: #fff !important;
    opacity: 0.8;
}

.submenu-dp a::before {
    border: 2px solid #333;
    border-radius: 100%;
    margin: 0 auto;
    content: '';
    position: relative;
    top: 0;
    left: 0;
    display: block;
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
    z-index: 5;
    transition: all 0.3s;
}

.submenu-dp a:hover::before {
    background: #fff;
    border-color: #fff;
    opacity: 50%;
}

.submenu-dp a::after {
    width: 64px;
    height: 64px;
    content: '';
    position: absolute;
    top: calc(60px - 31px);
    left: calc(50% - 32px);
    z-index: 5;
    display: block;
    margin: 0 auto;
    background-repeat: no-repeat;
    background-color: transparent;
}

.startseite .submenu-dp a:nth-child(1)::after {
    background-image: url('https://www.namenswelt.de/site/templates/img/herkunft.png');
    background-color: transparent;
}

.startseite .submenu-dp a:nth-child(2)::after {
    background-image: url('/img/w.png');
    background-color: transparent;
    background-size: contain;
    background-position: center;
}


/* Startseite spezifische Icons für Jungennamen/Mädchennamen */

.window.bg.startseite .submenu-dp a:nth-child(1)::after {
    background-image: url('/img/m.png');
    background-size: contain;
    background-position: center;
    background-color: transparent;
}

.window.bg.startseite .submenu-dp a:nth-child(2)::after {
    background-image: url('/img/w.png');
    background-size: contain;
    background-position: center;
    background-color: transparent;
}

/* Mobile: Submenu zentrieren */
@media (max-width: 768px) {
    .window.bg.startseite .submenu-dp {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .window.bg.startseite .submenu-dp a {
        float: none;
        display: block;
        width: 100% !important;
        margin: 0 auto;
    }
    
    /* Hero-Bild Höhe für Mobile reduzieren */
    .name-hero-image {
        height: 300px;
    }
}


/* Bedeutung & Herkunft - zentriert, kein 2-Spalten-Layout */
.bedeutung-text {
    font-size: 18px;
    line-height: 1.7;
    margin: 30px 0;
    text-align: center;
    color: #333;
    font-family: 'Open Sans', sans-serif;
}

/* Seltenheit - zentriert, schwarzer Text auf weißem Hintergrund */
.seltenheit-text {
    font-size: 18px;
    line-height: 1.7;
    margin: 30px 0;
    text-align: center;
    color: #333 !important;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
}

/* Namenstage als Fließtext */

.name-days-content {
    text-align: center;
}

.name-days-text {
    font-size: 16px;
    line-height: 1.6;
    margin: 20px 0;
    text-align: center;
}


/* Spitznamen als Fließtext */

.nicknames-content {
    text-align: center;
}

.nicknames-text {
    font-size: 16px;
    line-height: 1.6;
    margin: 20px 0;
    text-align: center;
}


/* Wortzusammensetzungen als Fließtext */

.word-compositions-content {
    text-align: center;
}

.word-compositions-text {
    font-size: 16px;
    line-height: 1.6;
    margin: 20px 0;
    text-align: center;
}


/* Halfbox Layout */

.halfbox {
    float: left;
    width: 50%;
    height: 100%;
}

#m.halfbox,
#w.halfbox {
    height: auto;
}

#m.halfbox .mycontainer,
#w.halfbox .mycontainer {
    width: 100%;
}

#m.halfbox {
    border-right: 1px solid #666;
}


/* Bigletter & Text für Namensseiten */

.halfbox .bigletter p {
    font-family: Handlee, cursive;
    text-align: right;
    font-size: 70px;
    line-height: 70px;
    margin-right: 0;
}

.halfbox .bigletter {
    height: 400px;
    height: 100%;
    padding: 15px 45px 15px 0;
    border-right: 3px solid;
}

.window.bg .halfbox .bigletter {
    border-color: #333;
}

.window.bg #seltenheit .halfbox .bigletter {
    padding: 40px 45px 40px 0;
}

.halfbox .text {
    padding: 15px 0 15px 45px;
}

.halfbox .text p {
    margin-left: 0;
    text-align: left !important;
}

.thirdthird-box {
    position: relative;
    float: left;
    width: 100%;
    height: auto;
}

.thirdthird-box p {
    text-align: center;
}

/* Ausnahme: Legal-Pages haben linksbündigen Text */
.window.legal-page .thirdthird-box p {
    text-align: left !important;
}

.thirdthird-box .linkbox {
    text-align: center;
}

/* Legal Pages (Impressum, Datenschutz) - Verbesserte Formatierung */
.window.legal-page .thirdthird-box {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    padding: 40px 20px;
}

.window.legal-page .thirdthird-box h2 {
    font-family: 'Open Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 40px 0 20px 0;
    padding: 0;
    border-bottom: 2px solid #d94f5c;
    padding-bottom: 10px;
}

.window.legal-page .thirdthird-box h2:first-of-type {
    margin-top: 0;
}

.window.legal-page .thirdthird-box h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #555;
    margin: 30px 0 15px 0;
    padding: 0;
}

.window.legal-page .thirdthird-box p {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    margin: 0 0 20px 0;
    text-align: left !important;
}

.window.legal-page .thirdthird-box ul {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    margin: 15px 0 25px 0;
    padding-left: 30px;
}

.window.legal-page .thirdthird-box li {
    margin: 10px 0;
}

.window.legal-page .thirdthird-box strong {
    font-weight: 600;
    color: #333;
}

.linkbox a {
    border: 2px solid #333;
    border-radius: 10px;
    padding: 10px 65px;
    margin: 5px 10px;
    text-decoration: none;
    color: #333;
    font-size: 22px;
    transition: all 0.3s;
    line-height: 100%;
    display: inline-block;
}

.linkbox a:hover {
    border-color: #fff;
    background: #fff;
}

.linkbox span {
    border: 2px solid #616161a8;
    border-radius: 10px;
    padding: 10px 65px;
    margin: 5px 10px;
    text-decoration: none;
    color: #4a4a4a;
    font-size: 22px;
    transition: all 0.3s;
    line-height: 100%;
    display: inline-block;
}


/* Rangliste */

.rangliste ul {
    list-style: none;
    color: #fff;
    width: 250px;
    margin: 0 auto;
    position: relative;
    padding: 0;
}

.rangliste li {
    list-style: none;
    display: block;
    width: 100%;
    height: 40px;
    margin-bottom: 10px;
}

.rangliste li span {
    margin-right: 10px;
    display: block;
    width: 40px;
    height: 40px;
    padding: 7px 0;
    border: 1px solid #333;
    text-align: center;
    vertical-align: middle;
    position: absolute;
}

.rangliste li a {
    text-decoration: none;
    color: #333;
    font-size: 23px;
    padding: 7px 0 0 50px;
    display: block;
}

.rangliste li a:hover {
    color: #fff;
    transition: all 0.3s;
}


/* Gender-specific colors */

.startseite .m.rangliste li span {
    border: 1px solid #333;
    background: #97a4b2;
}

.startseite .w.rangliste li span {
    border: 1px solid #333;
    background: #e7c0b1;
}

.startseite .m.rangliste li a:hover {
    color: #97a4b2;
}

.startseite .w.rangliste li a:hover {
    color: #bf9180;
}


/* Footer */

.footer {
    width: 100%;
    background: #222b27;
    border-top: 3px solid #c7af7d;
}

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

.breadcrumb-wrapper {
    flex: 1;
}

.impressumslink {
    outline: 0;
    color: #fff;
    font-size: 1em;
    text-decoration: none;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    letter-spacing: 2px;
}

.footer-links {
    float: right;
    text-align: right;
}

.footer-links .impressumslink {
    display: inline-block;
    padding: 12px 10px 12px 0;
    margin-left: 10px;
}

.breadcrumb {
    float: left;
    padding: 12px 0 12px 10px;
    color: #fff;
}

.breadcrumb a,
.breadcrumb span {
    outline: 0;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    letter-spacing: 2px;
}

.breadcrumb a:hover,
.impressumslink:hover {
    text-decoration: underline;
}


/* Buchstabenliste */

.buchstabenliste {
    list-style: none;
    padding: 0;
}

.buchstabenliste li {
    list-style: none;
    float: left;
    padding: 5px 10px;
    margin: 0 0.5% 10px;
    text-align: center;
    border: 1px solid #888;
    border-radius: 5px;
    width: 19%;
}

.buchstabenliste li a {
    display: block;
    width: 100%;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    text-align: center;
}

.buchstabenliste li a:hover {
    text-decoration: underline;
}


/* Namensliste */

.namensliste {
    list-style: none;
    padding: 0;
}

.namensliste li {
    list-style: none;
    float: left;
    padding: 5px 10px;
    margin: 0 0.5% 10px;
    text-align: center;
    border: 1px solid #888;
    border-radius: 5px;
    width: 19%;
}

.namensliste li a {
    display: block;
    width: 100%;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    text-align: center;
}

.namensliste li a:hover {
    text-decoration: underline;
}


/* Gender Symbol auf Namensdetailseiten - mit Kreis wie auf Startseite */

.name-gender-symbol {
    display: block;
    width: 100%;
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.gender-icon-link {
    display: inline-block;
    width: 120px;
    height: 120px;
    position: relative;
    text-decoration: none;
    margin: 0 auto;
}


/* Kreis für das Symbol */

.gender-icon-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    border: 2px solid #333;
    border-radius: 100%;
    z-index: 1;
    transition: all 0.3s;
}

.gender-icon-link:hover::before {
    background: #fff;
    border-color: #fff;
    opacity: 50%;
}


/* Icon im Kreis */

.gender-icon-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    z-index: 2;
}


/* Geschlechtsspezifische Icons */

.gender-icon-link.gender-w::after {
    background-image: url('/img/w.png');
    background-color: transparent;
}

.gender-icon-link.gender-m::after {
    background-image: url('/img/m.png');
    background-color: transparent;
}


/* PNG only - no WebP */


/* Ounderline (alte Variante - nicht mehr verwendet) */

.ounderline {
    display: block;
    height: auto;
    width: 100%;
    position: relative;
    border-bottom: 2px dashed #d6d6d6;
    height: 5px;
    overflow: visible;
    margin: 0 auto 20px;
}

.ounderline img {
    display: block;
    padding: 0 5px;
    position: relative;
    top: -12px;
    margin: 0 auto;
    overflow: visible;
    z-index: 5;
    background: transparent;
}

.subline {
    position: relative;
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    clear: both;
}

.rang {
    text-align: center;
    position: relative;
    display: block;
    color: #fff;
    margin: 20px auto;
    text-transform: uppercase;
    height: auto;
    font-weight: 700;
    clear: both;
}

.rang div {
    position: relative;
    display: inline-block;
    height: auto;
    line-height: 10px;
}

.rang div:before {
    content: "";
    display: inline-block;
    border-top: 14px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 10px solid;
}

.rang div:after {
    content: "";
    display: inline-block;
    border-top: 14px solid transparent;
    border-right: 10px solid;
    border-bottom: 14px solid transparent;
    border-left: 10px solid transparent;
}


/* Standard-Farben für Rang (grau) */

.rang div:before {
    border-left-color: #f4f4f4;
}

.rang div:after {
    border-right-color: #f4f4f4;
}

.rang div span {
    color: #fff;
    display: inline-block;
    padding: 9px 8px;
    letter-spacing: 2px;
    vertical-align: top;
    line-height: 10px;
}


/* Rang-Box mit Hintergrundfarbe je nach Geschlecht */

#m .rang div {
    background: #97a4b2;
}

#w .rang div {
    background: #e7c0b1;
}

#m .rang div:before {
    border-left-color: #97a4b2;
}

#m .rang div:after {
    border-right-color: #97a4b2;
}

#w .rang div:before {
    border-left-color: #e7c0b1;
}

#w .rang div:after {
    border-right-color: #e7c0b1;
}


/* Responsive */

@media (max-width: 1024px) {
    .mycontainer {
        width: 90%;
    }
    form.search {
        width: 20%;
    }
    .startseite.startwindow form.search,
    .startwindow form.search {
        width: 90%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    nav {
        height: auto;
        padding: 10px 0;
        min-height: auto;
    }
    nav .mycontainer {
        width: 95%;
    }
    .logo {
        float: none;
        text-align: center;
        margin-bottom: 10px;
    }
    .logo img {
        max-width: 48px;
        height: auto;
        background: transparent;
    }
    .menu {
        float: none;
        padding: 0;
        text-align: center;
        width: 100%;
    }
    .topnav {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    .topnav li {
        float: none;
        display: inline-block;
        margin-right: 0;
    }
    .topnav a {
        padding: 0.5em 0.75em;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    form.search {
        float: none;
        width: 90%;
        margin: 12px auto;
        position: relative;
    }
    form.search input {
        width: 100%;
        box-sizing: border-box;
        min-height: 44px;
        font-size: 16px;
        /* Verhindert Zoom auf iOS */
    }
    .halfbox {
        width: 100%;
        float: none;
    }
    #m.halfbox {
        border-right: none;
        border-bottom: 1px solid #666;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    .submenu-dp a {
        width: 50% !important;
        height: auto !important;
        min-height: 100px;
        padding: 20px 10px !important;
    }
    .startwindow h1 {
        font-size: 32px;
        padding: 20px 0 15px 0;
    }
    .startwindow.categorypage h1 {
        font-size: 28px;
        padding: 12px 0 8px 0;
        margin: 5px 0 0 0;
    }
    .header h1,
    .header h2 {
        font-size: 32px;
        line-height: 1.2;
        padding: 12px 5px 8px 5px;
    }
    /* Legal Pages - kleinere Überschriften auf Tablet */
    .window.legal-page .startwindow.categorypage h1,
    .startwindow.categorypage.legal-page h1 {
        font-size: 24px;
        padding: 10px 0 6px 0;
    }
    .window.legal-page .thirdthird-box h2 {
        font-size: 20px;
    }
    .window.legal-page .thirdthird-box h3 {
        font-size: 18px;
    }
    .halfbox .bigletter {
        height: auto;
        min-height: 200px;
        padding: 20px 20px 20px 0;
    }
    .halfbox .bigletter p {
        font-size: 50px;
        line-height: 50px;
    }
    .halfbox .text {
        padding: 20px 0 20px 20px;
    }
    .buchstabenliste li,
    .namensliste li {
        width: 18%;
        margin: 0 1% 10px;
        font-size: 14px;
    }
    .rangliste {
        width: 100%;
        max-width: 350px;
    }
    .rangliste ul {
        width: 100%;
    }
    .linkbox a,
    .linkbox span {
        padding: 12px 20px;
        font-size: 16px;
        margin: 5px 5px;
        display: inline-block;
        min-height: 44px;
        box-sizing: border-box;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    .window::after,
    .window::before {
        top: -50px;
        height: 50px;
    }
    .window .mycontainer,
    .startwindow .mycontainer {
        padding-bottom: 80px;
    }
    /* Autocomplete für mobile */
    .autocomplete-results.autocomplete-mobile {
        max-width: 100% !important;
        width: 90vw !important;
        left: 5vw !important;
        position: fixed !important;
    }
    .autocomplete-item {
        min-height: 44px;
        padding: 14px 16px !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    /* Footer mobile */
    .footer {
        font-size: 12px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .breadcrumb-wrapper {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .breadcrumb {
        float: none;
        font-size: 11px;
        line-height: 1.4;
        padding: 8px 0 8px 10px;
    }
    
    .breadcrumb a,
    .breadcrumb span {
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    .footer-links {
        float: none;
        text-align: left;
        width: 100%;
    }
    
    .footer-links .impressumslink {
        display: block;
        margin: 5px 0;
        margin-left: 0;
        padding: 8px 0 8px 10px;
        font-size: 12px;
        letter-spacing: 1px;
    }
}

/* 404 Error Page Styles */
.error-content {
    text-align: center;
    padding: 60px 20px;
    min-height: 400px;
}

.error-code {
    font-family: Handlee, cursive;
    font-size: 120px;
    line-height: 1;
    color: #97a4b2;
    margin: 0;
    font-weight: 400;
}

.error-title {
    font-size: 36px;
    color: #333;
    margin: 20px 0;
    font-weight: 400;
}

.error-message {
    font-size: 18px;
    color: #666;
    margin: 20px auto;
    max-width: 600px;
    line-height: 1.6;
}

.error-actions {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.error-button {
    display: inline-block;
    padding: 15px 30px;
    background: #97a4b2;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #97a4b2;
}

.error-button:hover {
    background: #7a8a9b;
    border-color: #7a8a9b;
    transform: translateY(-2px);
}

.error-button.secondary {
    background: transparent;
    color: #97a4b2;
    border-color: #97a4b2;
}

.error-button.secondary:hover {
    background: #97a4b2;
    color: #fff;
}

.popular-names {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #eee;
}

.popular-names h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
}

.name-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.name-suggestion-link {
    display: inline-block;
    padding: 10px 20px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: all 0.3s;
}

.name-suggestion-link:hover {
    background: #97a4b2;
    color: #fff;
    border-color: #97a4b2;
}

.search-box-404 {
    margin: 40px auto;
    max-width: 500px;
}

.search-box-404 form.search {
    width: 100%;
    float: none;
    margin: 0;
}

@media (max-width: 768px) {
    .error-code {
        font-size: 80px;
    }
    .error-title {
        font-size: 28px;
    }
    .error-message {
        font-size: 16px;
    }
    .error-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .error-button {
        width: 100%;
        text-align: center;
    }
}

/* Search Page Styles */
.search-page-header {
    padding: 20px 0;
    max-width: 600px;
    margin: 0 auto;
}

.search-page-form {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
}

.search-page-form input {
    width: calc(100% - 100px);
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #333;
    border-radius: 10px 0 0 10px;
    border-right: none;
}

.search-page-form button {
    width: 100px;
    padding: 12px 16px;
    font-size: 16px;
    background: #333;
    color: #fff;
    border: 2px solid #333;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
}

.search-page-form button:hover {
    background: #d94f5c;
    border-color: #d94f5c;
}

.search-results {
    padding: 20px 0;
    max-width: 900px;
    margin: 0 auto;
}

.search-info {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
}

.search-info h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.results-count {
    font-size: 14px;
    color: #888;
}

.results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.result-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.result-name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-name:hover {
    color: #d94f5c;
}

.result-gender {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    background: #97a4b2;
    color: #fff;
    text-transform: uppercase;
}

.result-gender.w {
    background: #e7c0b1;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.result-detail {
    font-size: 14px;
}

.result-detail strong {
    color: #666;
    display: block;
    margin-bottom: 4px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

@media (max-width: 480px) {
    .startwindow h1 {
        font-size: 28px;
        padding: 15px 0 10px 0;
    }
    .startwindow.categorypage h1 {
        font-size: 22px;
        padding: 8px 0 5px 0;
        margin: 5px 0 0 0;
    }
    .window.legal-page .thirdthird-box {
        padding: 20px 15px;
    }
    /* Legal Pages - noch kleinere Überschriften auf Mobile */
    .window.legal-page .startwindow.categorypage h1,
    .startwindow.categorypage.legal-page h1 {
        font-size: 20px;
        padding: 6px 0 4px 0;
    }
    .window.legal-page .thirdthird-box h2 {
        font-size: 18px;
        margin: 25px 0 12px 0;
    }
    .window.legal-page .thirdthird-box h3 {
        font-size: 16px;
        margin: 20px 0 10px 0;
    }
    .window.legal-page .thirdthird-box p,
    .window.legal-page .thirdthird-box ul {
        font-size: 15px;
    }
    .header h1,
    .header h2 {
        font-size: 24px;
        padding: 10px 5px 8px 5px;
    }
    .halfbox .bigletter p {
        font-size: 40px;
        line-height: 40px;
    }
    .buchstabenliste li,
    .namensliste li {
        width: 31%;
        margin: 0 1% 10px;
        font-size: 12px;
        padding: 10px 5px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    .submenu-dp a {
        width: 100% !important;
        height: auto !important;
        min-height: 80px;
        padding: 15px 10px !important;
    }
    form.search {
        width: 95%;
    }
    .rangliste ul {
        width: 100%;
    }
