/*
Theme Name: Blue Apulia Child
Theme URI: https://www.blueapulia.com/
Description: Tema child per Blue Apulia, struttura modulare.
Author: Blue Apulia
Author URI: https://www.blueapulia.com/
Template: astra
Version: 1.0.4
Text Domain: blueapulia-child
*/

/* IMPORTA GLI STILI - FIX IMMEDIATO */
@import url('./assets/css/main.css');

/* ========================================
   ICONE SVG GLOBALI
   ======================================== */

/* Icona checkmark verde per validazione */
.ba-icon-check {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.ba-icon-check svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Icona errore rosso per validazione */
.ba-icon-error {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.ba-icon-error svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Icona warning giallo per validazione */
.ba-icon-warning {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.ba-icon-warning svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Icona cross rosso per validazione */
.ba-icon-cross {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.ba-icon-cross svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Icona X per eliminare foto */
.ba-icon-remove {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' width='32' height='32' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Ccircle cx='256' cy='256' r='256' fill='%23ffffff'/%3E%3Cpath d='M176 176 L336 336 M336 176 L176 336' fill='none' stroke='%23c9302c' stroke-width='40' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent !important;
}

/* Override specifico per pulsanti di rimozione foto */
button.ba-icon-remove,
.remove-photo.ba-icon-remove,
button.remove-photo.ba-icon-remove {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 99px% !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' width='32' height='32' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Ccircle cx='256' cy='256' r='256' fill='%23ffffff'/%3E%3Cpath d='M176 176 L336 336 M336 176 L176 336' fill='none' stroke='%23c9302c' stroke-width='40' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Icona + verde per aggiungere elementi */
.ba-icon-add {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' width='32' height='32' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Ccircle cx='256' cy='256' r='256' fill='%2361b022'/%3E%3Crect x='236' y='156' width='40' height='200' rx='12' fill='white'/%3E%3Crect x='156' y='236' width='200' height='40' rx='12' fill='white'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Icona - grigio per rimuovere elementi */
.ba-icon-subtract {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' width='32' height='32' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Ccircle cx='256' cy='256' r='256' fill='%23555555'/%3E%3Crect x='156' y='236' width='200' height='40' rx='12' fill='white'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ========================================================================
   HEADER STYLES
   NOTE: Public header (.ba-header) styles are now fully managed in
   header.php inline <style>. Only keep parent-theme overrides here.
   ======================================================================== */

/* BUTTON CTA (used outside header too) */
.header-cta-button,
.btn-header-cta {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 10px 19px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 27px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(0,123,255,0.3);
    white-space: nowrap;
}

.header-cta-button:hover,
.btn-header-cta:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,123,255,0.4);
    color: white;
}

.logo-with-text .custom-logo-link {
    display: inline-block;
    margin: 0;
}

.logo-with-text .brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.logo-with-text .site-name {
    display: block;
    font-size: 24px; /* Aumentato del 35% */
    font-weight: 200;
    color: #007bff;
    margin: 0;
    text-decoration: none;
    letter-spacing: 1.6px;
}

.logo-with-text .site-tagline {
    display: block;
    font-size: 15px; /* Aumentato del 35% */
    color: #6c757d;
    font-style: italic;
    margin: 0;
    opacity: 0.85;
}

/* BRAND SOLO TESTO */
.text-only-brand .site-name {
    font-size: 21px; /* Aumentato del 35% */
    font-weight: 700;
    color: #007bff;
    margin: 0;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.text-only-brand .site-tagline {
    font-size: 12px; /* Aumentato del 35% */
    color: #6c757d;
    font-style: italic;
    margin: 0;
    opacity: 0.85;
}

/* MOBILE: riduci logo per evitare overflow */
@media (max-width: 480px) {
    .logo-with-text .custom-logo,
    .custom-logo img {
        height: 35px; /* Leggermente ridotto su mobile piccolo */
        max-height: 35px;
    }
    
    .logo-with-text .site-name,
    .text-only-brand .site-name {
        font-size: 20px !important;
        font-weight: 400 !important;
    }
    
    .logo-with-text .site-tagline,
    .text-only-brand .site-tagline {
        font-size: 13px !important;
    }
    
    .main-navigation .main-menu a {
        font-size: 14px;
        padding: 6px 10px;
    }
}

/* EXTRA SMALL MOBILE */
@media (max-width: 360px) {
    .site-branding {
        gap: 0.5rem;
    }
    
    .logo-with-text .custom-logo,
    .custom-logo img {
        height: 32px;
        max-height: 32px;
    }
    
    .logo-with-text .site-name,
    .text-only-brand .site-name {
        font-size: 16px;
    }
    
    .logo-with-text .site-tagline,
    .text-only-brand .site-tagline {
        display: block;
    }
    
    .text-only-brand .site-name {
        font-size: 1.1rem;
    }
    
    .text-only-brand .site-tagline {
        font-size: 0.65rem;
    }
}

/* BODY MARGIN - HEADER NON STICKY */
body {
    margin-top: 0;
    padding-top: 0;
}

body.admin-bar {
    margin-top: 0px !important; /* Solo admin bar */
}

@media screen and (max-width: 782px) {
    body {
        margin-top: 0;
    }
    
    body.admin-bar {
        margin-top: 46px; /* Solo admin bar mobile */
    }
}

/* ELIMINA CONFLITTI */
.site-header::before,
.site-header::after,
.ba-header::before,
.ba-header::after {
    display: none;
    content: none;
}

/* PREVIENI LAYOUT SHIFTS */
.ba-header,
.site-header {
    will-change: transform;
    contain: layout style;
}

.header-wrapper,
.site-nav {
    contain: layout;
    overflow: hidden;
}

/* ========================================================================
   RESTO DEGLI STILI ORIGINALI
   ======================================================================== */

/* FALLBACK PER GALLERY SE SWIPER NON CARICA */
.gallery-slider {
    display: block;
    overflow: visible;
}

.gallery-slide {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}

.gallery-slide img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ASSICURA CHE IL LAYOUT BASE FUNZIONI */
.single-alloggio {
    background: #fff;
    padding: 0;
    margin: 0;
}

.single-alloggio .entry-title {
    color: #007bff;
    font-size: 2.2em;
    margin-bottom: 16px;
}

.alloggio-meta {
    list-style: none;
    padding: 0;
    /* margin: 24px 0; */
}

.alloggio-meta li {
    margin-bottom: 8px;
    font-weight: 500;
}

/* MOBILE RESPONSIVE IMMEDIATO */
@media (max-width: 768px) {
    .single-alloggio {
        padding: 0px;
        margin: 0px;
    }
    
    .single-alloggio .entry-title {
        font-size: 1.8em;
    }
}