/* Testament Plugin Custom Styles */

.afd-testament-container {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background-color: #ffffff;
    color: #222;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

:root {
    --afd-blue: #009ee0;
    --afd-red: #e3000f;
    --afd-dark: #0b2333;
    --section-bg: #f5f7fa;
}

.afd-testament-container .hero {
    background: radial-gradient(circle at top left, #ffffff 0, #eef5fb 50%, #dde9f7 100%);
    min-height: 65vh;
    display: flex;
    align-items: center;
    padding-top: 3.5rem;
    padding-bottom: 4rem;
}

.afd-testament-container .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    padding: .35rem .85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(0, 0, 0, .05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
}

.afd-testament-container .hero-title {
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--afd-dark);
}

.afd-testament-container .hero-subtitle {
    font-size: 1.05rem;
    color: #555;
}

.afd-testament-container .btn-primary {
    background: var(--afd-blue) !important;
    background-color: var(--afd-blue) !important;
    border-color: var(--afd-blue) !important;
    border: 1px solid var(--afd-blue) !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    padding: 0.5rem 1.5rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.afd-testament-container .btn-primary:hover,
.afd-testament-container .btn-primary:focus,
.afd-testament-container .btn-primary:active {
    background: #008ac4 !important;
    background-color: #008ac4 !important;
    border-color: #008ac4 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

.afd-testament-container .btn-outline-primary {
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 999px !important;
    border: 2px solid var(--afd-blue) !important;
    border-color: var(--afd-blue) !important;
    color: var(--afd-blue) !important;
    padding: 0.5rem 1.5rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.afd-testament-container .btn-outline-primary:hover,
.afd-testament-container .btn-outline-primary:focus,
.afd-testament-container .btn-outline-primary:active {
    background: var(--afd-blue) !important;
    background-color: var(--afd-blue) !important;
    border-color: var(--afd-blue) !important;
    color: #fff !important;
    color: #ffffff !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

.afd-testament-container .section-muted {
    background-color: var(--section-bg);
}

.afd-testament-container .section-heading {
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .82rem;
    color: #7b8ba0;
}

.afd-testament-container .section-title {
    font-weight: 600;
    color: var(--afd-dark);
}

.afd-testament-container .card-elegant {
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, .06);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

.afd-testament-container .card-soft {
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, .06);
    background: #ffffff;
}

.afd-testament-container .badge-soft {
    border-radius: 999px;
    padding: .3rem .7rem;
    font-size: .7rem;
    background: rgba(0, 158, 224, .08);
    color: var(--afd-blue);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.afd-testament-container .list-check {
    list-style: none;
    padding-left: 0;
}

.afd-testament-container .list-check li {
    padding-left: 1.6rem;
    position: relative;
    margin-bottom: .4rem;
}

.afd-testament-container .list-check li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--afd-blue);
    font-weight: 600;
}

.afd-testament-container .download-thumb {
    border-radius: .75rem;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .08);
}

.afd-testament-container .download-thumb img {
    width: 100%;
    display: block;
}

@media (max-width: 767.98px) {
    .afd-testament-container .hero {
        text-align: center;
    }
    .afd-testament-container .hero-buttons {
        justify-content: center;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* YouTube Short Container - Hochformat 9:16 */
.afd-testament-container .short-embed-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 420px !important;
    padding-bottom: 177.78% !important; /* 16/9 * 100 = 177.78% für 9:16 */
    height: 0 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}

/* Fallback für Browser mit aspect-ratio Support */
@supports (aspect-ratio: 9 / 16) {
    .afd-testament-container .short-embed-wrapper {
        aspect-ratio: 9 / 16 !important;
        padding-bottom: 0 !important;
        height: auto !important;
    }
}

.afd-testament-container .short-embed-wrapper iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* Fallback für alte ratio Klassen */
.afd-testament-container .ratio {
    position: relative;
    width: 100%;
}

.afd-testament-container .ratio::before {
    display: block;
    padding-top: var(--bs-aspect-ratio);
    content: "";
}

.afd-testament-container .ratio > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.afd-testament-container .ratio-9x16 {
    --bs-aspect-ratio: 177.78%;
}

.afd-testament-container .rounded-4 {
    border-radius: 1rem !important;
}

.afd-testament-container .overflow-hidden {
    overflow: hidden !important;
}

.afd-testament-container .shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important;
}

/* Utility classes */
.afd-testament-container .g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

.afd-testament-container .g-5 {
    --bs-gutter-x: 3rem;
    --bs-gutter-y: 3rem;
}

.afd-testament-container .gap-3 {
    gap: 1rem !important;
}

.afd-testament-container .mb-0 {
    margin-bottom: 0 !important;
}

.afd-testament-container .mb-1 {
    margin-bottom: 0.25rem !important;
}

.afd-testament-container .mb-2 {
    margin-bottom: 0.5rem !important;
}

.afd-testament-container .mb-3 {
    margin-bottom: 1rem !important;
}

.afd-testament-container .mb-4 {
    margin-bottom: 1.5rem !important;
}

.afd-testament-container .mb-5 {
    margin-bottom: 3rem !important;
}

.afd-testament-container .mt-2 {
    margin-top: 0.5rem !important;
}

.afd-testament-container .mt-3 {
    margin-top: 1rem !important;
}

.afd-testament-container .mt-4 {
    margin-top: 1.5rem !important;
}

.afd-testament-container .p-4 {
    padding: 1.5rem !important;
}

.afd-testament-container .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.afd-testament-container .text-muted {
    color: #6c757d !important;
}

.afd-testament-container .small {
    font-size: 0.875rem;
}

.afd-testament-container .h3 {
    font-size: calc(1.3rem + 0.6vw);
}

.afd-testament-container .h5 {
    font-size: 1.25rem;
}

.afd-testament-container .h6 {
    font-size: 1rem;
}

.afd-testament-container .display-5 {
    font-size: calc(1.425rem + 2.1vw);
    font-weight: 300;
    line-height: 1.2;
}

.afd-testament-container .d-flex {
    display: flex !important;
}

.afd-testament-container .flex-wrap {
    flex-wrap: wrap !important;
}

.afd-testament-container .align-items-center {
    align-items: center !important;
}

.afd-testament-container .align-items-start {
    align-items: flex-start !important;
}

.afd-testament-container .d-inline-block {
    display: inline-block !important;
}

.afd-testament-container .w-100 {
    width: 100% !important;
}

.afd-testament-container .h-100 {
    height: 100% !important;
}

.afd-testament-container .text-uppercase {
    text-transform: uppercase !important;
}

.afd-testament-container .list-unstyled {
    padding-left: 0;
    list-style: none;
}

.afd-testament-container a {
    color: var(--afd-blue);
    text-decoration: none;
}

.afd-testament-container a:hover {
    text-decoration: underline;
}

.afd-testament-container .btn,
.afd-testament-container a.btn,
.afd-testament-container button.btn {
    display: inline-block !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-decoration: none !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    user-select: none !important;
    border: 1px solid transparent !important;
    padding: 0.5rem 1.5rem !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.afd-testament-container .btn-sm {
    padding: 0.35rem 1rem !important;
    font-size: 0.875rem !important;
    border-radius: 999px !important;
}

/* Zusätzliche Button-Spezifität gegen Theme-Overrides */
.afd-testament-container a.btn-primary,
.afd-testament-container button.btn-primary,
.afd-testament-container .btn.btn-primary {
    background: var(--afd-blue) !important;
    background-color: var(--afd-blue) !important;
    border-color: var(--afd-blue) !important;
    color: #ffffff !important;
}

.afd-testament-container a.btn-outline-primary,
.afd-testament-container button.btn-outline-primary,
.afd-testament-container .btn.btn-outline-primary {
    background: transparent !important;
    background-color: transparent !important;
    border-color: var(--afd-blue) !important;
    color: var(--afd-blue) !important;
}

/* Button Text immer lesbar machen */
.afd-testament-container .btn *,
.afd-testament-container .btn span,
.afd-testament-container .btn i {
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.afd-testament-container .border-0 {
    border: 0 !important;
}

.afd-testament-container hr {
    margin: 1rem 0;
    color: inherit;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, .1);
    opacity: 1;
}

/* Responsive adjustments */
@media (min-width: 992px) {
    .afd-testament-container .offset-lg-1 {
        margin-left: 8.333333%;
    }
}

/* Wichtig: Theme-Überschreibungen verhindern - Volle Breite erzwingen */
.afd-testament-container .container,
.afd-testament-container .container-fluid {
    max-width: 1320px !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Hero und Section-Hintergründe auf volle Breite */
.afd-testament-container .hero,
.afd-testament-container .section-muted,
.afd-testament-container section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Responsive: Kleinere Abstände auf Mobile */
@media (max-width: 767.98px) {
    .afd-testament-container .hero,
    .afd-testament-container section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .afd-testament-container .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Buttons auf Mobile volle Breite */
    .afd-testament-container .btn {
        width: 100%;
        display: block !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Wichtig: Button Hover-States für alle Themes */
.afd-testament-container .btn-primary:not(:disabled):not(.disabled):hover,
.afd-testament-container .btn-primary:not(:disabled):not(.disabled):focus,
.afd-testament-container .btn-primary:not(:disabled):not(.disabled):active,
.afd-testament-container a.btn-primary:hover,
.afd-testament-container a.btn-primary:focus {
    background: #008ac4 !important;
    background-color: #008ac4 !important;
    border-color: #008ac4 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    box-shadow: 0 4px 12px rgba(0, 158, 224, 0.3) !important;
}

.afd-testament-container .btn-outline-primary:not(:disabled):not(.disabled):hover,
.afd-testament-container .btn-outline-primary:not(:disabled):not(.disabled):focus,
.afd-testament-container .btn-outline-primary:not(:disabled):not(.disabled):active,
.afd-testament-container a.btn-outline-primary:hover,
.afd-testament-container a.btn-outline-primary:focus {
    background: var(--afd-blue) !important;
    background-color: var(--afd-blue) !important;
    border-color: var(--afd-blue) !important;
    color: #ffffff !important;
    opacity: 1 !important;
    box-shadow: 0 4px 12px rgba(0, 158, 224, 0.3) !important;
}

/* Visited Links bei Buttons zurücksetzen */
.afd-testament-container a.btn:visited,
.afd-testament-container a.btn-primary:visited {
    color: #ffffff !important;
}

.afd-testament-container a.btn-outline-primary:visited {
    color: var(--afd-blue) !important;
}
