/**
 * Citizora Blocks Styles
 * Styles for Gutenberg ACF blocks
 */

/* Block Editor Preview Styles */
.wp-block[data-type^="acf/citizora-"] {
    margin: 20px 0;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.is-active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Sizes */
.modal-size-small {
    width: 100%;
    max-width: 400px;
}

.modal-size-medium {
    width: 100%;
    max-width: 600px;
}

.modal-size-large {
    width: 100%;
    max-width: 800px;
}

.modal-size-xlarge {
    width: 100%;
    max-width: 1000px;
}

/* Modal Styles */
.modal-style-default {
    background: #fff;
    color: #1F1F1F;
}

.modal-style-dark {
    background: #1F1F1F;
    color: #fff;
}

.modal-style-brand {
    background: #00229E;
    color: #fff;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.modal-style-dark .modal-close,
.modal-style-brand .modal-close {
    background: rgba(255, 255, 255, 0.1);
}

.modal-style-dark .modal-close:hover,
.modal-style-brand .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal Header */
.modal-header {
    margin-bottom: 30px;
    padding-right: 40px;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
}

.modal-subtitle {
    font-size: 16px;
    opacity: 0.8;
    margin: 0;
}

/* Modal Body */
.modal-body {
    /* Contact Form 7 Styles inside modal */
}

.modal-body .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-body .wpcf7-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-body .wpcf7-form input[type="text"],
.modal-body .wpcf7-form input[type="email"],
.modal-body .wpcf7-form input[type="tel"],
.modal-body .wpcf7-form textarea,
.modal-body .wpcf7-form select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.modal-body .wpcf7-form input:focus,
.modal-body .wpcf7-form textarea:focus,
.modal-body .wpcf7-form select:focus {
    outline: none;
    border-color: #00229E;
    box-shadow: 0 0 0 3px rgba(0, 34, 158, 0.1);
}

.modal-body .wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

.modal-body .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: #00229E;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-body .wpcf7-submit:hover {
    background: #001a7a;
    transform: translateY(-2px);
}

/* Form Error Message */
.form-error {
    padding: 20px;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 12px;
    color: #c62828;
    text-align: center;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .modal-title {
        font-size: 22px;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
}

/* =============================================
   BREADCRUMBS — Dark variant (on white bg)
   ============================================= */

.breadcrumbs-dark {
    color: var(--color-text);
}

.breadcrumbs-dark a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumbs-dark a:hover {
    color: var(--color-primary-active);
}

.breadcrumbs-dark .breadcrumbs-current-page {
    color: var(--color-text);
    opacity: 0.5;
}

/* Breadcrumbs block standalone */
.breadcrumbs-block {
    padding: var(--gap-xl) 0 0;
}

/* =============================================
   404 PAGE
   ============================================= */

.not-found-page {
    min-height: 70vh;
    padding: var(--gap-xl) 0 calc(var(--section-padding) * 2);
    display: flex;
    align-items: center;
}

.not-found-page .breadcrumbs-dark {
    margin-bottom: var(--gap-xl);
}

.not-found-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gap-lg);
    text-align: center;
}

.not-found-code {
    font-size: clamp(80px, 14vw, 140px);
    font-weight: var(--h1-weight);
    line-height: 1;
    color: var(--color-primary-active);
    margin: 0;
}

.not-found-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gap-md);
}

.not-found-title {
    font-size: clamp(40px, 7vw, var(--h1-size));
    font-weight: var(--h1-weight);
    line-height: var(--h1-line);
    color: var(--color-text);
    margin: 0;
}

.not-found-description {
    max-width: 640px;
    font-size: var(--body2-size);
    line-height: var(--body2-line);
    color: var(--color-text-secondary);
    margin: 0;
}

/* =============================================
   TEXT BLOCK
   ============================================= */

.text-block {
    padding: var(--section-padding) 0;
}

.text-block-title {
    font-size: clamp(40px, 6vw, var(--h1-size));
    font-weight: var(--h1-weight);
    line-height: var(--h1-line);
    color: var(--color-text);
    text-align: center;
    margin: 0 0 var(--gap-xl);
}

.text-block-content {
    max-width: 970px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
}

.text-block-content h2 {
    font-size: clamp(32px, 4vw, var(--h2-size));
    font-weight: var(--h2-weight);
    line-height: var(--h2-line);
    color: var(--color-text);
    margin: 0;
}

.text-block-content h3 {
    font-size: clamp(22px, 3vw, var(--h3-size));
    font-weight: var(--h3-weight);
    line-height: var(--h3-line);
    color: var(--color-text);
    margin: 0;
}

.text-block-content h4 {
    font-size: var(--h4-size);
    font-weight: var(--h4-weight);
    line-height: var(--h4-line);
    color: var(--color-text);
    margin: 0;
}

.text-block-content p {
    font-size: var(--body1-size);
    line-height: var(--body1-line);
    color: var(--color-text-secondary);
    margin: 0;
}

.text-block-content ul,
.text-block-content ol {
    font-size: var(--body1-size);
    line-height: var(--body1-line);
    color: var(--color-text-secondary);
    padding-left: 1.5em;
    margin: 0;
}

.text-block-content li {
    margin-bottom: 0.5em;
}

.text-block-content a {
    color: var(--color-primary-active);
    text-decoration: underline;
}

.text-block-content a:hover {
    color: var(--color-primary-hover);
}

/* Group headings + paragraphs visually */
.text-block-content > *:is(h2, h3) {
    margin-top: calc(var(--gap-lg) * 0.5);
}

.text-block-button a {
    color: var(--color-text);
    font-size: var(--btn-size);
    text-decoration: none;
}

.text-block-button a:hover {
    color: var(--color-white);
}

/* =============================================
   RESPONSIVE — TEXT BLOCK & 404
   ============================================= */

@media (max-width: 768px) {
    .not-found-page {
        padding-top: var(--gap-xl);
        min-height: auto;
    }

    .not-found-description {
        font-size: var(--body3-size);
    }

    .breadcrumbs-block {
        padding-top: var(--gap-lg);
    }

    .text-block {
        padding: var(--gap-xl) 0;
    }

    .text-block-content p,
    .text-block-content ul,
    .text-block-content ol {
        font-size: var(--body2-size);
    }
}