/*
Theme Name: Starter Block Theme v2
Theme URI: https://jakson.co/
Author: Jakson
Author URI: https://jakson.co/
Description: 
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.4
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: starter-block-theme-v2
Tags: Block Editor Patterns, Site Editor

/*  Smoot Scroll */
html {
  scroll-behavior: smooth;
}

/*  Reduced motion prefs  */
@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/*  Navigation Block Breakpoint. Credit: https://wpdocs.io/ */
body .wp-block-navigation__responsive-container-open:not(.always-shown) {
  display: block !important;
}

body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
  display: none !important;
}

/* Change the width to the breakpoit of the Nav */
@media (min-width: 799px) {
  body .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }

  body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block !important;
  }
}

/* end nav break point */

body {
    background-color: #FBFAFF;
}

/* Nicley wrapped headlines */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* I've no idea why when you add a backgroud colour to a column, WP by default adds padding to it... so weird - this get's rid of that */
:where(.wp-block-columns.has-background) {
  padding: initial;
}

/* Pull Quote */
.wp-block-pullquote blockquote {
  display: grid;
  gap: 20px;
}

.wp-block-pullquote cite {
  font-size: 80%;
  font-weight: 600;
}

/* Search Block */
.wp-block-search__input {
  border: 1px solid;
}

.wp-block-search__button {
  box-shadow: none;
  border: 1px solid var(--wp--preset--color--custom-off-black);
  border-radius: 0;
  color: white;
  padding: 0.4rem 1rem 0.5rem 1rem;
  font-weight: 500;
}

/* Comments */
.comment-form-cookies-consent {
  font-size: 14px;
  line-height: 2;
}

/* Keep our titles link the off black color*/
.wp-block-post-title :where(a) {
  color: var(--wp--preset--color--custom-off-black);
}

/* Button hover state  - core button block still does not have this and I can't figure out how to do it in theme.json! */
.wp-block-button__link,
a {
  transition: 0.3s;
}

.wp-block-button.is-style-fill .wp-block-button__link:hover,
#commentform .form-submit.wp-block-button input:hover {
  background: var(--wp--preset--color--custom-white);
  color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-custom-white);
  color: var(--wp--preset--color--off-black);
  border-color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: #C5B3F8;
  color:  var(--wp--preset--color--off-black)!important;
  border-color: var(--wp--preset--color--custom-off-black);
}

a:hover:not(.wp-block-site-title a, .wp-block-button__link.wp-element-button) {
  /* text-decoration: underline !important; */
}

/* Swiper */
.swiper {
  width: 100%;
  height: 490px;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #444;
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto !important;
  height: 480px !important;
}

.swiper-slide img {
  display: block;
  object-fit: cover;
  height: 480px;
}

.swiper-scrollbar {
  margin-top: 48px;
  background-color: #A396E5 !important;
  border-radius: 0 !important;
}

.swiper-scrollbar-drag {
  background-color: #D5AC4E !important;
  border-radius: 0 !important;
}

/* FORM DI CONTATTO CONTACT FORM 7 */
/* Stili per il gruppo contenitore (editor a blocchi) */
.wp-block-group.contattami-section {
    padding: 80px 40px;
    color: #FCFCFE;
}

/* Stili per il titolo nel gruppo */
.contattami-section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: white;
    text-align: center;
    text-transform: uppercase;
}

/* Stili per il paragrafo descrittivo nel gruppo */
.contattami-section p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin: 0 auto 50px auto;
}

/* Layout dei campi */
.form-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.form-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-field.full-width {
    width: 100%;
    margin-bottom: 40px;
}

/* Etichette */
.form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    color: white;
    text-transform: uppercase;
}

/* Campi di input */
.form-input,
.form-textarea {
    background: #e8e8e8;
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 15px 18px;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    background: #f0f0f0;
    border-color: #ccc;
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    font-family: inherit;
}

/* Placeholder styling */
.form-input::placeholder,
.form-textarea::placeholder {
    color: #999;
    font-style: italic;
}

/* Pulsante di invio */
.form-submit {
    text-align: center;
    margin-top: 30px;
}

/* Pulsante di invio (stato normale) */
.submit-btn {
    /* Gradiente di sfondo per lo stato normale */
    background: linear-gradient(48deg, rgb(217, 70, 239) -12%, rgb(63, 128, 241) 119%);
    opacity: 1;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    /* Ombra per lo stato normale */
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

/* Effetto Hover (Passaggio del mouse) */
.submit-btn:hover {
    /* Nuovo gradiente di sfondo on hover */
    background: linear-gradient(45deg, #ad32c4, #f73378);
    /* Animazione aggiuntiva */
    transform: translateY(-2px);
    /* Nuova ombra on hover */
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-block-group.contattami-section {
        padding: 40px 20px;
    }
    
    .contattami-section h2 {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .form-field {
        margin-bottom: 20px;
    }
}

/* Rimozione stili predefiniti CF7 */
/* Rimuove i margini predefiniti di tutti i <p> all'interno del form CF7 */
.wpcf7-form p {
    margin: 0;
    padding: 0;
}

.wpcf7-response-output {
    margin: 20px 0 0 0;
    padding: 15px;
    border: none;
    border-radius: 0;
    background: rgba(255,255,255,0.1);
    color: white;
}

/* Stili per messaggi di errore */
.wpcf7-not-valid-tip {
    color: #ffcdd2;
    font-size: 0.9rem;
    margin-top: 5px;
}

.wpcf7-form-control.wpcf7-not-valid {
    border: 2px solid #f44336;
}

/* Stili per il caricamento */
.wpcf7-spinner {
    margin: 0 10px;
}

.wpcf7-form.submitting .submit-btn {
    opacity: 0.7;
    cursor: not-allowed;
}

/** Transparente header **/
header.site-header {
    min-height: 87px;
    margin-bottom: -87px;
    z-index: 999999;
    position: relative;
}

header nav {
  color: #F2F2F3;
}

/** Copertina iniziale delle pagine **/
/* Stili per schermi Desktop (default) */
.main-cover-block {
    min-height: 450px;
}

.main-cover-block.home {
    min-height: 900px;
}

/* Stili per Tablet (esempio: max-width 1024px) */
@media (max-width: 1024px) {
    .main-cover-block {
        min-height: 70vh;
    }
}

/* Stili per Mobile (esempio: max-width 768px) */
@media (max-width: 768px) {
    .main-cover-block {
        min-height: 60vh;
    }
    .main-cover-block h1 {
        font-size: 2rem;
    }
}



/*** Stili HOME PAGE ***/
.repertorio-home>.col1 * {
  width: 80%;
}

/* Stili per Mobile (esempio: max-width 768px) */
@media (max-width: 768px) {
    .citazione-home {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    .citazione-home h2 {
        font-size: 1.6rem;
        text-align: left;
    }

    .biografia-home *, 
    .repertorio-home>.col1 *,
    .contattami-section * {
        width: 100%;
    }  

    .repertorio-home>.col1 h2 {
      text-align: center;
    }

    /* Inverti l'ordine delle colonne su mobile */
    .repertorio-home {
        display: flex !important;
        flex-direction: column-reverse !important;
    }
    .repertorio-home > .wp-block-column {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        padding-bottom: 2rem !important;
    }

    .colonna-carosello-home {
        padding-left: 1rem !important;
    }
}

.altri-home-cols>div:hover {
    transform: translateY(-10px);
}

.altri-home-cols>div img {
    width: 100%;
    height: 100%;
    object-fit: cover !important; /* Sempre cover per riempire il container */
    filter: grayscale(100%) !important; /* Forzato con !important */
    transition: filter 0.3s ease !important;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    pointer-events: none; /* Previene conflitti con il drag */
}

/* Hover effect con maggiore specificità */
.altri-home-cols>div:hover img,
.altri-home-cols>div img:hover {
    filter: grayscale(0%) !important;
}

/* Stili usati nella pagina repertorio */
.sticky-image {
    position: sticky !important;
    top: 60px;
    max-height: calc(100vh - 40px);
    object-fit: cover;
}
.repertorio-menu {
    position: sticky !important;
    top:0px;
    z-index:99999;
}
.repertorio-menu a {
    text-decoration: none;
}
.repertorio-menu a:hover {
    text-decoration: none !important;
    border-bottom: 1px solid #8278b7;
    transition: none;
}

/* Correzione Definitiva per Altezza e Proporzioni */

/* Forziamo un'altezza usando il metodo padding-bottom per il rapporto 1:1 */
.sbi_photo_wrap a.sbi_photo {
    padding-bottom: 100% !important; 
    height: 0 !important; 
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

/* Assicuriamo che l'immagine riempia lo spazio generato dal padding */
.sbi_photo_wrap a.sbi_photo img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}