/* ============================================================
   Cazare Sighisoara - WordPress overrides
   Keeps the legacy 1:1 design while adapting to WordPress/Elementor.
   ============================================================ */

/* ---------- Base ---------- */
html {
    margin-top: 0 !important;
}

body {
    margin: 0;
}

body .site-main {
    min-height: 60vh;
    width: 100%;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
}

img {
    image-rendering: auto;
}

.logo-img {
    height: 42px;
    width: auto;
}

/* ---------- Accessibility ---------- */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link {
    background: var(--primary);
    color: #fff;
    left: -9999px;
    padding: 12px 20px;
    position: fixed;
    top: 0;
    z-index: 999999;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
}

/* ---------- WordPress admin bar ---------- */
body.admin-bar .header {
    top: 32px;
}

body.admin-bar .nav-mobile {
    top: calc(32px + var(--header-height));
}

@media screen and (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
    }

    body.admin-bar .nav-mobile {
        top: calc(46px + var(--header-height));
    }
}

/* ---------- Elementor page shell ---------- */
.cz-elementor-page .site-main > .elementor {
    width: 100%;
}

.cz-elementor-page .elementor-section.elementor-section-full_width > .elementor-container,
.cz-elementor-page .e-con-full {
    max-width: 100%;
}

.cz-elementor-page .elementor-widget-html > .elementor-widget-container,
.cz-elementor-page .elementor-widget-shortcode > .elementor-widget-container {
    width: 100%;
}

.cz-elementor-page .elementor-element.elementor-widget-html,
.cz-elementor-page .elementor-element.elementor-widget-shortcode {
    width: 100%;
}

.cz-elementor-page .elementor-section {
    margin-bottom: 0;
}

.cz-elementor-page .elementor-column,
.cz-elementor-page .elementor-widget-wrap {
    padding: 0;
}

.cz-elementor-page .elementor-widget-container {
    margin: 0;
}

/* Hide the default Elementor page title on our templates. */
.cz-elementor-page .entry-header,
.cz-elementor-page .page-header {
    display: none;
}

/* Elementor headings inherit the legacy styles. */
.cz-elementor-page .elementor-heading-title {
    font-family: var(--font-serif);
    color: var(--text);
}

/* ---------- Header ---------- */
.header .logo {
    text-decoration: none;
}

.header .logo-text,
.footer .logo-text {
    text-decoration: none;
}

.nav-toggle {
    background: transparent;
    border: 0;
}

body.menu-open {
    overflow: hidden;
}

/* Header on light pages without a hero */
.cz-page-plain .header .logo-text,
.cz-page-plain .header .logo-tagline,
.cz-page-plain .header .nav-link {
    color: var(--text);
}

.cz-page-plain .header .logo-tagline {
    color: var(--text-muted);
}

/* ---------- Hero ---------- */
.hero-home {
    min-height: 100vh;
}

.hero-content {
    z-index: 2;
}

.hero-bg-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

.hero-bg-slide:first-child {
    opacity: 1;
}

.hero-search {
    position: relative;
    z-index: 3;
}

.hero-stats {
    position: relative;
    z-index: 3;
}

/* ---------- Archive filters ---------- */
.cz-filter-bar {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 32px;
}

.cz-filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.cz-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cz-filter-field label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.cz-filter-field input,
.cz-filter-field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
}

.cz-filter-field input:focus,
.cz-filter-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.cz-filter-form .btn {
    min-height: 44px;
    white-space: nowrap;
}

.cz-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -12px 0 28px;
}

.cz-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--accent-light);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
}

.cz-filter-chip a {
    color: inherit;
    font-weight: 700;
}

@media (max-width: 900px) {
    .cz-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .cz-filter-form .btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .cz-filter-form {
        grid-template-columns: 1fr;
    }
}

/* ---------- Single cazare ---------- */
.cz-gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 200px 200px;
    gap: 8px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
}

.cz-gallery-grid .gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cz-gallery-grid .gallery-item:first-child {
    grid-row: 1 / 3;
}

.cz-gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cz-gallery-grid .gallery-item:hover img {
    transform: scale(1.04);
}

.cz-gallery-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 46, 0.55);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    gap: 8px;
}

@media (max-width: 768px) {
    .cz-gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 180px 120px;
    }

    .cz-gallery-grid .gallery-item:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

.cz-single-description {
    line-height: 1.8;
    color: var(--text-light);
    font-size: 1.05rem;
    overflow-wrap: break-word;
}

.cz-single-description p {
    margin-bottom: 16px;
}

.cz-facility-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.cz-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.cz-info-row:last-child {
    border-bottom: 0;
}

.cz-info-label {
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.cz-info-value {
    color: var(--text);
    text-align: right;
    overflow-wrap: anywhere;
}

.cz-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 12px 0;
}

.cz-price strong {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--primary);
}

.cz-price span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
    padding: 14px 20px;
}

.cookie-content {
    max-width: var(--container-lg);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-actions .btn {
    padding: 8px 20px;
    font-size: 0.8rem;
}

@media (max-width: 700px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ---------- WordPress content ---------- */
.cz-page-content {
    max-width: 900px;
    margin: 0 auto;
}

.cz-page-content h2,
.cz-page-content h3 {
    margin-top: 32px;
    margin-bottom: 12px;
}

.cz-page-content p,
.cz-page-content ul,
.cz-page-content ol {
    margin-bottom: 16px;
    color: var(--text-light);
}

.cz-page-content ul,
.cz-page-content ol {
    padding-left: 24px;
}

.cz-page-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Elementor editor preview ---------- */
.elementor-editor-active .header {
    position: static;
}

.elementor-editor-active .site-main {
    min-height: 0;
}

/* ---------- Small fixes ---------- */
.footer {
    margin-top: 0;
}

.hero-sm {
    padding-top: calc(var(--header-height) + 48px);
    padding-bottom: 56px;
}

.hero-sm h1 {
    overflow-wrap: anywhere;
}

.badge + .badge {
    margin-left: 6px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Stats row: keep four columns with subtle separators. */
.stats-grid .stat-item + .stat-item {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* Hello Elementor sets .pagination to space-between; keep the legacy centered layout. */
body .pagination {
    justify-content: center !important;
    gap: 8px;
}

/* Smaller heroes must keep their compact title at every breakpoint. */
body .hero-sm h1:not([style]) {
    font-size: clamp(1.75rem, 4vw, 2.75rem) !important;
}

body .pagination .pagination-link {
    flex: 0 0 auto;
}

/* The legacy footer has three content columns, not four. */
@media (min-width: 1025px) {
    .footer-main {
        grid-template-columns: 1.6fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stats-grid .stat-item + .stat-item {
        border-left: 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-home {
        min-height: 92vh;
    }

    .hero-stats {
        display: none;
    }
}
