/* Site branding — keep logos within navbar / footer height */
.site-brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(240px, 100%);
    max-height: 52px;
    object-fit: contain;
    object-position: left center;
}

[dir="rtl"] .site-brand-logo {
    object-position: right center;
}

.header-1 .header-main {
    align-items: center;
}

.header-1 .logo,
.header-1 .header-logo {
    display: flex;
    align-items: center;
    line-height: 0;
}

.site-brand-logo-footer {
    max-height: 48px;
    max-width: 200px;
}

.offcanvas__logo .site-brand-logo {
    max-height: 48px;
}

/* Public CMS content blocks */
.cms-rich-text img {
    max-width: 100%;
    height: auto;
}

.cms-rich-text table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

.cms-column-card {
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: #fff;
}

.cms-columns-section .section-title h2 {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .cms-column-card {
        padding: 1rem;
    }
}

/* Mobile offcanvas menu readability */
.offcanvas__info .mean-container .mean-nav ul li a {
    font-size: 16px;
    padding: 12px 0;
}

.offcanvas__info .mean-container .mean-nav ul li li a {
    padding-left: 16px;
}

[dir="rtl"] .offcanvas__info .mean-container .mean-nav ul li li a {
    padding-left: 0;
    padding-right: 16px;
}

[dir="rtl"] .offcanvas__info {
    right: auto;
    left: 0;
    border-left: 0;
    border-right: 2px solid var(--theme-blue);
    transform: translateX(calc(-100% - 80px));
}

[dir="rtl"] .offcanvas__info.info-open {
    transform: translateX(0);
}

.cms-columns-section .cms-column-card .news-section {
    padding-top: 0;
    padding-bottom: 0;
}

.cms-posts-list-compact .section-title-area {
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
}

.cms-posts-list-compact .section-title h2 {
    font-size: 1.35rem;
}

.cms-posts-list-compact .news-box-items {
    margin-top: 16px;
}

.cms-posts-list-compact .news-box-items .news-content h3 {
    font-size: 1.1rem;
}

[dir="rtl"] .news-box-items .news-content .link-btn i {
    margin-left: 0;
    margin-right: 5px;
}

[dir="rtl"] .news-box-items .news-content h3 a {
    background-position: 100% 95%;
}

.cms-columns-section .cms-column-card .hero-section-3 {
    margin-bottom: 0;
}

.hero-slider-compact .hero-content {
    padding: 80px 0 120px;
}

.hero-slider-compact .hero-content h1 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.hero-3 .hero-slider .swiper-pagination {
    bottom: 24px;
    z-index: 20;
}

.hero-3 .hero-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.55;
}

.hero-3 .hero-slider .swiper-pagination-bullet-active {
    opacity: 1;
}

.cms-columns-section .cms-column-card .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.builder-column-zone {
    min-height: 72px;
    border: 1px dashed var(--neutral-300);
    border-radius: 8px;
    background: var(--neutral-50);
    padding: 8px;
}

.builder-nested-block {
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    margin-bottom: 6px;
    cursor: pointer;
}

.builder-nested-block.is-selected {
    border-color: var(--primary-600);
}

.cms-reveal-pending {
    opacity: 0;
}

.cms-block-wrapper.wow {
    visibility: hidden;
}

.cms-hover-image-zoom img {
    transition: transform 0.35s ease;
}

.cms-hover-image-zoom:hover img {
    transform: scale(1.06);
}

.cms-hover-image-shine img {
    animation: shine 3s infinite;
}

.cms-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cms-hover-lift:hover {
    transform: translateY(-6px);
}

.cms-hover-float {
    display: inline-block;
    width: 100%;
}

.cms-hover-button-white .theme-btn {
    transition: color 0.3s ease, background-color 0.3s ease;
}

.staff-profile-static-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    background: #fff;
    margin-bottom: 2rem;
}

.staff-profile-static-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
}

.staff-profile-static-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-profile-static-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #9ca3af;
}

.staff-profile-static-name {
    font-size: 1.75rem;
    margin: 0;
}

.staff-profile-static-code {
    color: #6b7280;
    font-weight: 600;
}

.staff-profile-static-meta li,
.staff-profile-static-extra li {
    margin-bottom: 0.35rem;
}

.staff-profile-static-meta i {
    width: 1.25rem;
    margin-inline-end: 0.5rem;
}

.staff-public-profile .cms-block-wrapper:first-of-type {
    margin-top: 0;
}

.cms-content-card {
    background: #fff;
    overflow: hidden;
}

.cms-content-card-bordered {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.cms-content-card-shadow {
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.cms-card-image img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.cms-div-wrapper {
    background: #f8fafc;
    border: 1px dashed rgba(0, 0, 0, 0.08);
}

.cms-tabs-nav .nav-link {
    font-weight: 600;
}

.cms-tabs-content {
    background: #fff;
}

.cms-staff-member-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cms-staff-member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.cms-staff-member-link {
    color: inherit;
    text-decoration: none;
}

.cms-staff-member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
}

.cms-staff-member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cms-staff-search .theme-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.builder-div-zone {
    min-height: 72px;
    border: 1px dashed var(--neutral-300);
    border-radius: 8px;
    background: var(--neutral-50);
    padding: 8px;
    margin-top: 8px;
}

.builder-tab-zone {
    min-height: 72px;
    border: 1px dashed var(--neutral-300);
    border-radius: 8px;
    background: var(--neutral-50);
    padding: 8px;
}

.cms-tabs-block .description-content > .cms-block-wrapper:first-child {
    margin-top: 0;
}

.builder-tabs-row {
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

/* Standardized media ratios */
.cms-media-ratio {
    position: relative;
    overflow: hidden;
    display: block;
    background: #f3f4f6;
}

.cms-media-ratio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cms-ratio-16x9 { aspect-ratio: 16 / 9; }
.cms-ratio-4x3 { aspect-ratio: 4 / 3; }
.cms-ratio-3x2 { aspect-ratio: 3 / 2; }
.cms-ratio-1x1 { aspect-ratio: 1 / 1; }

.cms-post-card .news-image.cms-media-ratio img {
    position: absolute;
    inset: 0;
}

.cms-post-card .news-image.cms-media-ratio {
    height: auto;
}

.cms-post-excerpt {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.cms-post-horizontal,
.cms-post-list-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cms-post-minimal {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cms-post-overlay {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    color: #fff;
}

.cms-post-overlay-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.cms-post-overlay-content h3 {
    color: #fff;
    margin: 0;
    font-size: 1.15rem;
}

.cms-post-list-thumb {
    width: 96px;
}

/* Page builder blocks */
.cms-image-carousel .cms-carousel-slide {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.cms-carousel-sm { height: 220px; }
.cms-carousel-md { height: 360px; }
.cms-carousel-lg { height: 480px; }

.cms-image-carousel .cms-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cms-carousel-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), transparent);
    color: #fff;
}

.cms-carousel-caption h3 {
    color: #fff;
}

.cms-video-wrap {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.cms-video-player {
    width: 100%;
    display: block;
}

.cms-embed-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
}

.cms-embed-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cms-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cms-media-caption {
    font-size: 0.875rem;
    color: #6b7280;
}

.cms-image-small { max-width: 320px; }
.cms-image-medium { max-width: 560px; }
.cms-image-large { max-width: 800px; }
.cms-image-full { max-width: 100%; }

.cms-data-table th {
    background: #f8fafc;
}

.cms-divider-dashed {
    border-top-style: dashed;
}

.cms-divider-dotted {
    border-top-style: dotted;
}

.builder-slide-row,
.builder-gallery-row,
.builder-accordion-row {
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.builder-slide-preview {
    max-height: 80px;
    max-width: 140px;
    object-fit: cover;
    border-radius: 6px;
}
