/* --------------------------------------------------------------------------
 * File        : mediaquery.css - RESPONSIVE & DESKTOP FIX DEFINITIVO
 * -------------------------------------------------------------------------- */

/* ========================================================================
   CLASSI BASE PER DESKTOP (> 959px)
   (Ripristinano le proporzioni originali rimosse dall'HTML)
   ======================================================================== */

.responsive-book-cover {
    max-width: 350px;
    height: auto;
    margin-top: 40px;
}

#idz-features2 .responsive-book-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: inline-block;
}

.responsive-about-img-wrapper {
    margin-top: -100px;
    position: relative;
    z-index: 10;
}

.responsive-stars {
    text-align: left;
}


/* ========================================================================
   MEDIA QUERIES (Adattamento per schermi più piccoli)
   ======================================================================== */

/* [ 0. Desktop fix (da 960px in su) ] */
@media only screen and (min-width: 960px) {
    html, body {
        overflow-x: hidden;
    }

    header#idz-header {
        overflow: hidden;
        min-height: auto;
        padding-bottom: 70px;
    }

    .idz-header-wrapper,
    .idz-top-header {
        position: relative;
        z-index: 1000;
    }

    .idz-header-section {
        position: relative;
        z-index: 2;
        padding-top: 30px;
    }

    .idz-header-section .uk-grid,
    #idz-features2 .uk-grid {
        position: relative;
        align-items: center;
    }

    .idz-header-section .uk-width-large-4-10,
    #idz-features2 .uk-width-large-6-10 {
        position: relative;
    }

    .idz-header-section .responsive-book-cover,
    #idz-features2 .responsive-book-img {
        position: relative !important;
        top: 0 !important;
        right: auto !important;
        left: auto !important;
        display: block;
        width: 100%;
        height: auto;
        margin-left: auto;
        margin-right: auto;
        transform: none;
    }

    .idz-header-section .responsive-book-cover {
        max-width: 340px;
        margin-top: 20px;
    }

    #idz-features2 {
        max-height: none;
        overflow: hidden;
    }

    #idz-features2 .responsive-book-img {
        max-width: 520px;
        margin-top: 0;
    }

    .responsive-about-img-wrapper {
        margin-top: 0;
        overflow: hidden;
    }

    .responsive-about-img-wrapper .idz-normal-image,
    .idz-normal-image,
    img {
        max-width: 100%;
        height: auto;
    }

    nav#idz-nav {
        margin-right: 0;
    }

    nav#idz-nav .uk-navbar-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    nav#idz-nav .uk-navbar-nav > li > a {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* [ 1. Tablet Landscape (1024px e inferiori) ] */
@media only screen and (max-width:1024px) {
	.idz-header-section .idz-float-img { right: 0; }
	.idz-normal-image { max-width: 100%; }
	.to-top { right: 70px; }
	.idz-pricing-intro { margin-bottom: 30px; }
}

/* [ 2. Tablet Portrait (768px - 959px) ] */
@media only screen and (min-width: 768px) and (max-width: 959px) {
	header#idz-header {
		min-height: auto;
        padding-bottom: 50px;
	}
    /* Sgancia l'immagine di copertina dal posizionamento assoluto e la centra */
	.idz-header-section .responsive-book-cover {
        position: relative !important;
		max-width: 300px;
		top: 0;
		right: 0;
        margin: 40px auto 0 auto;
        display: block;
	}
	.responsive-header-padding {
		padding-top: 50px !important;
		padding-bottom: 0px !important;
	}
	.idz-testimonials { margin-bottom: 80px !important; }
	
	#idz-features2 { max-height: none; padding-bottom: 60px; }
	#idz-features2.uk-padding-large { padding-top: 30px !important; }
	
    /* Ripristina l'immagine nella sezione verde */
    #idz-features2 .responsive-book-img {
        position: relative !important;
		max-width: 80%;
		top: 0;
		left: 0;
        margin: 0 auto;
	}
    .responsive-about-img-wrapper {
        margin-top: 50px !important; /* Rimuove il margine negativo che tagliava la foto */
    }
	.idz-footer-logo, .copyright {
		display: block;
		text-align: center;
		margin: 0 auto 30px auto;
	}
	.to-top { width: 40px; height: 40px; right: 60px; line-height: 38px; }
	.idz-footer-widget, .idz-block-text { margin-bottom: 30px !important; }
}

/* [ 3. Mobile Landscape & Portrait (Fino a 767px) ] */
@media only screen and (max-width: 767px) {
	header#idz-header {
		min-height: auto;
        padding-bottom: 50px;
	}
	.idz-header-section .responsive-book-cover {
        position: relative !important;
		max-width: 250px !important;
		top: 0;
		right: 0;
        margin: 40px auto 0 auto;
        display: block;
	}
	.responsive-header-padding {
		padding-top: 50px !important;
		padding-bottom: 20px !important;
        text-align: center;
	}
	.idz-header-content h1 {
		font-size: 28px;
		line-height: 34px;
	}
	
	.idz-testimonials { margin-bottom: 60px !important; }
    
    #idz-features2 { 
        max-height: none; 
        padding-bottom: 50px;
    }
    #idz-features2 .responsive-stars {
        text-align: center !important;
    }
    #idz-features2 .uk-width-large-4-10 {
        text-align: center;
    }
	#idz-features2 .responsive-book-img {
        position: relative !important;
		max-width: 80% !important;
		top: 0;
		right: 0;
        margin: 30px auto 0 auto;
        display: block;
	}
	#idz-features2 h2 { font-size: 28px; line-height: 1.2; }
	
    .responsive-about-img-wrapper {
        margin-top: 30px !important;
    }
	.idz-normal-image { max-width: 100%; }
    
    /* Prezzi */
    .idz-price-list li:after { display: none; }
    .idz-price-item.with-border:after { display: none; }
    .idz-price-list > li { margin-bottom: 30px; }

	.idz-footer-logo {
		display: block;
		text-align: center;
		margin: 0 auto 40px auto;
	}
	.copyright { display: block; text-align: center; }
	.to-top { width: 40px; height: 40px; right: 20px; line-height: 38px; }
	.idz-footer-widget, .idz-block-text { margin-bottom: 30px !important; }
    
    .txt42 { font-size: 32px; line-height: 40px; }
    
    .idz-heading-with-icon i {
        font-size: 80px;
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
    }
    .idz-heading-with-icon h2 { text-align: center; }
    .idz-feature-box p { text-align: center; }
}

/* [ 4. Mobile Extra Small ] */
@media only screen and (max-width: 479px) {
    .idz-header-content h1 {
		font-size: 24px;
		margin-bottom: 10px;
	}
    .idz-price { font-size: 58px; }
    .idz-currency { font-size: 32px; bottom: 15px; }
    .uk-padding-large { padding-top: 50px; padding-bottom: 50px; }
    .uk-padding { padding-top: 40px; padding-bottom: 40px; }
}



/* ========================================================================
   NAVBAR FIX MOBILE/DESKTOP
   ======================================================================== */

@media only screen and (min-width: 768px) {
    .idz-menu > .uk-navbar-toggle {
        display: none !important;
    }
}

@media only screen and (max-width: 767px) {
    .idz-top-header {
        position: relative;
        z-index: 1200;
    }

    .idz-menu {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        min-height: 72px;
        position: relative;
    }

    .idz-menu nav#idz-nav {
        display: none !important;
    }

    .idz-menu > .uk-navbar-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: relative;
        right: 0 !important;
        bottom: auto !important;
        top: auto !important;
        width: 48px;
        height: 48px;
        font-size: 30px;
        line-height: 1;
        z-index: 1300;
    }

    .idz-menu > .uk-navbar-toggle:after {
        line-height: 1;
    }

    .idz-logo {
        position: relative;
        z-index: 1300;
    }

    .uk-offcanvas-bar {
        z-index: 1400;
    }
}


/* [ 5. Mobile navbar single-row fix ] */
@media only screen and (max-width: 767px) {
    .idz-top-header .uk-grid {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        margin-left: 0;
    }

    .idz-top-header .uk-grid > [class*="uk-width-"] {
        box-sizing: border-box;
        float: none;
        width: auto !important;
        margin: 0;
        padding-left: 0;
    }

    .idz-top-header .uk-grid > :first-child {
        flex: 0 1 auto;
    }

    .idz-top-header .uk-grid > :last-child {
        flex: 1 1 auto;
        display: flex;
        justify-content: flex-end;
    }

    .idz-top-header {
        padding-top: 24px;
        padding-bottom: 20px;
    }

    .idz-logo,
    .idz-logo a,
    .idz-logo img {
        display: block;
    }

    .idz-logo img {
        max-width: 82px;
        height: auto;
    }

    .idz-menu {
        min-height: auto;
        width: auto;
    }

    .idz-menu > .uk-navbar-toggle {
        position: static;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        flex: 0 0 44px;
    }
}

footer#idz-footer {
    text-align: center !important;
}

/* BLOCCA UIKIT GRID SOLO NEL FOOTER */
footer#idz-footer .uk-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: flex-start !important;
    text-align: center !important;
}

/* COLONNE SEMPRE CENTRATE MA RESPONSIVE */
footer#idz-footer .uk-grid > div {
    float: none !important;
    margin: 0 auto !important;
    text-align: center !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* TITOLI SEMPRE CENTRATI */
footer#idz-footer h1,
footer#idz-footer h2,
footer#idz-footer h3,
footer#idz-footer h4 {
    text-align: center !important;
}

/* LISTE RESET COMPLETO */
footer#idz-footer ul {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

/* ITEM LISTA CENTRATI */
footer#idz-footer li {
    list-style: none !important;
    text-align: center !important;
}

/* LINK CENTRATI */
footer#idz-footer li a {
    display: inline-block !important;
    text-align: center !important;
}

/* SOCIAL SEMPRE CENTRATI */
footer#idz-footer .idz-footer-social {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px;
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
}

footer#idz-footer li,
footer#idz-footer li a {
    white-space: nowrap !important;
}

#idz-header,
.idz-header-wrapper {
    position: relative;
    z-index: 9999;
}

#idz-nav,
.idz-top-header,
.uk-navbar,
.uk-sticky {
    position: relative;
    z-index: 10000;
}

#idz-about {
    position: relative;
    z-index: 1;
}

.responsive-about-img-wrapper {
    position: relative;
    z-index: 1;
}

.responsive-about-img-wrapper img {
    display: block;
    position: relative;
    z-index: 1;
}

/* NAVBAR SEMPRE SOPRA TUTTO */
.idz-header-wrapper {
    position: relative;
    z-index: 99999 !important;
}

#idz-header {
    position: relative;
    z-index: 99998 !important;
}

.uk-navbar-toggle {
    display: inline-flex !important;
}


@media only screen and (max-width: 767px) {
    .idz-price-list {
        display: flex !important;
        flex-direction: column;
    }

    .idz-price-list > li {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* --- FIX CENTRATURA MOBILE --- */
@media only screen and (max-width: 767px) {
    /* Centra la lista dei prezzi */
    .idz-price-list {
        display: block !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }

    /* Centra ogni singolo elemento (Copia fisica / Digitale) */
    .idz-price-list > li {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Centra orizzontalmente i figli */
        justify-content: center !important;
        text-align: center !important;
        margin-bottom: 40px !important; /* Spazio tra i due prezzi */
        padding-left: 0 !important;
    }

    /* Rimuove bordi o divisori che potrebbero sballare la centratura */
    .idz-price-item {
        border: none !important;
        margin: 0 auto !important;
        display: inline-block !important;
    }

    .idz-price-item.with-border:after {
        display: none !important;
    }

    /* Centra la descrizione sotto i prezzi */
    .idz-pricing-desc {
        text-align: center !important;
        margin-top: 10px !important;
        padding: 0 15px !important; /* Evita che il testo tocchi i bordi dello schermo */
    }
}