:root {
    --magine-primary: #0073aa;
    --magine-primary-deep: #005177;
    --magine-dark: #202c39;
    --magine-body: #344055;
    --magine-muted: #9da7b2;
    --magine-bg: #f5f6f7;
    --magine-white: #ffffff;
    --magine-border: rgba(0, 0, 0, 0.075);
    --magine-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --magine-radius: 0;
    --magine-table-stripe: #f0f4f8;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: "Open Sans", Arial, sans-serif;
    line-height: 1.7;
    color: var(--magine-body);
    background: var(--magine-bg);
}

body.overflow-hidden {
    overflow: hidden;
}

a {
    color: var(--magine-primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--magine-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--magine-primary);
    outline-offset: 2px;
}

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

h1, h2, h3 {
    margin: 0 0 1.2rem;
    line-height: 1.35;
    color: var(--magine-dark);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }

p {
    margin: 0 0 1.2rem;
}

.container {
    width: min(1240px, calc(100% - 80px));
    margin: 0 auto;
}

#magine-header {
    background: var(--magine-primary);
    border-bottom: 1px solid var(--magine-border);
    padding: 1.25rem 0;
}

.magine-top-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.magine-top-icons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.magine-top-icon-right .magine-top-icons {
    justify-content: flex-end;
}

.magine-top-woo-icon a,
.magine-icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 0;
    color: var(--magine-white);
    background: var(--magine-primary-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
}

.magine-top-woo-icon a:hover,
.magine-icon-btn:hover {
    background: #004363;
    color: var(--magine-white);
}

.magine-top-icon-logo {
    width: auto;
    height: 1.35rem;
    object-fit: contain;
    display: block;
}

.magine-top-logo-link {
    width: auto;
    min-width: 2.5rem;
    padding: 0 0.55rem;
}

.magine-logo-text {
    font-size: clamp(1.2rem, 2.2vw, 2rem);
    font-weight: 800;
    color: var(--magine-white);
    letter-spacing: 0.5px;
}

.magine-main-logo-img {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
    display: block;
}

#magine-header-menu {
    background: var(--magine-primary);
    box-shadow: 0 3px 3px var(--magine-border);
    position: sticky;
    top: 0;
    z-index: 30;
}

#magine-header-menu.stick {
    opacity: 0.95;
}

.navbar {
    padding: 0;
}

.navbar-collapse {
    display: block;
}

.navbar-nav {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nav-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.92);
    text-transform: capitalize;
    font-size: 0.92rem;
    padding: 1rem 0.45rem;
    font-weight: 700;
}

.nav-link:hover {
    color: #fff;
}

#magine-main-wrapper {
    padding: 70px 0;
}

#magine-page-title {
    background: linear-gradient(90deg, rgba(0, 92, 136, 0.92) 0, rgba(0, 130, 191, 0.85) 100%);
    color: #fff;
    position: relative;
    padding: 3rem 0;
    text-shadow: 1px 2px 0 rgba(0, 0, 0, 0.2);
}

#magine-page-title h1 {
    color: #fff;
    margin-bottom: 0.8rem;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.92rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: "/";
    margin-left: 0.35rem;
    opacity: 0.75;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.92);
}

.breadcrumb .active {
    color: #fff;
}

.home-h1 {
    margin-bottom: 0.6rem;
}

.home-lead {
    max-width: 920px;
    margin-bottom: 2rem;
}

.home-grid,
.category-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
}

.home-main-section,
.home-category-section {
    margin-bottom: 2.7rem;
}

.title-with-border {
    position: relative;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
}

.title-with-border span {
    background: var(--magine-bg);
    padding-right: 1rem;
    font-weight: 800;
}

.title-with-border::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 3px solid var(--magine-border);
    z-index: -1;
}

.magine-masonry-grid {
    margin: 0 -12px;
}

.magine-two-columns {
    display: flex;
    flex-wrap: wrap;
}

.magine-column {
    width: 50%;
    padding: 0 12px;
    margin-bottom: 24px;
}

.card,
.magine-widget {
    background: var(--magine-white);
    box-shadow: var(--magine-shadow);
}

.card {
    height: 100%;
}

.card-featured-img {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.card-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.card:hover .card-featured-img img {
    transform: scale(1.04);
}

.card-body {
    padding: 1.2rem 1.2rem 0.8rem;
}

.card-masonry-cats-list {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    color: var(--magine-primary);
}

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

.card-title-text {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--magine-dark);
}

.card-title-text a {
    color: inherit;
}

.card-footer {
    border-top: 1px solid var(--magine-border);
    padding: 0.8rem 1.2rem 1rem;
    color: #6d7884;
    font-size: 0.82rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.magine-widget {
    padding: 1.1rem 1.1rem;
    margin-bottom: 1.4rem;
}

.magine-list,
.footer-links,
.magine-panel-cats {
    list-style: none;
    margin: 0;
    padding: 0;
}

.magine-list li + li,
.footer-links li + li,
.magine-panel-cats li + li {
    border-top: 1px solid var(--magine-border);
}

.magine-list a,
.footer-links a,
.magine-panel-cats a {
    display: block;
    padding: 0.65rem 0;
}

.magine-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.88rem;
}

.entry-content {
    background: #fff;
    box-shadow: var(--magine-shadow);
    padding: 1.6rem;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 1.2rem 1.2rem;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.95rem;
}

.entry-content table th,
.entry-content table td {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--magine-border);
    text-align: left;
    vertical-align: top;
}

.entry-content table th {
    background: var(--magine-primary);
    color: var(--magine-white);
    font-weight: 700;
}

.entry-content table tbody tr:nth-child(even) {
    background: var(--magine-table-stripe);
}

.faq-section {
    margin-top: 2rem;
    border-top: 1px solid var(--magine-border);
    padding-top: 1.5rem;
}

.faq-item {
    margin-bottom: 1rem;
}

.related-list {
    margin-top: 2rem;
}

.related-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--magine-dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.related-card {
    display: block;
    background: #fff;
    box-shadow: var(--magine-shadow);
    color: var(--magine-dark);
}

.related-card img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
    width: 100%;
}

.related-card span {
    display: block;
    padding: 0.7rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.tmc-posts-featured {
    background: #fff;
    margin-bottom: 0;
    overflow: hidden;
}

.tmc-posts-carousel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: #dce6ee;
}

.tmc-posts-carousel-item {
    background: #111;
}

.tmc-posts-card-img-wrapper {
    position: relative;
}

.tmc-posts-card-featured-img {
    aspect-ratio: 1 / 1;
    display: block;
}

.tmc-posts-card-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tmc-posts-card-body-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 30%, rgba(0, 0, 0, 0.72) 100%);
}

.tmc-posts-card-body-wrapper-inner {
    padding: 1rem;
}

.tmc-posts-card-cats {
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tmc-posts-card-cats a,
.tmc-posts-card-title a {
    color: #fff;
}

.tmc-posts-card-title {
    font-size: 1rem;
    margin: 0;
}

.magine-pagination {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.page-item {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid var(--magine-border);
    color: var(--magine-dark);
}

.page-item.current {
    background: var(--magine-primary);
    color: #fff;
}

.page-item.disabled {
    color: #8f98a2;
}

.btn {
    display: inline-block;
    border: 0;
    cursor: pointer;
    padding: 0.7rem 1.1rem;
    font-weight: 700;
}

.btn-primary {
    background: var(--magine-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--magine-primary-deep);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.magine-404 {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    box-shadow: var(--magine-shadow);
    padding: 2rem;
}

.magine-404-cats {
    margin-top: 1.8rem;
}

.magine-404-cats-title {
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.magine-404-cats ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

#magine-footer {
    background: var(--magine-dark);
    color: #aaa;
    margin-top: 2rem;
}

#footer-widgets {
    padding: 70px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.footer-brand,
.footer-widget-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

#magine-footer a {
    color: #aaa;
}

#magine-footer a:hover {
    color: #fff;
}

#magine-footer-bottom {
    padding: 18px 0;
}

.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

#magine-gototop {
    border: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: var(--magine-primary);
    color: #fff;
    cursor: pointer;
}

#magine-gototop:hover {
    background: var(--magine-primary-deep);
}

#magine-overlay {
    position: fixed;
    inset: 0;
    background: rgba(250, 250, 250, 0.88);
    z-index: 80;
}

.magine-panel {
    position: fixed;
    top: 0;
    right: -480px;
    width: min(480px, 100vw);
    height: 100%;
    background: #fff;
    z-index: 85;
    transition: right 0.25s ease;
    box-shadow: -6px 0 20px rgba(1, 1, 1, 0.12);
}

.magine-panel.is-open {
    right: 0;
}

.magine-panel-inner {
    padding: 80px 45px;
    overflow-y: auto;
    height: 100%;
}

.magine-panel-close {
    position: absolute;
    top: 0;
    right: 45px;
    width: 40px;
    height: 40px;
    border: 0;
    background: #f5593d;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
}

.magine-panel-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    color: var(--magine-dark);
}

.magine-fullscreen-search {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: rgba(32, 44, 57, 0.92);
}

#magine-fullscreen-search-content {
    width: min(800px, calc(100% - 40px));
    margin: 12vh auto 0;
}

#magine-close-search {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    margin-left: auto;
    display: block;
}

.magine-lg-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
}

.magine-lg-form input {
    height: 3rem;
    border: 0;
    padding: 0 0.9rem;
}

.magine-lg-form button {
    border: 0;
    background: var(--magine-primary);
    color: #fff;
    font-weight: 700;
    padding: 0 1rem;
    cursor: pointer;
}

.magine-lg-form button:hover {
    background: var(--magine-primary-deep);
}

@media (max-width: 1199px) {
    .container {
        width: min(1240px, calc(100% - 48px));
    }
}

@media (max-width: 991px) {
    html { font-size: 15px; }

    .home-grid,
    .category-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .navbar-collapse {
        border-top: 1px solid var(--magine-border);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-nav {
        flex-wrap: nowrap;
        gap: 0;
    }

    .nav-link {
        padding: 0.9rem 0.6rem;
        white-space: nowrap;
    }

    .tmc-posts-carousel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .container {
        width: calc(100% - 24px);
    }

    #magine-main-wrapper { padding: 55px 0; }

    .magine-column { width: 100%; }

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

    .footer-bottom-row {
        flex-direction: column;
        text-align: center;
    }

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

    .magine-top-icon-wrapper {
        display: none;
    }
}

@media (max-width: 575px) {
    html { font-size: 14px; }
    #magine-main-wrapper { padding: 40px 0; }
    .tmc-posts-carousel { grid-template-columns: 1fr; }
}
