:root {
    --bg-color: #f0f0f0;
    --light-shadow: rgba(255, 255, 255, 0.8);
    --dark-shadow: rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --shadow-inset: inset 4px 4px 8px var(--dark-shadow), inset -4px -4px 8px var(--light-shadow);
    --shadow-outset: 4px 4px 8px var(--dark-shadow), -4px -4px 8px var(--light-shadow);
    --mytempl-bg: var(--bg-color);
    --mytempl-text: #2f3437;
    --mytempl-muted: #6c757d;
    --mytempl-accent: #4f6f8f;
    --mytempl-accent-soft: #dfe8f2;
    --mytempl-radius: var(--border-radius);
    --mytempl-radius-lg: 18px;
    --mytempl-radius-sm: 9px;
    --mytempl-shadow-inset: var(--shadow-inset);
    --mytempl-shadow-outset: var(--shadow-outset);
    --mytempl-shadow-soft: 8px 8px 18px rgba(0, 0, 0, 0.14), -8px -8px 18px rgba(255, 255, 255, 0.72);
    --mytempl-shadow-pressed: inset 6px 6px 14px rgba(0, 0, 0, 0.14), inset -6px -6px 14px rgba(255, 255, 255, 0.72);
    --bs-body-bg: var(--mytempl-bg);
    --bs-body-color: var(--mytempl-text);
    --bs-border-color: rgba(47, 52, 55, 0.12);
    --bs-border-radius: var(--mytempl-radius);
    --bs-border-radius-sm: var(--mytempl-radius-sm);
    --bs-border-radius-lg: var(--mytempl-radius-lg);
    --bs-primary: var(--mytempl-accent);
    --bs-primary-rgb: 79, 111, 143;
    --bs-secondary-color: var(--mytempl-muted);
    --bs-link-color: var(--mytempl-accent);
    --bs-link-hover-color: var(--mytempl-text);
    --bs-tertiary-bg: var(--mytempl-bg);
    --bs-box-shadow: var(--mytempl-shadow-soft);
    --bs-box-shadow-sm: var(--mytempl-shadow-outset);
    --bs-box-shadow-lg: var(--mytempl-shadow-soft);
}

body {
    background: var(--mytempl-bg) !important;
    color: var(--mytempl-text) !important;
    font-family: 'Poppins', sans-serif;
    line-height: 1.65;
    min-height: 100vh;
}

.bg-light,
.bg-body,
.bg-white,
.bg-secondary,
.bg-dark {
    background-color: var(--mytempl-bg) !important;
}

.text-bg-primary,
.text-bg-secondary,
.text-bg-dark,
.text-bg-light {
    background-color: var(--mytempl-bg) !important;
    color: var(--mytempl-text) !important;
}

::selection {
    background: var(--mytempl-accent-soft);
    color: var(--mytempl-text);
}

.container {
    max-width: 1140px;
}

.container.my-4 {
    margin-bottom: 2rem !important;
    margin-top: 2rem !important;
}

header.py-3,
footer.bg-dark,
main.py-5,
main.my-5,
section.my-5,
article.my-5 {
    background: var(--mytempl-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--mytempl-radius-lg);
    box-shadow: var(--mytempl-shadow-soft);
    padding: 1.5rem;
}

main.py-5,
main.my-5,
section.my-5,
article.my-5,
#about {
    position: relative;
}

main.py-5::before,
main.my-5::before,
section.my-5::before,
article.my-5::before,
#about::before {
    border-radius: inherit;
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.75);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.site-header > .container {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.site-header .navbar-brand {
    flex-shrink: 0;
    margin-right: 0;
}

.site-header .navbar-brand img {
    box-shadow: none;
    display: block;
}

.site-header .navbar {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0;
    width: auto;
}

.site-header .navbar-collapse {
    justify-content: flex-end;
}

footer.bg-dark {
    color: var(--mytempl-text) !important;
    margin: 1.5rem auto 0;
    max-width: 1140px;
}

footer.bg-dark p {
    margin-bottom: 0;
}

.text-muted,
.lead.text-muted {
    color: var(--mytempl-muted) !important;
}

.border,
.border-top,
.border-end,
.border-bottom,
.border-start {
    border-color: rgba(47, 52, 55, 0.12) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #222;
    font-weight: 700;
    letter-spacing: 0;
}

main > h1,
section > h1,
section > h2,
article > header h1 {
    margin-bottom: 1.25rem;
}

section > h1,
section > h2,
main > h1,
article > header h1,
#about h2 {
    text-shadow: -1px -1px 0 rgba(255, 255, 255, 0.9), 1px 1px 2px rgba(0, 0, 0, 0.12);
}

.display-1 {
    color: var(--mytempl-accent);
    letter-spacing: 0;
    text-shadow: -2px -2px 4px rgba(255, 255, 255, 0.85), 2px 2px 4px rgba(0, 0, 0, 0.18);
}

#about {
    background: var(--mytempl-bg);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--mytempl-radius-lg);
    box-shadow: var(--mytempl-shadow-soft);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

#about .text-center,
.card-body,
.alert,
.entry-content {
    color: var(--mytempl-text);
}

#about h2,
#about p {
    margin-left: auto;
    margin-right: auto;
    max-width: 680px;
}

#about .mb-3 span {
    background: var(--mytempl-bg);
    border-radius: 999px;
    box-shadow: var(--mytempl-shadow-inset);
    color: var(--mytempl-muted);
    display: inline-block;
    font-size: 0.92rem;
    margin: 0.2rem;
    padding: 0.25rem 0.65rem;
}

.btn,
.btn-outline-secondary {
    --bs-btn-bg: var(--mytempl-bg);
    --bs-btn-border-color: transparent;
    --bs-btn-border-radius: var(--mytempl-radius);
    --bs-btn-color: var(--mytempl-text);
    --bs-btn-hover-bg: var(--mytempl-accent-soft);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-hover-color: var(--mytempl-text);
    --bs-btn-active-bg: var(--mytempl-accent-soft);
    --bs-btn-active-border-color: transparent;
    --bs-btn-active-color: var(--mytempl-text);
    --bs-btn-disabled-bg: var(--mytempl-bg);
    --bs-btn-disabled-border-color: transparent;
    --bs-btn-disabled-color: var(--mytempl-muted);
    background: var(--mytempl-bg) !important;
    border: 0 !important;
    border-radius: var(--mytempl-radius) !important;
    box-shadow: var(--mytempl-shadow-outset) !important;
    color: var(--mytempl-text) !important;
    font-weight: 600;
    min-height: 44px;
    padding: 12px 24px;
    position: relative;
    transition: background 0.2s ease-in-out, box-shadow 0.2s ease-in-out, color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.btn:hover,
.btn:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: var(--mytempl-accent-soft) !important;
    box-shadow: var(--mytempl-shadow-inset) !important;
    color: var(--mytempl-text) !important;
}

.btn:active {
    transform: scale(0.95);
}

.btn:focus-visible,
.nav-link:focus-visible,
.page-link:focus-visible {
    outline: 3px solid rgba(79, 111, 143, 0.35);
    outline-offset: 4px;
}

.card {
    --bs-card-bg: var(--mytempl-bg);
    --bs-card-border-color: transparent;
    --bs-card-border-radius: var(--mytempl-radius-lg);
    --bs-card-color: var(--mytempl-text);
    --bs-card-cap-bg: var(--mytempl-bg);
    --bs-card-cap-color: var(--mytempl-text);
    --bs-card-spacer-x: 1.25rem;
    --bs-card-spacer-y: 1.25rem;
    background: var(--mytempl-bg) !important;
    border: none !important;
    border-radius: var(--mytempl-radius-lg) !important;
    box-shadow: var(--mytempl-shadow-soft) !important;
    height: 100%;
    overflow: hidden;
    padding: 20px;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.card:hover {
    box-shadow: var(--mytempl-shadow-pressed) !important;
    transform: translateY(1px);
}

.card-body {
    padding: 1.25rem 0 0;
}

.card-title {
    margin-bottom: 0.75rem;
}

.card-title a,
.card-title {
    color: var(--mytempl-text);
}

.card-text {
    background: var(--mytempl-bg);
    border-radius: var(--mytempl-radius-sm);
    box-shadow: var(--mytempl-shadow-pressed);
    color: var(--mytempl-text);
    padding: 0.9rem 1rem;
}

.card .text-muted,
article header .text-muted,
.h6.text-uppercase.text-muted {
    background: var(--mytempl-bg);
    border-radius: 999px;
    box-shadow: var(--mytempl-shadow-inset);
    display: inline-flex;
    padding: 0.35rem 0.75rem;
}

.card > picture,
.card > img.card-img-top,
.img-fluid.rounded.w-100 {
    aspect-ratio: 16 / 9;
    background: var(--mytempl-bg);
    width: 100%;
}

.card > picture,
.card > img.card-img-top {
    border-radius: var(--mytempl-radius);
    box-shadow: var(--mytempl-shadow-soft);
    display: block;
    flex-shrink: 0;
    overflow: hidden;
}

.card > picture > img.card-img-top,
.card > picture > img {
    border-radius: 0;
    box-shadow: none;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.card > img.card-img-top {
    border-radius: var(--mytempl-radius);
    box-shadow: none;
    display: block;
    height: auto;
    object-fit: cover;
}

img {
    border-radius: var(--mytempl-radius);
    box-shadow: var(--mytempl-shadow-soft);
}

.profile-img {
    border: 6px solid var(--mytempl-bg);
    border-radius: 50%;
    box-shadow: var(--mytempl-shadow-soft);
    height: 120px;
    object-fit: cover;
    width: 120px;
}

.mb-4[itemprop="image"] {
    background: var(--mytempl-bg);
    border-radius: var(--mytempl-radius);
    box-shadow: var(--mytempl-shadow-inset);
    padding: 0.75rem;
}

.mb-4[itemprop="image"] picture {
    border-radius: var(--mytempl-radius);
    display: block;
    overflow: hidden;
    width: 100%;
}

.mb-4[itemprop="image"] img {
    display: block;
    height: auto;
    width: 100%;
}

.navbar {
    --bs-navbar-color: var(--mytempl-text);
    --bs-navbar-hover-color: var(--mytempl-text);
    --bs-navbar-active-color: var(--mytempl-text);
    --bs-navbar-disabled-color: var(--mytempl-muted);
    --bs-navbar-brand-color: var(--mytempl-text);
    --bs-navbar-brand-hover-color: var(--mytempl-text);
    --bs-navbar-toggler-border-color: transparent;
    --bs-navbar-toggler-focus-width: 0;
    background: var(--mytempl-bg) !important;
    border-radius: var(--mytempl-radius-lg);
    box-shadow: var(--mytempl-shadow-soft);
    padding: 15px;
    width: 100%;
}

.navbar-nav {
    gap: 0.5rem;
}

.navbar .nav-link {
    border-radius: var(--mytempl-radius);
    color: #333 !important;
    font-size: 18px;
    padding: 0.65rem 0.9rem;
    transition: background 0.2s ease-in-out, box-shadow 0.2s ease-in-out, text-shadow 0.2s ease-in-out;
}

.navbar .nav-link:hover,
.navbar .nav-item.active .nav-link {
    background: var(--mytempl-accent-soft);
    box-shadow: var(--mytempl-shadow-pressed);
    text-shadow: none;
}

.navbar .nav-link[aria-current="page"] {
    background: var(--mytempl-accent-soft);
    box-shadow: var(--mytempl-shadow-pressed);
}

.navbar-toggler {
    background-color: transparent;
    border: none !important;
    border-radius: var(--mytempl-radius);
    box-shadow: var(--mytempl-shadow-outset) !important;
    outline: none !important;
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
    box-shadow: var(--mytempl-shadow-inset) !important;
}

.navbar-toggler-icon {
    filter: contrast(0.65);
}

.alert {
    --bs-alert-bg: var(--mytempl-bg);
    --bs-alert-border-color: transparent;
    --bs-alert-color: var(--mytempl-text);
    --bs-alert-border-radius: var(--mytempl-radius-lg);
    background: var(--mytempl-bg) !important;
    border: 0 !important;
    border-radius: var(--mytempl-radius-lg) !important;
    box-shadow: var(--mytempl-shadow-pressed) !important;
    color: var(--mytempl-text) !important;
    padding: 1.25rem;
}

.alert-warning {
    color: var(--mytempl-text) !important;
}

.alert-primary,
.alert-secondary,
.alert-success,
.alert-danger,
.alert-warning,
.alert-info,
.alert-light,
.alert-dark {
    background: var(--mytempl-bg) !important;
    border-color: transparent !important;
    color: var(--mytempl-text) !important;
}

.pagination {
    --bs-pagination-bg: var(--mytempl-bg);
    --bs-pagination-border-color: transparent;
    --bs-pagination-border-radius: var(--mytempl-radius);
    --bs-pagination-color: var(--mytempl-text);
    --bs-pagination-hover-bg: var(--mytempl-accent-soft);
    --bs-pagination-hover-border-color: transparent;
    --bs-pagination-hover-color: var(--mytempl-text);
    --bs-pagination-focus-bg: var(--mytempl-accent-soft);
    --bs-pagination-focus-box-shadow: var(--mytempl-shadow-pressed);
    --bs-pagination-active-bg: var(--mytempl-accent-soft);
    --bs-pagination-active-border-color: transparent;
    --bs-pagination-active-color: var(--mytempl-text);
    --bs-pagination-disabled-bg: var(--mytempl-bg);
    --bs-pagination-disabled-border-color: transparent;
    --bs-pagination-disabled-color: var(--mytempl-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination .page-item .page-link {
    background: var(--mytempl-bg);
    border: none;
    border-radius: var(--mytempl-radius);
    box-shadow: var(--mytempl-shadow-outset);
    color: #333;
    font-weight: 600;
    min-width: 44px;
    padding: 10px 15px;
    text-align: center;
    transition: background 0.2s ease-in-out, box-shadow 0.2s ease-in-out, color 0.2s ease-in-out;
}

.pagination .page-item .page-link:hover,
.pagination .page-item.active .page-link {
    background: var(--mytempl-accent-soft);
    box-shadow: var(--mytempl-shadow-pressed);
}

.pagination .page-item.active .page-link {
    font-weight: 700;
}

.pagination .page-item.disabled .page-link {
    box-shadow: var(--mytempl-shadow-inset);
    opacity: 0.45;
}

.form-control,
.invalid-feedback {
    background-color: var(--mytempl-bg) !important;
    border: 0 !important;
    border-radius: var(--mytempl-radius) !important;
    box-shadow: var(--mytempl-shadow-pressed) !important;
    color: var(--mytempl-text) !important;
}

.form-control {
    min-height: 44px;
    padding: 0.7rem 0.95rem;
}

.form-control:focus {
    background-color: var(--mytempl-bg) !important;
    box-shadow: var(--mytempl-shadow-outset), 0 0 0 0.2rem rgba(79, 111, 143, 0.2) !important;
    color: var(--mytempl-text) !important;
}

.form-control::placeholder {
    color: var(--mytempl-muted);
    opacity: 0.85;
}

.form-label {
    color: var(--mytempl-text);
}

.mytempl-faq {
    --bs-accordion-bg: var(--mytempl-bg);
    --bs-accordion-border-color: transparent;
    --bs-accordion-border-radius: var(--mytempl-radius-lg);
    --bs-accordion-inner-border-radius: var(--mytempl-radius);
    --bs-accordion-btn-bg: var(--mytempl-bg);
    --bs-accordion-btn-color: var(--mytempl-text);
    --bs-accordion-active-bg: var(--mytempl-accent-soft);
    --bs-accordion-active-color: var(--mytempl-text);
    --bs-accordion-btn-focus-box-shadow: var(--mytempl-shadow-pressed);
}

.mytempl-faq .accordion-item {
    background: var(--mytempl-bg) !important;
    border: 0 !important;
    border-radius: var(--mytempl-radius-lg) !important;
    box-shadow: var(--mytempl-shadow-soft);
    overflow: hidden;
}

.mytempl-faq .accordion-item + .accordion-item {
    margin-top: 1rem;
}

.mytempl-faq .accordion-button {
    background: var(--mytempl-bg) !important;
    box-shadow: none !important;
    color: var(--mytempl-text) !important;
    font-weight: 600;
    line-height: 1.35;
    padding: 1rem 1.25rem;
}

.mytempl-faq .accordion-button:not(.collapsed) {
    background: var(--mytempl-accent-soft) !important;
    box-shadow: var(--mytempl-shadow-pressed) !important;
}

.mytempl-faq .accordion-button:focus {
    box-shadow: var(--mytempl-shadow-pressed) !important;
}

.mytempl-faq .accordion-body {
    background: var(--mytempl-bg);
    box-shadow: var(--mytempl-shadow-pressed);
    color: var(--mytempl-text);
    padding: 1rem 1.25rem;
}

.mytempl-faq .accordion-body > :last-child {
    margin-bottom: 0;
}

.entry-content {
    background: var(--mytempl-bg);
    border-radius: var(--mytempl-radius-lg);
    box-shadow: var(--mytempl-shadow-pressed);
    padding: 1.25rem;
}

.entry-content p,
.entry-content li {
    color: var(--mytempl-text);
}

.entry-content code {
    color: var(--mytempl-accent);
    padding: 0.1rem 0.35rem;
}

.entry-content pre code {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    padding: 0;
}

.entry-content table {
    display: block;
    overflow-x: auto;
    width: 100%;
}

.entry-content th,
.entry-content td {
    border-bottom: 1px solid rgba(47, 52, 55, 0.12);
    padding: 0.65rem;
}

.entry-content > *:last-child,
.card-text:last-child {
    margin-bottom: 0;
}

a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease-in-out, text-shadow 0.2s ease-in-out;
}

a:focus-visible {
    border-radius: var(--mytempl-radius-sm);
    outline: 3px solid rgba(79, 111, 143, 0.35);
    outline-offset: 4px;
}

a:hover {
    text-shadow: 1px 1px 2px var(--dark-shadow);
}

#contacts a,
.entry-content a {
    border-radius: 0.5rem;
    color: var(--mytempl-accent);
}

#contacts a:hover,
.entry-content a:hover {
    color: var(--mytempl-text);
    text-shadow: none;
}

.d-flex.gap-2 {
    gap: 0.75rem !important;
}

.row {
    row-gap: 1.25rem;
}

.text-center.mt-3,
.mt-4 {
    margin-top: 1.5rem !important;
}

.col-12 > p {
    color: var(--mytempl-muted);
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    header.py-3,
    footer.bg-dark,
    main.py-5,
    main.my-5,
    section.my-5,
    article.my-5,
    #about {
        padding: 1rem;
    }

    .navbar {
        padding: 0.75rem;
    }

    .site-header > .container {
        align-items: stretch !important;
        flex-direction: column;
    }

    .site-header .navbar {
        width: 100%;
    }

    .navbar-collapse {
        margin-top: 0.75rem;
    }

    .display-1 {
        font-size: 4rem;
    }
}
