:root {
    --bg: #f2f5fa;
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.72);
    --ink: #172139;
    --muted: #55607d;
    --brand: #0f766e;
    --brand-deep: #0b4f54;
    --accent: #e89f27;
    --ink-inverse: #f7faff;
    --line: #d7deea;
    --ring: rgba(15, 118, 110, 0.25);
    --shadow-lg: 0 24px 48px -28px rgba(8, 22, 45, 0.42);
    --shadow-md: 0 14px 30px -26px rgba(8, 22, 45, 0.48);
    --radius-lg: 20px;
    --radius-md: 14px;
    --max: 1120px;
    --carousel-home-height: min(62vh, 560px);
    --carousel-modal-height: min(75vh, 760px);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1220;
    --surface: #111b2e;
    --surface-soft: rgba(16, 26, 44, 0.72);
    --ink: #e7eefb;
    --muted: #9fb0cc;
    --line: #2a3a59;
    --ring: rgba(118, 182, 255, 0.2);
    --shadow-lg: 0 24px 48px -28px rgba(2, 8, 20, 0.9);
    --shadow-md: 0 14px 30px -26px rgba(2, 8, 20, 0.9);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

[data-theme="dark"] body {
    background:
        radial-gradient(1000px 500px at 8% -12%, #0f2135 0%, transparent 72%),
        radial-gradient(900px 420px at 105% -8%, #2a2a16 0%, transparent 72%),
        linear-gradient(180deg, #0a1120 0%, var(--bg) 64%, #0d1627 100%);
}

body {
    position: relative;
    overflow-x: hidden;
    font-family: "Outfit", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1000px 500px at 8% -12%, #d8efe9 0%, transparent 72%),
        radial-gradient(900px 420px at 105% -8%, #ffe7bb 0%, transparent 72%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 64%, #ecf1f8 100%);
    line-height: 1.58;
}

main {
    opacity: 1;
    transition: opacity 260ms ease, transform 260ms ease;
}

body.page-leaving main {
    opacity: 0;
    transform: translateY(8px);
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    filter: blur(22px);
    opacity: 0.42;
}

body::before {
    width: 260px;
    height: 260px;
    right: -80px;
    top: 28%;
    border-radius: 44% 56% 52% 48% / 38% 43% 57% 62%;
    background: linear-gradient(135deg, #7fd4c7 0%, #2e8f8d 100%);
    animation: floatBlobA 12s ease-in-out infinite;
}

body::after {
    width: 220px;
    height: 220px;
    left: -70px;
    bottom: 10%;
    border-radius: 60% 40% 49% 51% / 55% 46% 54% 45%;
    background: linear-gradient(135deg, #ffdb98 0%, #e79a28 100%);
    animation: floatBlobB 14s ease-in-out infinite;
}

h1,
h2,
h3 {
    font-family: "Space Grotesk", sans-serif;
    margin-top: 0;
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(1.35rem, 2.35vw, 2rem);
}

h3 {
    font-size: clamp(1.08rem, 1.7vw, 1.35rem);
}

h1,
h2 {
    text-wrap: balance;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -120px;
    z-index: 50;
    background: #0f1f39;
    color: #ffffff;
    padding: 0.62rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #3a588b;
    text-decoration: none;
    font-weight: 600;
    transition: top 150ms ease;
}

.skip-link:focus {
    top: 0.7rem;
}

.container {
    width: min(100% - 2rem, var(--max));
    margin-inline: auto;
}

.site-header {
    z-index: 20;
    backdrop-filter: blur(12px);
    background: linear-gradient(90deg, rgba(10, 21, 41, 0.92), rgba(12, 30, 52, 0.88));
    border-bottom: 1px solid #2a3d62;
    transition: box-shadow 180ms ease;
}

.site-header.scrolled {
    box-shadow: 0 12px 34px -22px rgba(0, 0, 0, 0.7);
}

.site-navbar {
    min-height: 74px;
}

.theme-toggle {
    margin-left: 0.45rem;
    border: 1px solid #3c5178;
    color: #dce6fb;
    background: rgba(165, 193, 245, 0.12);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 170ms ease, transform 170ms ease, border-color 170ms ease;
}

.site-navbar .navbar-nav .nav-theme-item {
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    background: rgba(165, 193, 245, 0.24);
    border-color: #5c76a4;
}

.theme-toggle:active {
    transform: translateY(1px);
}

.theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ring);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.brand-logo {
    display: block;
    width: auto;
    height: 52px;
    object-fit: contain;
}

.brand-text {
    line-height: 1;
}

.site-navbar .navbar-brand {
    color: #ffffff;
}

.site-navbar .nav-link {
    position: relative;
    color: #cfddf9;
    font-weight: 500;
    padding: 0.5rem 0.72rem;
    border-radius: 12px;
    transition: background-color 170ms ease, color 170ms ease;
}

.site-navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 5px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: linear-gradient(90deg, #8de2d1, #f2c064);
    transition: transform 180ms ease;
}

.site-navbar .nav-link.active,
.site-navbar .nav-link:hover {
    color: #ffffff;
    background: rgba(165, 193, 245, 0.12);
}

.site-navbar .nav-link.active::after,
.site-navbar .nav-link:hover::after {
    transform: scaleX(1);
}

.site-navbar .navbar-toggler {
    border-color: #3e547e;
}

.site-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem var(--ring);
}

.hero {
    position: relative;
    padding: 6.3rem 0 4rem;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(15, 118, 110, 0.07) 0%, rgba(232, 159, 39, 0.07) 58%, transparent 80%);
    pointer-events: none;
}

.eyebrow {
    display: inline-block;
    color: var(--brand);
    background: rgba(15, 118, 110, 0.1);
    border: 1px solid rgba(15, 118, 110, 0.24);
    border-radius: 999px;
    padding: 0.28rem 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.74rem;
}

.hero h1 {
    font-size: clamp(2.15rem, 4.2vw, 3.9rem);
    max-width: 13ch;
    margin: 0.9rem 0 0.9rem;
}

.lead {
    color: var(--muted);
    max-width: 58ch;
    font-size: clamp(1.01rem, 2vw, 1.15rem);
}

.actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.btn {
    border: 0;
    text-decoration: none;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #fff;
    padding: 0.74rem 1.14rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px -14px rgba(11, 79, 84, 0.8);
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.98);
    box-shadow: 0 14px 26px -18px rgba(11, 79, 84, 0.92);
}

.btn:active {
    transform: translateY(0);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.66);
    color: #154f87;
    border: 1px solid #c9d8f3;
    box-shadow: none;
}

.btn-ghost:hover {
    box-shadow: 0 8px 20px -18px rgba(20, 79, 135, 0.66);
}

.section {
    padding: 1.2rem 0 3.1rem;
}

.page-head {
    position: relative;
    padding: 3.3rem 0 1rem;
}

.page-head h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.7rem);
}

.page-head p {
    color: var(--muted);
    max-width: 64ch;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.cards.pricing-grid {
    gap: 1.15rem;
    align-items: stretch;
}

.card,
.panel {
    position: relative;
    background: linear-gradient(160deg, var(--surface) 0%, #f7faff 100%);
    border: 1px solid #e4eaf4;
    border-radius: var(--radius-lg);
    padding: 1.18rem;
    box-shadow: var(--shadow-md);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

[data-theme="dark"] .card,
[data-theme="dark"] .panel {
    background: linear-gradient(160deg, #121d31 0%, #0f192a 100%);
    border-color: #2a3a59;
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .panel:hover {
    border-color: #3b4f76;
}

[data-theme="dark"] .admin-card p,
[data-theme="dark"] .admin-hint,
[data-theme="dark"] .lead,
[data-theme="dark"] .page-head p,
[data-theme="dark"] .kpi p,
[data-theme="dark"] .quote-role,
[data-theme="dark"] .faq-list p,
[data-theme="dark"] .copyright,
[data-theme="dark"] .roadmap li {
    color: var(--muted);
}

[data-theme="dark"] .site-navbar .nav-link {
    color: #d7e3fa;
}

[data-theme="dark"] .btn-ghost {
    background: rgba(22, 33, 54, 0.9);
    color: #cfe1ff;
    border-color: #3a4d72;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #101a2d;
    border-color: #2d3f62;
    color: #e7eefb;
}

[data-theme="dark"] .faq-list article,
[data-theme="dark"] .admin-accordion,
[data-theme="dark"] .admin-inline-block {
    background: #101a2d;
    border-color: #2a3a59;
}

[data-theme="dark"] .site-footer {
    background: linear-gradient(145deg, #090f1c 0%, #0b172a 66%, #0a1423 100%);
    border-top-color: #1f3152;
}

.card::before,
.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.card:hover,
.panel:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: #d0d9ea;
}

.stack {
    display: grid;
    gap: 1rem;
}

.info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-grid.compact .card {
    padding: 1rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.kpi {
    text-align: center;
}

.kpi h3 {
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    margin-bottom: 0.2rem;
    color: #173765;
}

.kpi p {
    margin: 0;
    color: var(--muted);
}

.cta-panel {
    text-align: center;
    padding: 1.6rem;
}

.cta-panel p {
    max-width: 62ch;
    margin: 0.5rem auto 1rem;
}

.roadmap {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.roadmap li {
    margin-bottom: 0.5rem;
    color: #2b3d61;
}

.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq-list article {
    border: 1px solid #dce5f3;
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    background: #f9fbff;
}

.faq-list h3 {
    margin-bottom: 0.25rem;
}

.faq-list p {
    margin: 0;
    color: var(--muted);
}

.page-admin .page-head {
    padding-bottom: 0.6rem;
}

.page-admin .section {
    padding-top: 0.6rem;
}

.admin-quicknav {
    padding-top: 0.2rem;
    padding-bottom: 0.9rem;
}

.admin-shell {
    display: grid;
    gap: 1rem;
}

.admin-top-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.admin-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.admin-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.1rem 1.15rem;
}

.admin-card h2 {
    margin-bottom: 0.1rem;
}

.admin-card p {
    margin: 0;
    color: #344668;
}

.admin-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.admin-card .btn + .btn {
    margin-top: 0.5rem;
}

.admin-card-wide {
    min-height: 100%;
}

.admin-stat-card {
    justify-content: flex-start;
}

.admin-stat-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.85rem, 4vw, 2.3rem);
    line-height: 1;
    color: #143962;
    font-weight: 700;
    margin-top: 0.2rem;
}

.admin-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.55rem;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.admin-toolbar.compact {
    gap: 0.45rem;
}

.admin-toolbar .btn-ghost.active {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 24px -14px rgba(11, 79, 84, 0.8);
}

.admin-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.75rem;
}

.admin-panel-head h2 {
    margin: 0;
}

.admin-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-editor-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.25fr);
    gap: 1rem;
    align-items: start;
}

.admin-editor-left {
    position: sticky;
    top: 1rem;
}

.admin-stack {
    display: grid;
    gap: 0.8rem;
}

.admin-accordion {
    border: 1px solid #dce5f3;
    border-radius: 12px;
    background: #f9fbff;
    overflow: hidden;
}

.admin-accordion + .admin-accordion {
    margin-top: 0.55rem;
}

.admin-accordion summary {
    cursor: pointer;
    list-style: none;
    padding: 0.7rem 0.85rem;
    font-weight: 600;
    color: #193860;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.admin-accordion summary::-webkit-details-marker {
    display: none;
}

.admin-accordion[open] summary {
    border-bottom: 1px solid #dce5f3;
    background: #f3f8ff;
}

.admin-accordion-body {
    padding: 0.8rem;
    display: grid;
    gap: 0.42rem;
}

.admin-pre {
    white-space: pre-wrap;
    margin: 0;
}

.admin-pre.scroll {
    max-height: 26rem;
    overflow: auto;
}

.admin-login-wrap {
    max-width: 560px;
}

.admin-inline {
    display: inline;
}

.admin-inline-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    align-items: stretch;
    margin-top: auto;
}

.admin-inline-actions .btn {
    margin-top: 0;
    width: 100%;
    white-space: nowrap;
    text-align: center;
    padding-inline: 0.7rem;
}

.admin-inline-actions .admin-inline {
    display: block;
}

.admin-inline-actions .admin-inline .btn {
    display: block;
}

.admin-check {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #2c3f61;
    font-weight: 500;
}

.admin-check input {
    width: auto;
    margin: 0;
}

.admin-dynamic-list {
    display: grid;
    gap: 0.55rem;
}

.admin-inline-block {
    border: 1px solid #dce5f3;
    border-radius: 12px;
    background: #f9fbff;
    padding: 0.72rem;
    display: grid;
    gap: 0.42rem;
}

.admin-remove-item {
    justify-self: start;
}

.page-admin .contact-form {
    gap: 0.42rem;
}

.page-admin .contact-form hr {
    margin: 0.6rem 0 0.3rem;
    border-color: #e0e7f2;
}

.page-admin .contact-form h3 {
    margin-bottom: 0.2rem;
    font-size: 1.02rem;
}

.admin-hint {
    margin: 0.2rem 0 0.5rem;
    color: #526483;
    font-size: 0.95rem;
}

.price .amount {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.35rem 0 0.5rem;
    color: #16335f;
}

.price {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price h2 {
    margin-bottom: 0;
}

.price .amount::before {
    content: "Pachet";
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #647391;
    margin-bottom: 0.12rem;
}

.price p:last-child {
    margin-top: auto;
    color: var(--muted);
}

.plan-badge {
    align-self: flex-start;
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 999px;
    padding: 0.24rem 0.62rem;
    font-weight: 700;
    background: #eff5ff;
    border: 1px solid #c9daf8;
    color: #26466f;
}

.featured {
    border: 1px solid #efc177;
    background: linear-gradient(145deg, #fff9ec 0%, #fff4dd 100%);
    transform: translateY(-4px);
}

.featured .plan-badge {
    background: #ffecc9;
    border-color: #efc177;
    color: #7a4c12;
}

.quote p {
    margin-bottom: 0.4rem;
    font-size: 1.04rem;
}

.quote > p:first-child {
    margin-bottom: 0.85rem;
    font-size: 1.1rem;
    line-height: 1.62;
    color: #1f2d4d;
}

.quote > p:first-child::before {
    content: "\201C";
    display: inline-block;
    margin-right: 0.12rem;
    font-size: 1.6em;
    line-height: 0;
    color: #6d7f9f;
    transform: translateY(0.28em);
}

.quote > p:first-child::after {
    content: "\201D";
    display: inline-block;
    margin-left: 0.14rem;
    font-size: 1.32em;
    line-height: 0;
    color: #6d7f9f;
    transform: translateY(0.36em);
}

.quote-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}

.quote-head h3 {
    margin-bottom: 0;
}

.quote-role {
    margin-bottom: 0.64rem;
    color: #4f6286;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.22rem 0.58rem;
    white-space: nowrap;
}

.status-admis {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.status-respins {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.quote-details {
    margin: 0.6rem 0;
    padding-left: 1.1rem;
}

.quote-details li {
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.quote-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
    margin-top: 0.7rem;
}

.photo-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d0dae9;
    background: #eef3fb;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.photo-thumb img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.photo-thumb:hover {
    transform: translateY(-2px);
    border-color: #95b5ee;
    box-shadow: 0 10px 22px -16px rgba(15, 37, 79, 0.68);
}

.photo-modal-img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    margin-inline: auto;
    max-height: 100% !important;
    border-radius: 10px;
}

.home-carousel {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid #d7deea;
    background: #0d1425;
    box-shadow: var(--shadow-lg);
    content-visibility: auto;
    contain-intrinsic-size: 560px;
}

.home-carousel-img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin-inline: auto;
    object-fit: contain;
    background: #0d1425;
}

#homeAutoCarousel .carousel-item {
    height: var(--carousel-home-height);
}

#homeAutoCarousel .carousel-inner {
    height: var(--carousel-home-height);
}

#homeGalleryModalCarousel .carousel-item,
#testimonialsCarousel .carousel-item {
    height: var(--carousel-modal-height);
}

#homeAutoCarousel .carousel-item.active,
#homeAutoCarousel .carousel-item.carousel-item-next,
#homeAutoCarousel .carousel-item.carousel-item-prev,
#homeGalleryModalCarousel .carousel-item.active,
#homeGalleryModalCarousel .carousel-item.carousel-item-next,
#homeGalleryModalCarousel .carousel-item.carousel-item-prev,
#testimonialsCarousel .carousel-item.active,
#testimonialsCarousel .carousel-item.carousel-item-next,
#testimonialsCarousel .carousel-item.carousel-item-prev {
    display: flex;
    align-items: center;
    justify-content: center;
}

#homeGalleryModalCarousel .carousel-inner,
#testimonialsCarousel .carousel-inner {
    height: var(--carousel-modal-height);
}

#homeAutoCarousel .carousel-item img,
#homeGalleryModalCarousel .carousel-item img,
#testimonialsCarousel .carousel-item img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
}

.gallery-modal .modal-header {
    display: none;
}

.gallery-modal .modal-body {
    position: relative;
    padding: 0.75rem;
}

.gallery-modal .btn-close.gallery-close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 5;
    background-color: rgba(15, 26, 48, 0.72);
    border-radius: 999px;
}

#homeAutoCarousel .carousel-indicators [data-bs-target] {
    width: 24px;
    height: 4px;
    border-radius: 999px;
}

#homeAutoCarousel .carousel-control-prev,
#homeAutoCarousel .carousel-control-next {
    width: 9%;
}

#homeAutoCarousel .carousel-control-prev-icon,
#homeAutoCarousel .carousel-control-next-icon,
#homeGalleryModalCarousel .carousel-control-prev-icon,
#homeGalleryModalCarousel .carousel-control-next-icon,
#testimonialsCarousel .carousel-control-prev-icon,
#testimonialsCarousel .carousel-control-next-icon {
    background-color: rgba(13, 20, 37, 0.74);
    border-radius: 999px;
    background-size: 56% 56%;
}

#homeGalleryModalCarousel .carousel-control-prev,
#homeGalleryModalCarousel .carousel-control-next,
#testimonialsCarousel .carousel-control-prev,
#testimonialsCarousel .carousel-control-next {
    width: 8%;
}

.modal-content {
    border: 1px solid #243354;
    background: #0f1a30;
    color: var(--ink-inverse);
    border-radius: 18px;
}

.modal-header {
    border-bottom-color: #2d4268;
}

.modal-title {
    color: #ffffff;
}

.btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.testimonials-modal .modal-content {
    border: 1px solid #d7deea;
    background: #ffffff;
    color: var(--ink);
}

.testimonials-modal .modal-header {
    border-bottom-color: #e2e8f3;
}

.testimonials-modal .modal-title {
    color: #172139;
}

.testimonials-modal .btn-close {
    filter: none;
    opacity: 0.65;
}

.testimonials-modal .carousel-inner {
    min-height: clamp(300px, 62vh, 760px);
}

.testimonials-modal .carousel-item {
    min-height: clamp(300px, 62vh, 760px);
}

.testimonials-modal .carousel-indicators [data-bs-target] {
    width: 26px;
    height: 4px;
    border-radius: 999px;
}

.testimonials-modal .carousel-control-prev,
.testimonials-modal .carousel-control-next {
    width: 10%;
}

.testimonials-modal .carousel-control-prev-icon,
.testimonials-modal .carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
}

.prose p {
    margin-bottom: 1rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 1rem;
}

.contact-form {
    display: grid;
    gap: 0.56rem;
}

.contact-form label {
    font-weight: 500;
    color: #203050;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.72rem 0.84rem;
    font: inherit;
    outline: none;
    background: #fff;
    transition: border-color 170ms ease, box-shadow 170ms ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--ring);
}

.flash-toast-wrap {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    width: min(92vw, 420px);
}

.flash {
    border-radius: 12px;
    padding: 0.65rem 0.9rem;
}

.flash-toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    box-shadow: var(--shadow-md);
    animation: flashIn 180ms ease-out;
}

.flash-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.28rem;
    opacity: 0.75;
}

.flash-close:hover {
    opacity: 1;
}

.flash-success {
    background: #e7f9ef;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.flash-error {
    background: #ffe9eb;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

@keyframes flashIn {
    from {
        transform: translateY(-8px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.site-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0d1425 0%, #10213a 66%, #0f1f35 100%);
    color: #dbe5f8;
    padding: 2.2rem 0 1rem;
    border-top: 1px solid #23385b;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 420px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(143, 206, 191, 0.22), transparent 68%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.site-footer h3 {
    color: #ffffff;
}

.site-footer ul {
    margin: 0;
    padding-left: 1rem;
}

.site-footer a {
    color: #d4e2ff;
}

.site-footer a:hover {
    color: #ffffff;
}

.copyright {
    text-align: center;
    margin: 1.5rem 0 0;
    color: #a8bcdf;
}

/* Dark theme contrast polish for content-heavy sections. */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] .card h2,
[data-theme="dark"] .card h3,
[data-theme="dark"] .panel h2,
[data-theme="dark"] .panel h3,
[data-theme="dark"] .quote > p:first-child,
[data-theme="dark"] .kpi h3,
[data-theme="dark"] .price .amount,
[data-theme="dark"] .admin-stat-value,
[data-theme="dark"] .site-footer h3 {
    color: #e7eefb;
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] .card p,
[data-theme="dark"] .panel p,
[data-theme="dark"] .price p:last-child,
[data-theme="dark"] .roadmap li,
[data-theme="dark"] .quote-role,
[data-theme="dark"] .faq-list p,
[data-theme="dark"] .admin-card p,
[data-theme="dark"] .admin-hint,
[data-theme="dark"] .copyright {
    color: #a9b9d3;
}

[data-theme="dark"] .quote > p:first-child::before,
[data-theme="dark"] .quote > p:first-child::after {
    color: #8ea3c8;
}

[data-theme="dark"] .contact-form label,
[data-theme="dark"] .admin-check,
[data-theme="dark"] .flash-close {
    color: #d4e2fb;
}

[data-theme="dark"] .admin-accordion summary {
    color: #d9e6ff;
}

[data-theme="dark"] .admin-accordion[open] summary {
    background: #13213a;
    border-bottom-color: #2f4266;
}

[data-theme="dark"] .plan-badge {
    background: #162741;
    border-color: #3f577f;
    color: #d9e7ff;
}

[data-theme="dark"] .featured {
    background: linear-gradient(145deg, #1b2639 0%, #1a2334 100%);
    border-color: #4a638f;
}

[data-theme="dark"] .featured .plan-badge {
    background: #1e304f;
    border-color: #5577ad;
    color: #e1ecff;
}

[data-theme="dark"] .status-admis {
    background: #143329;
    color: #9cf3c4;
    border-color: #2f805f;
}

[data-theme="dark"] .status-respins {
    background: #3a1a1f;
    color: #ffc2cc;
    border-color: #8e3b4a;
}

.reveal {
    opacity: 1;
    transform: translateY(0);
}

body.reveal-enabled .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.hero .reveal:nth-child(1) {
    transition-delay: 40ms;
}

.hero .reveal:nth-child(2) {
    transition-delay: 90ms;
}

.hero .reveal:nth-child(3) {
    transition-delay: 140ms;
}

.hero .reveal:nth-child(4) {
    transition-delay: 190ms;
}

body.reveal-enabled .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes floatBlobA {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-8px, 14px) rotate(7deg);
    }
}

@keyframes floatBlobB {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(9px, -10px) rotate(-6deg);
    }
}

@media (max-width: 900px) {
    .hero {
        padding-top: 5.2rem;
    }

    .cards,
    .info-grid,
    .kpi-grid,
    .admin-dash-grid,
    .footer-grid,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .admin-top-grid,
    .admin-bottom-grid {
        grid-template-columns: 1fr;
    }

    .admin-2col {
        grid-template-columns: 1fr;
    }

    .admin-editor-grid {
        grid-template-columns: 1fr;
    }

    .admin-editor-left {
        position: static;
    }

    .admin-links {
        grid-template-columns: 1fr;
    }

    .site-navbar .navbar-nav {
        gap: 0.35rem;
        padding-top: 0.5rem;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
        margin-left: 0;
    }

    .site-navbar .navbar-nav .nav-theme-item {
        padding-top: 0.15rem;
    }

    .brand-logo {
        height: 44px;
    }

    .brand-text {
        font-size: 0.98rem;
    }
}

@media (max-width: 580px) {
    .section {
        padding-bottom: 2.3rem;
    }

    .hero h1 {
        max-width: 100%;
    }

    #homeAutoCarousel .carousel-control-prev,
    #homeAutoCarousel .carousel-control-next,
    #homeGalleryModalCarousel .carousel-control-prev,
    #homeGalleryModalCarousel .carousel-control-next,
    #testimonialsCarousel .carousel-control-prev,
    #testimonialsCarousel .carousel-control-next {
        width: 14%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
