/*
Theme Name: Medical Pro
Theme URI: https://example.com/medical-pro
Description: Ein professionelles WordPress-Theme für medizinische Websites mit umfangreichen Anpassungsmöglichkeiten, Barrierefreiheit und responsivem Design.
Version: 1.0.0
Author: Your Name
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: medical-pro
Tags: healthcare, medical, accessibility, responsive, custom-colors
*/

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

:root {
    --primary-color: #0066cc;
    --secondary-color: #004d99;
    --accent-color: #3399ff;
    --text-color: #333333;
    --bg-color: #ffffff;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --header-height: 600px;
    --font-family: 'Arial', sans-serif;
}

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

/* Hoher Kontrast Modus */
body.high-contrast {
    --primary-color: #0000ff;
    --secondary-color: #000080;
    --text-color: #000000;
    --bg-color: #ffffff;
    --border-color: #000000;
}

body.high-contrast * {
    border-color: #000000 !important;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--secondary-color);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===========================
   ACCESSIBILITY
   =========================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

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

/* ===========================
   HEADER
   =========================== */
.site-header {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.header-cta .btn {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

.header-cta .btn:hover {
    background: var(--secondary-color);
}

/* Navigation */
.main-navigation {
    background: var(--primary-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: flex-start;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: white;
    padding: 1rem 1.5rem;
    display: block;
    font-weight: 500;
}

.nav-menu > li > a:hover,
.nav-menu > li > a:focus {
    background: var(--secondary-color);
    outline: none;
}

/* Untermenü */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    z-index: 1001;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    display: block;
}

.sub-menu li a {
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.sub-menu li:last-child a {
    border-bottom: none;
}

.sub-menu li a:hover,
.sub-menu li a:focus {
    background: var(--light-gray);
    color: var(--primary-color);
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    right: 2rem;
    top: 1rem;
}

/* ===========================
   HERO SECTION
   =========================== */
.hero-section {
    position: relative;
    height: var(--header-height);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
}

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

.hero-btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.hero-btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.hero-btn-secondary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

/* ===========================
   MAIN CONTENT
   =========================== */
.site-content {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.content-area {
    min-width: 0;
}

/* Karten */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.card-link {
    color: var(--primary-color);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.card-link::after {
    content: '→';
    margin-left: 0.5rem;
}

/* ===========================
   SIDEBAR
   =========================== */
.sidebar {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Customizer Controls */
.customizer-controls {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.customizer-header .widget-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    flex: 1;
}

.customizer-buttons {
    display: flex;
    gap: 0.5rem;
}

.customizer-toggle,
.customizer-minimize {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customizer-minimize {
    font-size: 1.5rem;
    padding: 0.25rem 0.75rem;
    line-height: 1;
}

.customizer-toggle:hover,
.customizer-toggle:focus,
.customizer-minimize:hover,
.customizer-minimize:focus {
    background: var(--primary-color);
    color: white;
}

.customizer-toggle .toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.customizer-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.customizer-content {
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

.customizer-content.hiding {
    animation: slideUp 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.control-group input[type="color"],
.control-group input[type="range"],
.control-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.control-group input[type="file"] {
    padding: 0.5rem 0;
}

/* Floating Show Customizer Button */
.show-customizer-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
    transition: all 0.3s ease;
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInFromRight 0.3s ease;
}

.show-customizer-btn:hover,
.show-customizer-btn:focus {
    background: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.5);
}

.show-customizer-btn span:first-child {
    font-size: 1.5rem;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Kalender Widget */
.calendar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.calendar-widget table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-widget th {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem;
    font-weight: bold;
}

.calendar-widget td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.calendar-widget td:hover {
    background: var(--light-gray);
    cursor: pointer;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
    background: var(--secondary-color);
    color: white;
    margin-top: 4rem;
}

.footer-widgets {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    gap: 2rem;
}

.footer-widgets.columns-1 {
    grid-template-columns: 1fr;
}

.footer-widgets.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.footer-widgets.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.footer-widgets.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.footer-widget h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.9);
}

.footer-widget a:hover {
    color: white;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 2rem;
    text-align: center;
}

.copyright {
    color: rgba(255, 255, 255, 0.9);
}

/* ===========================
   ACCESSIBILITY CONTROLS
   =========================== */
.accessibility-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    z-index: 999;
}

.accessibility-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.25rem;
    padding: 0 0.25rem;
}

.accessibility-minimize {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.accessibility-minimize:hover,
.accessibility-minimize:focus {
    background: var(--primary-color);
    color: white;
}

.accessibility-controls button:not(.accessibility-minimize) {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.accessibility-controls button:not(.accessibility-minimize):hover,
.accessibility-controls button:not(.accessibility-minimize):focus {
    background: var(--primary-color);
    color: white;
}

.accessibility-controls button:not(.accessibility-minimize):last-child {
    margin-bottom: 0;
}

.accessibility-controls button:not(.accessibility-minimize).active {
    background: var(--primary-color);
    color: white;
}

/* Floating Show Accessibility Button */
.show-accessibility-btn {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
    transition: all 0.3s ease;
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInFromRight 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.show-accessibility-btn:hover,
.show-accessibility-btn:focus {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.5);
}

.show-accessibility-btn span:first-child {
    font-size: 1.5rem;
}

/* TTS Visual Feedback */
.tts-enabled {
    position: relative;
}

.tts-enabled:hover {
    outline: 2px dashed var(--primary-color);
    outline-offset: 2px;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 968px) {
    .site-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
    
    .content-area {
        order: 1;
    }

    .footer-widgets.columns-4,
    .footer-widgets.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .hero-content p {
        font-size: 1rem;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

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

    .main-navigation {
        display: none;
    }

    .main-navigation.active {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-menu > li > a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu .sub-menu {
        position: static;
        display: none;
        background: var(--secondary-color);
        box-shadow: none;
    }

    .nav-menu li.menu-item-has-children > a::after {
        content: ' ▼';
        font-size: 0.8rem;
    }

    .nav-menu li.menu-item-has-children.open > .sub-menu {
        display: block;
    }

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

    .footer-widgets.columns-4,
    .footer-widgets.columns-3,
    .footer-widgets.columns-2 {
        grid-template-columns: 1fr;
    }

    .accessibility-controls {
        right: 10px;
        padding: 0.5rem;
    }

    .accessibility-controls button {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .show-customizer-btn {
        bottom: 10px;
        right: 10px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .show-customizer-btn .btn-text {
        display: none;
    }
    
    .show-accessibility-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .show-accessibility-btn .btn-text {
        display: none;
    }
    
    /* Sidebar auf Mobile nach dem Hauptinhalt */
    .site-content {
        display: flex;
        flex-direction: column;
    }
    
    .content-area {
        order: 1;
    }
    
    .sidebar {
        order: 2;
        margin-top: 2rem;
    }
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

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

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .accessibility-controls,
    .mobile-menu-toggle {
        display: none;
    }

    .site-content {
        grid-template-columns: 1fr;
        margin: 0;
        padding: 0;
    }
}
