.cy-fhd-card {
    position: relative;
    cursor: pointer;
}

/* Invisible full-card link: makes the whole card a real link (native middle-click,
   right-click "open in new tab", Ctrl+click). The edit button (z-index 30) stays
   above it and remains clickable. */
.cy-fhd-card-stretch {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    white-space: nowrap;
    text-indent: 100%;
    background: transparent;
}

.cy-fhd-edit-button {
    position: absolute;
    top: 12px;
    right: auto;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid #e91e63;
    border-radius: 4px;
    background: #fff;
    color: #e91e63;
    font: 600 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.cy-fhd-edit-button:hover,
.cy-fhd-edit-button:focus {
    background: #e91e63;
    border-color: #e91e63;
    color: #fff;
    outline: none;
}

.cy-fhd-firma-button {
    right: 12px;
}

.cy-fhd-edit-button .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
}

body.cy-fhd-modal-open {
    overflow: hidden;
}

.cy-fhd-modal[hidden] {
    display: none;
}

.cy-fhd-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    color: #1d2327;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.cy-fhd-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
}

.cy-fhd-dialog {
    position: relative;
    width: min(860px, 100%);
    max-height: calc(100vh - 56px);
    overflow: auto;
    padding: 24px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.cy-fhd-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 4px;
    background: #f0f0f1;
    color: #1d2327;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cy-fhd-close:hover,
.cy-fhd-close:focus {
    background: #dcdcde;
    outline: none;
}

.cy-fhd-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-right: 42px;
    margin-bottom: 18px;
}

.cy-fhd-head h2 {
    margin: 0;
    color: #1d2327;
    font-size: 22px;
    line-height: 1.25;
}

.cy-fhd-head p {
    margin: 4px 0 0;
    color: #646970;
    font-size: 13px;
}

.cy-fhd-admin-link {
    flex: 0 0 auto;
    margin-top: 3px;
    color: #2271b1;
    font-weight: 700;
    text-decoration: none;
}

.cy-fhd-head-links {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.cy-fhd-dialog .cy-fhd-delete-page {
    margin-top: 0;
    border-color: #b32d2e;
    background: #fff;
    color: #b32d2e;
}

.cy-fhd-dialog .cy-fhd-delete-page:hover,
.cy-fhd-dialog .cy-fhd-delete-page:focus {
    border-color: #8a2424;
    background: #b32d2e;
    color: #fff;
}

.cy-fhd-admin-link:hover,
.cy-fhd-admin-link:focus {
    color: #135e96;
    text-decoration: underline;
}

.cy-fhd-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

.cy-fhd-blocks-field {
    margin: 0 0 14px;
}

.cy-fhd-blocks-label {
    display: block;
    margin-bottom: 6px;
    color: #1d2327;
    font-size: 13px;
    font-weight: 700;
}

.cy-fhd-blocks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cy-fhd-block-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cy-fhd-block-row .cy-fhd-block-input {
    flex: 1 1 auto;
    margin-top: 0;
    text-transform: uppercase;
}

.cy-fhd-block-remove {
    flex: 0 0 auto;
    width: 40px;
    min-height: 40px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #f6f7f7;
    color: #b32d2e;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.cy-fhd-block-remove:hover,
.cy-fhd-block-remove:focus {
    border-color: #b32d2e;
    background: #b32d2e;
    color: #fff;
    outline: none;
}

.cy-fhd-add-block {
    margin-top: 8px;
}

.cy-fhd-wide-field {
    grid-column: 1 / -1;
}

.cy-fhd-dialog label {
    display: block;
    margin: 0 0 14px;
    color: #1d2327;
    font-size: 13px;
    font-weight: 700;
}

.cy-fhd-dialog input,
.cy-fhd-dialog textarea {
    width: 100%;
    min-height: 40px;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    color: #1d2327;
    font-size: 14px;
    line-height: 1.4;
}

.cy-fhd-dialog textarea {
    resize: vertical;
}

.cy-fhd-dialog input::placeholder,
.cy-fhd-dialog textarea::placeholder {
    color: #a7aaad;
    font-weight: 400;
    opacity: 1;
}

.cy-fhd-dialog input:focus,
.cy-fhd-dialog textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.cy-fhd-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 4px;
}

.cy-fhd-media-field {
    padding: 12px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #f6f7f7;
}

.cy-fhd-media-field:only-child {
    grid-column: 1 / -1;
}

.cy-fhd-preview {
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border: 1px dashed #a7aaad;
    border-radius: 4px;
    background: #e6e6e6;
    color: #646970;
    text-align: center;
}

.cy-fhd-preview img {
    max-width: 100%;
    max-height: 150px;
    display: block;
    object-fit: contain;
}

.cy-fhd-media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cy-fhd-dialog .cy-fhd-logo-bg-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cy-fhd-dialog .cy-fhd-logo-bg-toggle input {
    width: auto;
    min-height: 0;
    margin: 0;
    flex: 0 0 auto;
}

.cy-fhd-preview.cy-fhd-logo-white {
    background: #fff;
}

.cy-fhd-admin-page {
    max-width: 1120px;
}

.cy-fhd-admin-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 18px;
}

.cy-fhd-admin-toolbar input[type="search"] {
    width: min(420px, 100%);
    min-height: 38px;
}

.cy-fhd-admin-count {
    color: #646970;
    font-weight: 600;
}

.cy-fhd-admin-add-new {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    min-height: 38px !important;
}

.cy-fhd-admin-add-new .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
}

.cy-fhd-admin-results {
    display: grid;
    gap: 12px;
}

.cy-fhd-admin-result {
    position: relative;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    min-height: 96px;
    padding: 14px 170px 14px 14px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cy-fhd-admin-result[hidden] {
    display: none;
}

.cy-fhd-admin-result .cy-fhd-edit-button {
    top: 16px;
    right: 16px;
}

.cy-fhd-admin-logo {
    width: 76px;
    height: 76px;
    margin: 0;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background: #e6e6e6;
}

.cy-fhd-admin-logo.cy-fhd-logo-white {
    background: #fff;
}

/* Public listing/home card logos (Elementor image-box) are gray by default;
   the white class opts an individual firma out. */
.cy-fhd-firma-card .elementor-image-box-img {
    background-color: #e6e6e6 !important;
}

.cy-fhd-firma-card.cy-fhd-logo-white .elementor-image-box-img {
    background-color: #fff !important;
}

.cy-fhd-admin-logo a,
.cy-fhd-admin-logo span {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #646970;
    text-decoration: none;
}

.cy-fhd-admin-logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cy-fhd-admin-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 2px 0 8px;
}

.cy-fhd-admin-result h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.cy-fhd-admin-result h2 a {
    color: #1d2327;
    text-decoration: none;
}

.cy-fhd-admin-result h2 a:hover,
.cy-fhd-admin-result h2 a:focus {
    color: #2271b1;
}

.cy-fhd-admin-block {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f6fc;
    color: #0969da;
    font-size: 12px;
    font-weight: 700;
}

.cy-fhd-admin-result .elementor-widget-text-editor {
    color: #646970;
}

.cy-fhd-admin-meta {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    color: #50575e;
    font-size: 13px;
}

.cy-fhd-admin-empty {
    margin-top: 16px;
    color: #646970;
    font-weight: 600;
}

.cy-fhd-status {
    min-height: 22px;
    margin-top: 14px;
    font-weight: 700;
}

.cy-fhd-status.is-ok {
    color: #008a20;
}

.cy-fhd-status.is-error {
    color: #b32d2e;
}

.cy-fhd-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.cy-fhd-actions-spacer {
    flex: 1 1 auto;
}

.cy-fhd-dialog .button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #f6f7f7;
    color: #1d2327;
    font-weight: 600;
    cursor: pointer;
}

.cy-fhd-dialog .button:hover,
.cy-fhd-dialog .button:focus {
    border-color: #2271b1;
    color: #2271b1;
    outline: none;
}

.cy-fhd-dialog .button-primary {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.cy-fhd-dialog .button-primary:hover,
.cy-fhd-dialog .button-primary:focus {
    background: #135e96;
    color: #fff;
}

.cy-fhd-dialog .button-link-delete {
    border-color: transparent;
    background: transparent;
    color: #b32d2e;
}

.cy-fhd-dialog .cy-fhd-delete-firma {
    border-color: #b32d2e;
    background: #fff;
}

.cy-fhd-dialog .cy-fhd-delete-firma:hover,
.cy-fhd-dialog .cy-fhd-delete-firma:focus {
    border-color: #8a2424;
    color: #8a2424;
}

.cy-fhd-dialog .button:disabled,
.cy-fhd-dialog input:disabled,
.cy-fhd-dialog textarea:disabled {
    cursor: progress;
    opacity: 0.62;
}

.cy-fhd-inner-hero {
    --cy-fhd-inner-hero-bg: none;
    width: 100%;
    min-height: 320px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    background-color: #000;
    background-image: var(--cy-fhd-inner-hero-bg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
    font-family: "Poppins", Sans-serif;
    letter-spacing: 0;
}

.cy-fhd-inner-hero-shell .elementor-element.elementor-element-ad5f939 {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #000;
    background-image: var(--cy-fhd-inner-hero-bg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.cy-fhd-inner-hero-shell .elementor-element.elementor-element-ad5f939 > .e-con-inner {
    width: 100%;
}

.cy-fhd-inner-hero-shell .elementor-element.elementor-element-f415d5c {
    text-align: center;
}

.cy-fhd-inner-hero-shell .elementor-element.elementor-element-f415d5c > .elementor-widget-container {
    margin: 0 0 -22px 0 !important;
}

.cy-fhd-inner-hero-shell .elementor-element.elementor-element-f415d5c .elementor-heading-title {
    margin: 0 !important;
    color: #fff !important;
    font-family: "Poppins", Sans-serif !important;
    font-size: 33px !important;
    font-style: normal;
    line-height: 84px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-align: center;
    text-transform: none;
    transform: scaleX(0.994);
    transform-origin: center center;
}

.cy-fhd-inner-hero-title {
    margin: 0 0 -22px !important;
    color: #fff !important;
    font-family: "Poppins", Sans-serif !important;
    font-size: 33px !important;
    font-style: normal;
    line-height: 84px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-align: center;
    text-transform: none;
}

.cy-fhd-inner-page {
    width: 100%;
    padding: 48px 0 52px;
    background: #fff;
    color: #000;
    font-family: "Poppins", Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

.cy-fhd-inner-page *,
.cy-fhd-inner-page *::before,
.cy-fhd-inner-page *::after {
    box-sizing: border-box;
}

.cy-fhd-inner-layout {
    width: min(920px, calc(100% - 56px));
    margin: 0 auto;
    display: block;
}

.cy-fhd-inner-brand {
    display: flex;
    align-items: center;
    gap: 34px;
}

.cy-fhd-inner-logo {
    width: 160px;
    height: 160px;
    flex: 0 0 160px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d6d6d6;
    background: #e6e6e6;
    overflow: hidden;
}

.cy-fhd-inner-logo.cy-fhd-logo-white {
    background: #fff;
}

.cy-fhd-inner-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 12px;
}

.cy-fhd-inner-logo span {
    color: #777;
    font-size: 16px;
}

/* Fallback "logo": the firma name shown in the logo spot when there is no logo. */
.cy-fhd-logo-fallback {
    font-family: "Poppins", Arial, Helvetica, sans-serif;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.cy-fhd-inner-logo .cy-fhd-logo-fallback {
    padding: 12px;
    font-size: 16px;
}

.cy-fhd-admin-logo .cy-fhd-logo-fallback {
    padding: 4px;
    font-size: 11px;
}

/* Card fallback: a generated logo box sized like the real one (100px wide). */
.cy-fhd-firma-card .elementor-image-box-img.cy-fhd-fallback-logo-box {
    width: 100px;
    flex: 0 0 100px;
    min-height: 70px;
    margin: 0;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cy-fhd-fallback-logo-box .cy-fhd-logo-fallback {
    width: 100%;
    font-size: 11px;
}

.cy-fhd-inner-brand h1 {
    min-width: 0;
    margin: 0;
    color: #000;
    font-size: 26px;
    line-height: 1.16;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.cy-fhd-inner-description {
    margin-top: 38px;
    color: #a0a0a0;
    font-size: 18px;
    line-height: 1.55;
    font-weight: 500;
}

.cy-fhd-inner-description p {
    margin: 0 0 0.86em;
}

.cy-fhd-inner-description p:last-child {
    margin-bottom: 0;
}

.cy-fhd-inner-contact {
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin-top: 58px;
}

.cy-fhd-inner-contact-row {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #a0a0a0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 500;
    text-decoration: none;
}

.cy-fhd-inner-contact-row:hover,
.cy-fhd-inner-contact-row:focus {
    color: #000;
}

.cy-fhd-inner-contact-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    color: #000;
}

.cy-fhd-inner-contact-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.cy-fhd-inner-contact-row span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.cy-fhd-inner-contact-phones:hover,
.cy-fhd-inner-contact-phones:focus-within {
    color: #a0a0a0;
}

.cy-fhd-inner-phone-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.cy-fhd-inner-phone-link:hover,
.cy-fhd-inner-phone-link:focus {
    color: #000;
    outline: none;
}

.cy-fhd-inner-phone-sep {
    color: #a0a0a0;
}

@media (max-width: 767px) {
    .cy-fhd-inner-hero-shell .elementor-element.elementor-element-f415d5c .elementor-heading-title {
        font-size: 40px !important;
    }

    .cy-fhd-inner-hero-title {
        font-size: 40px !important;
    }
}

@media (max-width: 720px) {
    .cy-fhd-modal {
        align-items: stretch;
        padding: 12px;
    }

    .cy-fhd-dialog {
        max-height: calc(100vh - 24px);
        padding: 18px;
    }

    .cy-fhd-inner-hero {
        min-height: 300px;
    }

    .cy-fhd-inner-hero-title {
        font-size: 40px !important;
    }

    .cy-fhd-head,
    .cy-fhd-grid,
    .cy-fhd-media-grid {
        grid-template-columns: 1fr;
    }

    .cy-fhd-head {
        display: block;
        margin-right: 38px;
    }

    .cy-fhd-admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .cy-fhd-admin-result {
        grid-template-columns: 64px minmax(0, 1fr);
        padding: 14px;
    }

    .cy-fhd-admin-result .cy-fhd-edit-button {
        position: static;
        grid-column: 1 / -1;
        width: max-content;
        margin-top: 2px;
    }

    .cy-fhd-admin-logo {
        width: 64px;
        height: 64px;
    }

    .cy-fhd-inner-layout {
        width: calc(100% - 38px);
    }

    .cy-fhd-inner-brand {
        gap: 20px;
    }

    .cy-fhd-inner-logo {
        width: 116px;
        height: 116px;
        flex-basis: 116px;
    }

    .cy-fhd-inner-brand h1 {
        font-size: 24px;
    }

    .cy-fhd-inner-description {
        font-size: 16px;
    }

    .cy-fhd-inner-contact {
        margin-top: 34px;
        gap: 18px;
    }

}
