/*
 Theme Name: FarmaciaMoretto - Divi child
 Theme URI: https://www.elegantthemes.com/gallery/divi/
 Description: Divi Child Theme
 Author: Elegant Themes
 Author URI: https://www.elegantthemes.com
 Template: Divi
 Version: 1.0.0
*/
 
/* =Theme customization starts here
------------------------------------------------------- */

/* --- HAMBURGER --- */
.oc-hamburger {
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 99;
}
.oc-hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #007C00;
    transition: 0.3s ease-in-out;
}

/* --- PANEL & OVERLAY --- */
.oc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.4s ease;
    z-index: 9998;
}
.oc-panel {
    position: fixed;
    top: 0;
    right: -320px; /* Nascosto a destra */
    width: 100%;
    max-width: 320px;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    transition: 0.4s cubic-bezier(0.77,0.2,0.05,1.0);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.05);
}

.oc-panel.is-active {
    right: 0;
}
.oc-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* --- HEADER --- */
.oc-header {
    padding: 30px;
    display: flex;
    justify-content: flex-end;
}
.oc-close {
    background: none;
    border: none;
    color: #000000;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: pointer;
    font-weight: bold;
}

/* --- MENU CONTENT --- */
.oc-content {
    padding: 0 40px;
    flex-grow: 1;
    overflow-y: auto;
}
.oc-nav ul {
    list-style: none;
    padding: 0;
    margin: 40px 0;
}
.oc-nav ul li {
    margin-bottom: 20px;
}
.oc-nav ul li a {
    color: #000000;
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
    transition: opacity 0.3s;
}
.oc-nav ul li a:hover {
    opacity: 0.6;
}

/* --- SOCIALS --- */
.oc-socials {
    margin-top: 30px;
}
.oc-socials a {
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    margin-right: 20px;
    text-transform: uppercase;
    font-weight: bold;
}

/* --- FOOTER LEGAL (FIXED BOTTOM) --- */
.oc-footer {
    padding: 30px 40px;
    border-top: 1px solid #f0f0f0;
}
.oc-legal a {
    color: #999999;
    text-decoration: none;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
}
.oc-legal a:hover {
    color: #000000;
}

/* Responsive adjustment */
@media (max-width: 320px) {
    .oc-panel {
        width: 100%;
    }
}


/* --- PANEL AGGIORNATO (EFFETTO FOGLIO CHE SI SFILA) --- */
.oc-panel {
    position: fixed;
    top: 0;
    right: 0; 
    width: 100%;
    max-width: 320px;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    
    /* Stato iniziale: completamente fuori dallo schermo a destra */
    transform: translateX(100%); 
    
    /* Transizione pulita: lo "sfilamento" deve essere fluido */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); 
    
    /* Ombra che dà profondità al foglio mentre entra */
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

/* Stato Attivo: il foglio si sfila verso l'interno */
.oc-panel.is-active {
    transform: translateX(0);
}

/* Overlay: deve solo scurire il fondo senza muoversi */
.oc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    z-index: 9998;
}

.oc-overlay.is-active {
    opacity: 1;
    visibility: visible;
}