/**
 * PDF Marocco Section - CSS
 * Sezione a 2 colonne per presentazione PDF Marocco Lifestyle
 * Ultimo aggiornamento: 31 ottobre 2025
 */

.pdf-marocco-desktop{
    padding: 50px 0;
}

.pdf-marocco-grid {
    display: grid;
    align-items: center;
    max-width: 100%;
}

/* Left Column: Text and Button */
.pdf-marocco-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.pdf-marocco-title {
    font-size: 20px;
    font-weight: 400;
    color: var(--e-global-color-primary);
    margin: 0;
    line-height: 1.2;
    font-family: var(--e-global-typography-secondary-font-family), Sans-serif;
    text-transform: uppercase;
}

.pdf-marocco-subtitle {
    font-size: 40px;
    color: var(--e-global-color-secondary);
    margin: 0;
    font-weight: 400;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    line-height: 1;
}



.pdf-marocco-image {
    width: 100%;
    height: auto;
    display: block;
}

.pdf-marocco-actions {
    margin-top: auto;
}

.pdf-view-btn {
    background-color: var(--e-global-color-secondary) !important;
    color: var(--colore-grigio-chiaro) !important;
    padding: 16px 32px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    border: 2px solid var(--e-global-color-secondary) !important;
    cursor: pointer !important;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif !important;
}

.pdf-view-btn:hover {
    transform: scale(1.1) !important;
}

.pdf-view-btn.disabled {
    background-color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Right Column: Document Cover */
.pdf-marocco-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.pdf-cover-container {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.pdf-cover-image {
    width: 100% !important;
    height: auto !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
    display: block !important;
}

.pdf-cover-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border: 2px dashed #dee2e6;
}

.pdf-cover-placeholder svg {
    color: var(--e-global-color-secondary);
    margin-bottom: 20px;
}

.pdf-cover-placeholder p {
    margin: 0;
    font-size: 18px;
    color: var(--e-global-color-primary);
    font-weight: 600;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
}

/* Responsive Design */

/* Desktop version - hidden on mobile */
.pdf-marocco-desktop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.pdf-marocco-mobile {
    display: none;
}

@media (max-width: 1199px) {
    /* Hide desktop, show mobile */
    .pdf-marocco-desktop {
        display: none !important;
    }
    
    .pdf-marocco-mobile {
        display: flex;
        flex-direction: column;
        gap: 20px;
        text-align: center;
        align-items: center;
    }
    
    .pdf-marocco-mobile .pdf-marocco-title {
        font-size: 18px;
    }
    
    .pdf-marocco-mobile .pdf-marocco-subtitle {
        font-size: 32px;
    }
    
    .pdf-marocco-mobile .pdf-marocco-image-placeholder {
        width: 100%;
        max-width: 350px;
    }
    
    .pdf-marocco-mobile .pdf-cover-container {
        max-width: 350px;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .pdf-marocco-mobile .pdf-marocco-subtitle {
        font-size: 24px;
    }
    
    .pdf-marocco-mobile .pdf-marocco-image-placeholder,
    .pdf-marocco-mobile .pdf-cover-container {
        max-width: 280px;
    }
    
    .pdf-marocco-mobile .pdf-view-btn {
        font-size: 16px !important;
        padding: 14px 28px !important;
    }
}

   

.pdf-viewer-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

#pdf-modal-title {
    font-family: var(--e-global-typography-primary-font-family), Sans-serif !important;
}

.pdf-viewer-close {
    background-color: unset !important;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif !important;
    color: var(--e-global-color-primary) !important;
    border-radius: 25px 25px 25px 25px !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-viewer-close:hover {
    opacity: 0.8;
}

.pdf-viewer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    gap: 15px;
}

.pdf-nav-btn {
    background-color: unset !important;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif !important;
    font-size: var(--e-global-typography-secondary-font-size) !important;
    font-weight: var(--e-global-typography-secondary-font-weight) !important;
    color: var(--e-global-color-primary) !important;
    border-radius: 25px 25px 25px 25px !important;
    border: none !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pdf-nav-btn:hover:not(:disabled) {
    opacity: 0.8;
}

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

.pdf-zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-zoom-btn {
    background-color: unset !important;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif !important;
    font-size: var(--e-global-typography-secondary-font-size) !important;
    font-weight: var(--e-global-typography-secondary-font-weight) !important;
    color: var(--e-global-color-primary) !important;
    border-radius: 25px 25px 25px 25px !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-zoom-btn:hover {
    opacity: 0.8;
}

.pdf-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.pdf-viewer-body {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow: auto;
    background: #f8f9fa;
}

.pdf-canvas-container {
    background: #f0f0f0; /* Light gray background to contrast with white PDF */
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    max-width: 100%;
    overflow: auto;
    position: relative;
}

.pdf-canvas-wrapper {
    position: relative;
    width: 100%;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#pdf-canvas,
#pdf-canvas-temp {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    position: relative; /* Changed from absolute */
}

#pdf-canvas-temp {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

#pdf-canvas {
    z-index: 2;
    opacity: 1 !important;
    position: relative;
}

/* Responsive adjustments */

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.pdf-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--e-global-color-primary);
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
}

.pdf-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.pdf-modal-close:hover {
    background: #eee;
    color: #333;
}

.pdf-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
}

.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
}

/* Responsive */


/* Elementor Image Override - Solo per PDF Bento Grid */
.pdf-bento-section .elementor img {
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    height: 370px;
}

/* PDF Download Modal Styles */
.pdf-download-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.pdf-download-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pdf-download-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, var(--e-global-color-primary, #007cba), var(--e-global-color-secondary, #005a87));
    color: white;
    border-radius: 12px 12px 0 0;
}

.pdf-download-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    font-family: var(--e-global-typography-primary-font-family, 'Poppins'), Sans-serif;
}

.pdf-download-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    opacity: 0.8;
}

.pdf-download-close:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.pdf-download-body {
    padding: 30px;
}

.pdf-download-body p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
    font-family: var(--e-global-typography-text-font-family, 'Poppins'), Sans-serif;
}

.pdf-download-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input:focus {
    outline: none;
    border-color: var(--e-global-color-primary, #007cba);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}


.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--e-global-typography-primary-font-family, 'Poppins'), Sans-serif;
}

.btn-cancel {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

.btn-cancel:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-submit {
    background: var(--e-global-color-primary, #007cba);
    color: white;
    border: 2px solid var(--e-global-color-primary, #007cba);
}

.btn-submit:hover {
    background: var(--e-global-color-secondary, #005a87);
    border-color: var(--e-global-color-secondary, #005a87);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive per modal download */

/* Flipbook Viewer Modal Styles */
.flipbook-viewer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999999 !important;
    justify-content: center;
    align-items: center;
}

.flipbook-viewer-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.flipbook-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.flipbook-viewer-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
}

.flipbook-viewer-close {
    background-color: unset !important;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif !important;
    color: var(--e-global-color-primary) !important;
    border-radius: 25px 25px 25px 25px !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flipbook-viewer-close:hover {
    opacity: 0.8;
}

.flipbook-viewer-body {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
    background: #f8f9fa;
}

.flipbook-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Download Popup Modal Styles */
.download-popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000000 !important;
    align-items: center;
    justify-content: center;
}

.download-popup-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.download-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, var(--e-global-color-primary, #007cba), var(--e-global-color-secondary, #005a87));
    color: white;
    border-radius: 12px 12px 0 0;
}

.download-popup-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    font-family: var(--e-global-typography-primary-font-family, 'Poppins'), Sans-serif;
}

.download-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    opacity: 0.8;
}

.download-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.download-popup-body {
    padding: 30px;
}

.download-popup-body p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
    font-family: var(--e-global-typography-text-font-family, 'Poppins'), Sans-serif;
}

.download-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.download-form .form-group {
    display: flex;
    flex-direction: column;
}

.download-form .form-group input {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--e-global-typography-text-font-family, 'Poppins'), Sans-serif;
}

.download-form .form-group input:focus {
    outline: none;
    border-color: var(--e-global-color-primary, #007cba);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.download-submit-btn {
    padding: 14px 24px;
    background: var(--e-global-color-primary, #007cba);
    color: white;
    border: 2px solid var(--e-global-color-primary, #007cba);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--e-global-typography-primary-font-family, 'Poppins'), Sans-serif;
    transition: all 0.3s ease;
}

.download-submit-btn:hover {
    background: var(--e-global-color-secondary, #005a87);
    border-color: var(--e-global-color-secondary, #005a87);
}

.download-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive per flipbook modal */
