/**
 * HEADER STYLE - La Banchina (STRUTTURA CORRETTA)
 * Default: TRASPARENTE con testo bianco
 * Scrolled: NAVY solido
 * Layout: 2 righe (top bar + menu)
 */

/* ===== VARIABILI ===== */
/* ===== VARIABILI COLORI - PALETTE MARE & SABBIA ===== */
:root {
    /* Palette principale */
    --cream-sand: #F5F3EE;      /* Beige sabbia (background generale) */
    --navy-deep: #1E4D6F;       /* Blu navy profondo (header, bottoni) */
    --ocean-blue: #4A90A4;      /* Azzurro oceano (accenti, hover) */
    --text-dark: #2C3E50;       /* Testo scuro principale */
    --white: #FFFFFF;           /* Bianco puro */
    --light-gray: #E8E6E1;      /* Grigio chiaro (bordi, separatori) */
    
    /* Alias per compatibilità */
    --navy: var(--navy-deep);
    --ocean: var(--ocean-blue);
    --cream: var(--cream-sand);
    
    /* Transizioni */
    --header-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/**
 * MOBILE CTA FISSO IN BASSO - La Banchina
 */

/* ============ MODIFICHE MOBILE PER CTA ============ */

@media (max-width: 768px) {
    /* Nascondi CTA dall'header su mobile */
    .header-right .cta-button.desktop-only {
        display: none !important;
    }
}

/* ============ CTA BUTTON MOBILE FISSO IN BASSO ============ */

@media (max-width: 768px) {
    /* Container per CTA fisso in basso */
    .mobile-cta-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #1e5a7d;
    padding: 0 !important;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.15);
    border-radius: 0;
    transform: translateY(0);
    transition: transform 0.3s ease;
    height: 50px !important;
    max-height: 50px !important;
    min-height: unset !important;
    overflow: hidden !important;
}

.mobile-cta-footer .mobile-cta-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px !important;
    background: #1e5a7d;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 0;
    font-weight: 600;
    font-size: 14px !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 50px !important;
    min-height: unset !important;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}


    
    /* Nasconde CTA quando menu è aperto */
    .menu-open-body .mobile-cta-footer {
        transform: translateY(100%);
    }
    
    
    /* Effetto hover/active per mobile */
    .mobile-cta-footer .mobile-cta-button:active,
    .mobile-cta-footer .mobile-cta-button:hover {
        background: #164561; /* Blu più scuro */
        color: white;
        text-decoration: none;
        transform: none;
    }
    
    /* Effetto press per touch */
    .touch-device .mobile-cta-footer .mobile-cta-button:active {
        background: #164561;
        transform: scale(0.98);
    }
    
    /* Testo CTA mobile */
    .mobile-cta-footer .mobile-cta-text {
        margin-right: 10px;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.8px;
        line-height: 1.2;
    }
    
    /* Freccia CTA mobile */
    .mobile-cta-footer .mobile-cta-arrow {
        transition: transform 0.3s ease;
        margin-left: 8px;
    }
    
    .mobile-cta-footer .mobile-cta-button:hover .mobile-cta-arrow,
    .mobile-cta-footer .mobile-cta-button:active .mobile-cta-arrow {
        transform: translateX(5px);
    }
    
    /* Aggiusta padding body per CTA fisso */
    body.has-mobile-cta {
        padding-bottom: 50px !important;
    }
    
    /* Footer aggiustamento se presente */
    body.has-mobile-cta footer,
    body.has-mobile-cta .site-footer,
    body.has-mobile-cta #footer {
        margin-bottom: 60px !important;
    }
}

/* ============ RESPONSIVE FINE-TUNING ============ */

@media (max-width: 480px) {
    /* Mobile molto piccolo */
    .mobile-cta-footer .mobile-cta-button {
        padding: 12px 20px;
        min-height: 55px;
    }
    
    .mobile-cta-footer .mobile-cta-text {
        font-size: 12px;
        letter-spacing: 0.6px;
    }
    
    body.has-mobile-cta {
        padding-bottom: 45px !important;
    }
    
    body.has-mobile-cta footer,
    body.has-mobile-cta .site-footer,
    body.has-mobile-cta #footer {
        margin-bottom: 55px !important;
    }
}

/* ============ LANDSCAPE MOBILE ============ */

@media (max-height: 500px) and (orientation: landscape) {
    /* In landscape, CTA più compatto */
    .mobile-cta-footer .mobile-cta-button {
        padding: 12px 20px;
        min-height: 45px;
    }
    
    .mobile-cta-footer .mobile-cta-text {
        font-size: 11px;
    }
    
    body.has-mobile-cta {
        padding-bottom: 45px !important;
    }
    
    body.has-mobile-cta footer,
    body.has-mobile-cta .site-footer,
    body.has-mobile-cta #footer {
        margin-bottom: 45px !important;
    }
}

/* ============ ANIMAZIONE ENTRATA ============ */

@media (max-width: 768px) {
    /* Stato iniziale nascosto */
    .mobile-cta-footer {
        transform: translateY(100%);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Stato visibile */
    .mobile-cta-footer.mobile-cta-visible {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============ ICONA WHATSAPP NEL CTA MOBILE ============ */

@media (max-width: 768px) {
    /* Icona WhatsApp */
    .mobile-cta-footer .mobile-cta-whatsapp {
        width: 20px;
        height: 20px;
        margin-right: 8px;
        flex-shrink: 0;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    }
    
    /* Layout flex per allineamento */
    .mobile-cta-footer .mobile-cta-button {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0; /* Rimuovi gap predefinito */
    }
    
    /* Testo con margine corretto */
    .mobile-cta-footer .mobile-cta-text {
        margin-right: 8px;
        margin-left: 0;
    }
    
    /* Freccia allineata */
    .mobile-cta-footer .mobile-cta-arrow {
        margin-left: 0;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    /* Icona leggermente più piccola su mobile piccolo */
    .mobile-cta-footer .mobile-cta-whatsapp {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }
    
    .mobile-cta-footer .mobile-cta-text {
        margin-right: 6px;
    }
}

/* ============ ANIMAZIONE ICONA (OPZIONALE) ============ */

@media (max-width: 768px) {
    /* Animazione pulse per icona WhatsApp */
    .mobile-cta-footer .mobile-cta-whatsapp {
        animation: whatsappPulse 2s ease-in-out infinite;
    }
    
    @keyframes whatsappPulse {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.1);
        }
    }
    
    /* Rimuovi animazione quando utente interagisce */
    .mobile-cta-button:active .mobile-cta-whatsapp,
    .mobile-cta-button:hover .mobile-cta-whatsapp {
        animation: none;
    }
}

/* ============ ACCESSIBILITÀ ============ */

@media (max-width: 768px) {
    /* Focus states per CTA mobile */
    .mobile-cta-footer .mobile-cta-button:focus {
        outline: 3px solid rgba(255, 255, 255, 0.8);
        outline-offset: -3px;
    }
}

/* ============ SAFE AREA E NOTCH SUPPORT ============ */

@media (max-width: 768px) {
    /* iPhone X e successivi */
    .mobile-cta-footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .mobile-cta-footer .mobile-cta-button {
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
        min-height: calc(20px + env(safe-area-inset-bottom));
    }
    
    /* Aggiusta body padding per safe area */
    body.has-mobile-cta {
        padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 480px) {
    body.has-mobile-cta {
        padding-bottom: calc(55px + env(safe-area-inset-bottom)) !important;
    }
}

/* ============ RIPPLE EFFECT AL CLICK ============ */

@media (max-width: 768px) {
    .mobile-cta-button {
        position: relative;
        overflow: hidden;
    }
    
    .mobile-cta-button::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
        pointer-events: none;
    }
    
    .mobile-cta-button:active::after {
        width: 300px;
        height: 300px;
    }
}

/* ===== RESET OCEANWP ===== */
#site-header,
.oceanwp-header,
#site-header-inner {
    display: none !important;
}

body {
    padding-top: 0 !important;
}

/* ===== MAIN HEADER ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    
    /* DEFAULT: TRASPARENTE */
    background: transparent;
    backdrop-filter: none;
    
    transition: var(--header-transition);
    padding: 20px 0;
}

/* Header quando scrolled: NAVY SOLIDO */
.main-header.scrolled {
    background: var(--navy);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
}

/* ===== CONTAINER ===== */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ===== RIGA 1: TOP BAR ===== */
.header-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 15px;
}

.main-header.scrolled .header-top-bar {
    margin-bottom: 10px;
}

/* ===== LEFT: CONTACT ICONS ===== */
.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.contact-icons {
    display: flex;
    gap: 12px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--header-transition);
}

.contact-icon:hover {
    background: var(--ocean-blue);       /* ← AZZURRO OCEANO */
    border-color: var(--ocean-blue);
    transform: translateY(-2px);
}

.main-header.scrolled .contact-icon {
    border-color: rgba(255, 255, 255, 0.4);
}

/* ===== CENTER: LOGO ===== */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo-link {
    text-decoration: none;
    display: block;
    text-align: center;
    transition: var(--header-transition);
}

.logo-text h1 {
   font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 2px;
    margin: 0;
    color: white;
    line-height: 1;
    transition: var(--header-transition);
}

/* ===== LOGO PNG (NO FILTRI) ===== */

.header-logo-img {
    display: block;
    height: 80px;              /* Altezza logo trasparente */
    width: auto;
    max-width: 280px;          /* Larghezza massima */
    transition: var(--header-transition);
    /* NO FILTRI - usa PNG già bianco */
}

/* Logo quando header scrolled (più piccolo) */
.main-header.scrolled .header-logo-img {
    height: 60px;              /* Ridotto quando si scrolla */
    max-width: 220px;
}

/* Ombra per leggibilità su sfondo trasparente */
.main-header:not(.scrolled) .header-logo-img {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* Rimuovi ombra su sfondo navy */
.main-header.scrolled .header-logo-img {
    filter: none;
}

/* Hover logo (leggero zoom) */
.logo-link:hover .header-logo-img {
    transform: scale(1.05);
}

/* Responsive Tablet */
@media (max-width: 1024px) {
    .header-logo-img {
        height: 65px;
        max-width: 240px;
    }
    
    .main-header.scrolled .header-logo-img {
        height: 55px;
        max-width: 200px;
    }
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .header-logo-img {
        height: 55px;
        max-width: 200px;
    }
    
    .main-header.scrolled .header-logo-img {
        height: 45px;
        max-width: 170px;
    }
    
    /* Ombra più leggera su mobile */
    .main-header:not(.scrolled) .header-logo-img {
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
    }
}

/* Mobile piccolo */
@media (max-width: 480px) {
    .header-logo-img {
        height: 50px;
        max-width: 180px;
    }
    
    .main-header.scrolled .header-logo-img {
        height: 50px;
        max-width: 150px;
    }
}

.main-header.scrolled .logo-text h1 {
    font-size: 26px;
}

.logo-subtitle {
    display: block;
    font-size: 11px;
    letter-spacing: 4px;
    color: white;
    opacity: 0.9;
    margin-top: 2px;
    font-weight: 300;
}

.logo-link:hover {
    transform: scale(1.02);
}

/* ===== RIGHT: CTA + HAMBURGER ===== */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* CTA Button */
/* CTA Button - BLU NAVY invece di oro */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: #EAE2D8;;    /* ← BLU NAVY */
    color: hsl(210 29% 15%);
    text-decoration: none;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: var(--header-transition);
    box-shadow: 0 4px 15px rgba(30, 77, 111, 0.2);  /* ← Ombra blu */
}

.cta-button:hover {
    background: #c5b6a0;    /* ← AZZURRO HOVER */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 164, 0.3);  /* ← Ombra azzurra */
    color: hsl(210 29% 15%);
}

.main-header.scrolled .cta-button {
    padding: 10px 24px;
}

.cta-arrow {
    transition: transform 0.3s ease;
}

.cta-button:hover .cta-arrow {
    transform: translateX(3px);
}

/* ===== RIGA 2: MENU ORIZZONTALE ===== */
.header-nav-horizontal {
    display: flex;
    justify-content: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.main-header.scrolled .header-nav-horizontal {
    padding-top: 8px;
    border-top-color: rgba(255, 255, 255, 0.2);
}

.horizontal-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
}

.horizontal-menu li {
    position: relative;
}

.horizontal-menu a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding: 8px 0;
    display: block;
    position: relative;
    transition: var(--header-transition);
}

.horizontal-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--ocean-blue);    /* ← AZZURRO OCEANO */
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.horizontal-menu a:hover {
    color: var(--ocean-blue);    /* ← AZZURRO HOVER */
}

.horizontal-menu a:hover::after,
.horizontal-menu a.active::after {
    width: 100%;
}

.horizontal-menu a:hover {
    color: var(--champagne);
}

/* ===== RESPONSIVE UTILITIES ===== */
.desktop-only {
    display: flex !important;
}

.mobile-only {
    display: none !important;
}

/* ===== MOBILE HAMBURGER ===== */
.mobile-menu-toggle {
    width: 45px;
    height: 45px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    transition: var(--header-transition);
}

.mobile-menu-toggle:hover {
    background: var(--ocean-blue);      /* ← AZZURRO */
    border-color: var(--ocean-blue);
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: white;
    transition: var(--header-transition);
}

/* ===== MOBILE OVERLAY MENU ===== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--navy);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
}

/* Mobile Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-logo-text {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 24px;
    color: white;
    letter-spacing: 2px;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    transition: var(--header-transition);
}

.mobile-menu-close:hover {
    color: var(--ocean-blue);       /* ← AZZURRO */
    transform: rotate(90deg);
}

/* Mobile Nav */
.mobile-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.mobile-menu li {
    margin: 20px 0;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 1px;
    transition: var(--header-transition);
    display: inline-block;
}

/* Mobile menu link hover */
.mobile-menu a:hover {
    color: var(--ocean-blue);       /* ← AZZURRO */
    transform: translateX(10px);
}

/* Mobile Footer */
.mobile-menu-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mobile-contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-size: 15px;
    transition: var(--header-transition);
}

/* Mobile contact hover */
.mobile-contact-link:hover {
    color: var(--ocean-blue);       /* ← AZZURRO */
}

/* Mobile CTA button */
.mobile-cta-button {
    display: block;
    width: 100%;
    padding: 16px;
    background: #EAE2D8;   /* ← BLU NAVY */
    color: hsl(210 29% 15%);
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: var(--header-transition);
}

.mobile-cta-button:hover {
    background: #C5B6A0;  /* ← AZZURRO HOVER */
    color: hsl(210 29% 15%);
}

/* ===== BODY SCROLL LOCK ===== */
body.mobile-menu-open {
    overflow: hidden;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet */
@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: flex !important;
    }
    
    .header-top-bar {
        margin-bottom: 0;
    }
    
    .horizontal-menu {
        gap: 25px;
    }
    
    .horizontal-menu a {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }
    
    .main-header {
        padding: 15px 0;
    }
    
    .main-header.scrolled {
        padding: 10px 0;
    }
    
    .logo-text h1 {
        font-size: 24px;
    }
    
    .main-header.scrolled .logo-text h1 {
        font-size: 20px;
    }
    
    .logo-subtitle {
        font-size: 9px;
        letter-spacing: 3px;
    }
    
    .contact-icons {
        gap: 8px;
    }
    
    .contact-icon {
        width: 36px;
        height: 36px;
    }
    
    .mobile-menu a {
        font-size: 24px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }
    
    .logo-text h1 {
        font-size: 20px;
        letter-spacing: 1px;
    }
    
    .main-header.scrolled .logo-text h1 {
        font-size: 18px;
    }
    
    .logo-subtitle {
        font-size: 8px;
        letter-spacing: 2px;
    }
    
    .contact-icon {
        width: 32px;
        height: 32px;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }
    
    .hamburger-line {
        width: 20px;
    }
}

/* ===== ACCESSIBILITY ===== */
/* Focus states - AZZURRO OCEANO */
.contact-icon:focus,
.cta-button:focus,
.mobile-menu-toggle:focus,
.horizontal-menu a:focus,
.mobile-menu a:focus {
    outline: 2px solid var(--ocean-blue);   /* ← AZZURRO */
    outline-offset: 2px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.main-header {
    animation: fadeIn 0.5s ease;
}

/* ===== PRINT STYLES ===== */
@media print {
    .main-header {
        position: static;
        background: white !important;
        color: black !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
}
