/* == VARIABILI E IMPOSTAZIONI DI BASE == */
:root {
    --fonetica-pink: #de6894;
	--fonetica-berry: #bc7c97;
    --fonetica-gray: #989098;
    --bg-light: #f3eaef;
    --text-dark: #484748;
    --white: #ffffff;
    --header-height-mobile: 60px;
    --header-height-desktop: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    text-transform: lowercase;
    overflow-x: hidden;
	text-align: center;
}

h1, h2, h3 {
    color: var(--fonetica-gray);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

/* == CHECKBOX HACK (SOLO CSS) == */
.menu-checkbox {
    display: none;
}

/* == HEADER FISSO & ELEMENTI INTERNI == */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height-mobile);
    padding: 0 15px;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 105;
}

.profile-link {
    display: flex;
    align-items: center;
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--fonetica-gray);
}

.header-status-container {
    position: relative;
    display: inline-block;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--fonetica-gray);
    background-color: var(--bg-light);
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-status.open .status-dot {
    background-color: var(--fonetica-pink);
    box-shadow: 0 0 6px rgba(212, 106, 146, 0.4); /* Sfumatura rosa coordinata */
}

.header-status.closed .status-dot {
    background-color: var(--fonetica-gray);
    box-shadow: none; /* Nessuna ombra quando è chiuso */
}

/* Infobox orari (in hover) */
.hours-infobox {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--white);
    color: var(--text-dark);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
    width: 200px;
    font-size: 0.85rem;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 120;
    border: 1px solid #eee;
}

.header-status-container:hover .hours-infobox {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.infobox-title {
    font-weight: bold;
    color: var(--fonetica-pink);
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 4px;
}

.infobox-closed {
    color: var(--fonetica-berry);
    margin-top: 6px;
    font-weight: 500;
}

/* Sezione destra (Lingua + Menu) */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-switcher {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fonetica-gray);
    display: flex;
    gap: 4px;
    align-items: center;
}

.lang-switcher a {
    color: var(--fonetica-gray);
    transition: color 0.3s;
}

.lang-switcher a.active, 
.lang-switcher a:hover {
    color: var(--fonetica-pink);
}

.menu-toggle {
    cursor: pointer;
    width: 32px;
    height: 26px;
    position: relative;
    z-index: 110;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: var(--fonetica-gray);
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}

.menu-toggle span:nth-child(1) { top: 0px; }
.menu-toggle span:nth-child(2) { top: 11.5px; }
.menu-toggle span:nth-child(3) { top: 23px; }

.menu-checkbox:checked ~ header .menu-toggle span:nth-child(1) {
    top: 11.5px;
    transform: rotate(45deg);
    background-color: var(--fonetica-berry);
}

.menu-checkbox:checked ~ header .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.menu-checkbox:checked ~ header .menu-toggle span:nth-child(3) {
    top: 11.5px;
    transform: rotate(-45deg);
    background-color: var(--fonetica-berry);
}

.menu-toggle:hover span { background-color: var(--fonetica-pink); }

/* == BARRA LATERALE (SIDEBAR) E OVERLAY == */
.sidebar {
    position: fixed;
    top: var(--header-height-mobile);
    right: -300px;
    width: 300px;
    height: calc(100vh - var(--header-height-mobile));
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 10px 15px;
    transition: right 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
}

.menu-checkbox:checked ~ .sidebar {
    right: 0; 
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar a:not(.action-btn) {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fonetica-gray);
    border-bottom: 1px solid #f2f2f2;
    padding: 5px 0;
    transition: color 0.3s;
    display: block;
}

.sidebar a:not(.action-btn):hover {
    color: var(--fonetica-pink);
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-bottom: 5px;
    flex-shrink: 0;
}

.action-btn {
    font-size: 0.85rem !important;
    padding: 6px 10px;
    border-radius: 6px;
    background-color: var(--bg-light);
    color: var(--text-dark) !important;
    border-bottom: none !important;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    display: block;
}

.action-btn:hover {
    background-color: var(--fonetica-pink);
    color: var(--white) !important;
}

.overlay {
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height-mobile));
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.menu-checkbox:checked ~ .overlay {
    opacity: 1;
    visibility: visible;
}

/* == CONTENUTO PRINCIPALE == */
main {
    padding: var(--header-height-mobile) 20px calc(var(--header-height-mobile)/1.5);
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    position: relative;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.hero-actions .btn {
    width: 100%;
}

.back-arrow {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    color: var(--fonetica-berry);
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.back-arrow:hover {
    background-color: var(--fonetica-berry);
    color: var(--white);
}

.hero-img-container {
    margin: 0 auto;
    width: 100%;
    max-width: 800px; 
    padding: 0;
    background: linear-gradient(
        to right, 
        var(--bg-light) 0%, 
        #ffffff 25%, 
        #ffffff 75%, 
        var(--bg-light) 100%
    );
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    max-width: 450px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.hero h1 {
	color: var(--fonetica-berry);
	margin-top: 20px;
}

.hero h2 {
	color: var(--fonetica-berry);
}

.hero h3 {
	margin: 20px 0;
}

.hero p {
    font-size: 1.1rem;
    color: var(--fonetica-gray);
    margin: 20px 0;
    font-weight: 500;
}

.btn {
    display: inline-block;
    background-color: var(--fonetica-berry);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
	width: 100%;
}

.btn:hover {
    background-color: var(--fonetica-pink);
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
	margin: 30px 0;
}

.service-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    align-items: stretch;
    text-align: center;
    border-top: 4px solid var(--fonetica-berry);
    transition: transform 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-hero-bg {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.card-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.card-hero-bg h1 {
    position: relative;
    z-index: 2;
    color: #ffffff !important;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    text-align: left;
    width: 100%;
}

.card-body-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.card-body-content p {
    flex-grow: 1;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #555;
}

.offer-price {
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 0 15px;
    color: var(--fonetica-pink);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--fonetica-pink);
}

.service-card h2 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
	flex-grow: 1;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #555;
}

.btn.service-btn {
    background-color: transparent;
    border: 2px solid var(--fonetica-gray);
    color: var(--fonetica-gray);
}

.btn.service-btn:hover {
    background-color: var(--fonetica-pink);
    border-color: var(--fonetica-pink);
    color: var(--white);
}

.service-card .service-btn {
    margin-top: auto;
	width: auto;
	align-self: center;
}

.back-to {
	margin-top: 20px;
    width: 100%;
    text-align: center;
	justify-content: center;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: var(--fonetica-gray);
    color: var(--white);
}

footer p { margin-bottom: 10px; }

/* == PAGINA TELEFONIA == */
.logo-container {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.operator-logo {
	width: 80px;
    height: auto;
}

.filter-container {
    text-align: center;
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    width: 40px; height: 20px;
    background-color: var(--fonetica-gray);
    border-radius: 20px;
    position: relative;
    transition: 0.3s;
}

.slider:before {
    content: "";
    position: absolute; width: 16px; height: 16px;
    left: 2px; bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .slider { background-color: var(--fonetica-pink); }
input:checked + .slider:before { transform: translateX(20px); }

.services-grid .service-card .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    margin-bottom: 15px;
}

.services-grid .service-card .logo-container img,
.services-grid .service-card .operator-logo {
    max-width: 130px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Logica di filtro */
.services-grid.show-business .service-card:not(.business) {
    display: none !important;
}

/* == PAGINA OPERATOR == */
.operator-logo-hero {
    height: 120px;
    width: 120px;
	object-fit: contain;
    margin-bottom: 20px;
}

/* == PAGINA DI AVVISO / MODULO == */
.notice-main {
    max-width: 600px;
    margin: 0 auto;
}

.notice-hero {
    margin-bottom: 30px;
}

.privacy-box h1,
.privacy-box h2 {
    color: var(--fonetica-pink);
    margin-top: 1rem;
}

.notice-hero h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-top: 4px solid var(--fonetica-pink);
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.contact-form button[type="submit"] {
    width: 100%;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.back-to .btn {
    width: 100%;
}

.contact-methods-section {
	margin-top: 40px;
	text-align: center;
}

.contact-methods-section h2 {
	margin-bottom: 12px;
}

.contact-methods-section a.btn {
	width: 100%;
	margin-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fonetica-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: var(--bg-light);
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--fonetica-pink);
}

.form-group textarea {
    resize: vertical;
}

.iti {
    width: 100%;
}

.iti input, 
.iti input[type="tel"] {
    width: 100% !important;
}

.input-error {
    border: 2px solid var(--fonetica-berry, #C2185B) !important;
    outline: none !important;
}

.site-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a1acc;
    color: var(--bg-light);
    padding: 1rem;
    display: none;
    z-index: 9999;
}

.site-notice p {
	margin-bottom: 12px;
}

/* == VERSIONE PC / DESKTOP (MEDIA QUERIES) == */
@media (min-width: 768px) {
    header { 
        height: var(--header-height-desktop);
        padding: 0 40px; 
    }

    .profile-img {
        width: 48px;
        height: 48px;
    }
    
    .header-status {
        font-size: 0.95rem;
        padding: 6px 14px;
    }

    .header-right {
        gap: 25px;
    }

    .lang-switcher {
        font-size: 1rem;
        gap: 6px;
    }
    
    .sidebar {
        top: var(--header-height-desktop);
        height: calc(100vh - var(--header-height-desktop));
        padding: 30px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .sidebar-links {
        gap: 15px;
    }

    .sidebar a:not(.action-btn) {
        padding-bottom: 10px;
        font-size: 1.1rem;
    }

    .sidebar-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        border-top: 1px solid #eee;
        padding-top: 15px;
    }

    .overlay {
        top: var(--header-height-desktop);
        height: calc(100vh - var(--header-height-desktop));
    }

    main {
		padding: var(--header-height-desktop) 20px calc(var(--header-height-desktop)/1.5);
    }

    .hero p { font-size: 1.3rem; max-width: 600px; margin: 30px auto; }
    
    .services-grid { grid-template-columns: repeat(3, 1fr); }
	
	.btn { width: calc(33.333% - 20px); }

    .hero-actions {
        flex-direction: row;
        max-width: none;
        justify-content: center;
		gap: 20px;
    }

    .hero-actions .btn {
        width: auto;
        flex: 1;
    }

    .form-row {
        flex-direction: row;
    }

    .contact-form button[type="submit"],
    .back-to .btn {
        width: 100%;
    }

}