/* Bootstrap-like Grid System */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.col-xs-12, .col-sm-5, .col-sm-7, .col-sm-12, 
.col-md-5, .col-md-7, .col-md-10, .col-md-12, 
.col-lg-4, .col-lg-8, .col-lg-10, .col-lg-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    .col-sm-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
    .col-sm-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }
    .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    .col-md-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
    .col-md-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }
    .col-md-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
    .col-lg-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }
    .col-lg-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Flexbox utilities */
.d-flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

/* Bootstrap-like Navbar */
.navbar-fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

.navbar-toggle {
    display: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    position: relative;
    float: right;
    padding: 9px 10px;
    margin-top: 8px;
    margin-right: 15px;
    margin-bottom: 8px;
}

.navbar-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background-color: #fff;
    margin-bottom: 4px;
}

.navbar-toggle .icon-bar:last-child {
    margin-bottom: 0;
}

.navbar-collapse {
    padding-right: 15px;
    padding-left: 15px;
    overflow-x: visible;
    border-top: 1px solid transparent;
    box-shadow: none;
}

.navbar-collapse.collapse {
    display: block !important;
    height: auto !important;
    padding-bottom: 0;
    overflow: visible !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .navbar-toggle {
        display: block;
    }
    
    .navbar-collapse {
        display: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 10px;
    }
    
    .navbar-collapse.in {
        display: block;
    }
    
    .navbar-nav {
        margin: 7.5px -15px;
        flex-direction: column;
    }
    
    .navbar-nav li {
        width: 100%;
    }
    
    .navbar-nav a {
        padding: 10px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Hidden utilities */
.hidden-md, .hidden-lg {
    display: block;
}

@media (min-width: 768px) and (max-width: 991px) {
    .hidden-md {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .hidden-lg {
        display: none !important;
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
}

/* Typography */
h1 {
    color: #46688e;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

h2 {
    color: #46688e;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 18px;
    margin-top: 30px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

h3 {
    color: #46688e;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 25px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

h4 {
    color: #46688e;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 20px;
    letter-spacing: 0.5px;
}

/* Box Header Styles */
h3.boxheader {
    color: #46688e;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    border-bottom: 2px solid #04537d;
    padding-bottom: 8px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Links */
a {
    color: #04467d;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #286ea0;
    text-decoration: underline;
}

/* Main Container */
.wz-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    padding-top: 80px; /* Account for fixed navbar */
}

/* Ensure proper flexbox layout for main content areas */
@media (min-width: 576px) {
    .wz-container {
        display: flex;
        flex-wrap: wrap;
    }
    
    #sp1 {
        display: flex;
        flex-direction: column;
    }
    
    #sp2 {
        display: flex;
        flex-direction: column;
    }
}

/* Fix for the layout columns */
.wz-container > div {
    float: left;
}

@media (min-width: 576px) {
    .wz-container > div {
        float: none;
    }
}

/* Clear floats */
.wz-container::after {
    content: "";
    display: table;
    clear: both;
}

/* Navigation */
.wz-main-nav {
    background: linear-gradient(135deg, #46688e 0%, #286ea0 100%);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar-header button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    padding: 10px;
    cursor: pointer;
}

.navbar-nav {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
}

.navbar-nav li {
    position: relative;
    flex: 0 0 auto;
}

.navbar-nav a {
    display: block;
    padding: 15px 16px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.navbar-nav a:hover,
.navbar-nav .active a {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: #fff;
    transform: translateY(-2px);
}

/* Ensure navigation container takes full width */
.navbar-collapse {
    width: 100%;
}

#navbar {
    width: 100%;
}

#menue1 {
    width: 100%;
    justify-content: space-around;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {
    .navbar-nav a {
        padding: 15px 12px;
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .navbar-nav a {
        padding: 15px 8px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-nav li {
        width: 100%;
    }
    
    .navbar-nav a {
        padding: 12px 15px;
        font-size: 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav a:hover {
        transform: none;
        padding-left: 20px;
    }
}

/* Logo Section */
.first-pic {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 0;
    border-bottom: 3px solid #46688e;
}

.first-pic img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Main Content Area */
#sp1 {
    padding: 40px 30px;
    background-color: #fff;
    font-size: 17px;
    line-height: 1.7;
    color: #444;
}

#sp1 p {
    margin-bottom: 20px;
    text-align: justify;
}

#sp1 img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin: 10px 5px;
    transition: transform 0.3s ease;
}

#sp1 img:hover {
    transform: scale(1.02);
}

/* Sidebar */
#sp2 {
    padding: 30px 20px;
    background-color: #f8f9fa;
    border-left: 1px solid #e9ecef;
    font-size: 14px;
    line-height: 1.6;
}

/* Box Styles */
.box1, .box2, .box3, .box4 {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #46688e;
}

.box2 {
    font-size: 14px;
    color: #333;
}

/* Author Section */
.box2 img[alt="Michael Mitterer"] {
    border-radius: 50%;
    margin: 10px 10px 10px 0;
    float: left;
    border: 3px solid #46688e;
}

/* Button Styles */
button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Category Navigation */
.box2 nav img {
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 50%;
    padding: 8px;
    background-color: #f0f4f8;
    border: 2px solid #46688e;
}

.box2 nav a {
    display: inline-block;
    color: #46688e;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.box2 nav a:hover {
    border-bottom-color: #46688e;
    color: #286ea0;
}

/* Blockquote Styles */
blockquote {
    background-color: #f8f9fa;
    border-left: 5px solid #46688e;
    padding: 20px 25px;
    margin: 25px 0;
    font-style: italic;
    color: #555;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

blockquote p {
    margin-bottom: 15px;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Media Mentions */
#sp1 img[alt*="Kosten-beim-Zahnarzt.de"] {
    display: block;
    margin: 20px 0;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #fff;
}

/* Lists */
ul {
    padding-left: 25px;
    margin-bottom: 20px;
}

ul li {
    margin-bottom: 8px;
    color: #444;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
    }
    
    .navbar-nav a {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    #sp1 {
        padding: 20px 15px;
        font-size: 16px;
    }
    
    #sp2 {
        padding: 20px 15px;
    }
    
    .box1, .box2, .box3, .box4 {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    blockquote {
        padding: 15px 20px;
        margin: 20px 0;
    }
    
    button {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .wz-container {
        box-shadow: none;
    }
    
    .first-pic {
        padding: 10px 0;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 16px;
    }
    
    #sp1 {
        padding: 15px 10px;
        font-size: 15px;
    }
    
    #sp2 {
        padding: 15px 10px;
    }
    
    .box1, .box2, .box3, .box4 {
        padding: 12px;
        margin-bottom: 15px;
    }
}

/* Print Styles */
@media print {
    .wz-main-nav,
    #sp2 {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .wz-container {
        box-shadow: none;
        max-width: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #46688e;
    outline-offset: 2px;
}

/* Animation for interactive elements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.box1, .box2, .box3, .box4 {
    animation: fadeIn 0.6s ease-out;
}

/* Green checkmarks */
font[color="green"] {
    color: #4CAF50 !important;
    font-weight: bold;
    font-size: 16px;
}

/* MIDDLE-LOWER SECTION IMPROVEMENTS */

/* Author Section Enhancement */
.box2 div[itemscope] {
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #e3f2fd;
    position: relative;
    overflow: hidden;
}

.box2 div[itemscope]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #46688e, #286ea0, #46688e);
}

.box2 div[itemscope] p {
    margin: 0;
    font-weight: 600;
    color: #46688e;
    font-size: 16px;
}

/* Individual Consultation Button Styling */
.box2 a[href*="anfrage.html"] button {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    color: white;
    padding: 18px 25px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    text-transform: none;
    letter-spacing: 0.5px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

.box2 a[href*="anfrage.html"] button::before {
    content: '💬';
    margin-right: 8px;
    font-size: 18px;
}

.box2 a[href*="anfrage.html"] button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
}

/* Latest Articles Section */
.box2 strong + br + strong,
.box2 strong:contains("Meine aktuellsten") {
    display: block;
    background: linear-gradient(135deg, #46688e 0%, #286ea0 100%);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 20px 0 15px 0;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(70, 104, 142, 0.3);
}

/* Date styling for articles */
.box2 strong:contains("2024") {
    color: #46688e;
    background-color: #f0f4f8;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    border-left: 3px solid #46688e;
}

/* Category Navigation Improvements */
.box2 nav {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
}

.box2 nav img {
    width: 40px;
    height: 40px;
    vertical-align: middle;
    margin-right: 15px;
    border-radius: 8px;
    padding: 8px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e3f2fd 100%);
    border: 2px solid #e3f2fd;
    transition: all 0.3s ease;
}

.box2 nav a {
    display: flex;
    align-items: center;
    color: #46688e;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid #f0f4f8;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 8px;
}

.box2 nav a:hover {
    background-color: #f8f9fa;
    padding-left: 10px;
    border-bottom-color: #46688e;
    color: #286ea0;
    transform: translateX(5px);
}

.box2 nav a:hover img {
    transform: scale(1.1);
    border-color: #46688e;
    background: linear-gradient(135deg, #46688e 0%, #286ea0 100%);
}

/* Study Banner Enhancement */
.box2 a[onclick*="zahnersatz-kosten"] {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin: 20px 0;
}

.box2 a[onclick*="zahnersatz-kosten"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Problems & Solutions Section */
.box2 a[href*="kategorie-ratgeber.html"] {
    display: block;
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.box2 a[href*="kategorie-ratgeber.html"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.15);
}

.box2 a[href*="kategorie-ratgeber.html"] img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.box2 a[href*="kategorie-ratgeber.html"]:hover img {
    transform: scale(1.05);
}

/* Service Menu Styling */
#menu3 {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
}

#menu3 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#menu3 ul li {
    border-bottom: 1px solid #f0f4f8;
    margin: 0;
}

#menu3 ul li:last-child {
    border-bottom: none;
}

#menu3 ul li a {
    display: block;
    padding: 12px 15px;
    color: #46688e;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 2px 0;
}

#menu3 ul li a:hover {
    background-color: #f8f9fa;
    color: #286ea0;
    padding-left: 20px;
    transform: translateX(5px);
}

#menu3 ul li a::before {
    content: '→';
    margin-right: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#menu3 ul li a:hover::before {
    opacity: 1;
}

/* Disclaimer Section */
.box2 p font[size="2"] {
    font-size: 12px !important;
    line-height: 1.5;
    color: #666;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin: 15px 0;
    display: block;
}

/* Media Mentions Enhancement */
#sp1 img[alt*="ZM online"],
#sp1 img[alt*="Dental-Magazin"],
#sp1 img[alt*="ZWP"] {
    display: inline-block;
    margin: 15px 10px 15px 0;
    padding: 15px;
    background-color: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#sp1 img[alt*="ZM online"]:hover,
#sp1 img[alt*="Dental-Magazin"]:hover,
#sp1 img[alt*="ZWP"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #46688e;
}

/* External Links Enhancement */
#sp1 a[target="_blank"] {
    position: relative;
    padding-right: 18px;
    font-weight: 600;
}

#sp1 a[target="_blank"]::after {
    content: '↗';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 14px;
    color: #46688e;
}

/* Improved spacing for content sections */
#sp1 > div[itemprop="articlebody"] > p {
    margin-bottom: 25px;
}

#sp1 > div[itemprop="articlebody"] > h2 + p {
    margin-top: 15px;
}

/* Banner images in main content */
#sp1 a img[src*="banner-"],
#sp1 a img[src*="wegweiser-"] {
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin: 8px 4px;
}

#sp1 a img[src*="banner-"]:hover,
#sp1 a img[src*="wegweiser-"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.15);
}