/* ============================================================
   PROFIM s.r.l. — Stili comuni a tutte le pagine
   Palette allineata al brand social: navy + arancione
   ============================================================ */

:root {
    --primary-color: #1D3557;
    --accent-color: #F07830;
    --accent-hover: #d96420;
    --light-bg: #F5F5F5;
    --text-color: #404040;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* ============================================================
   HEADER
   ============================================================ */

header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 100px;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 6px;
    background-color: var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-img {
    height: 80px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 800;
    font-size: 18px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.btn-contatti {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16px;
    display: inline-block;
}

.btn-contatti:hover {
    background-color: var(--accent-hover);
}

/* ============================================================
   MENU MOBILE (SLIDE-IN)
   ============================================================ */

.hamburger-icon {
    display: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 1100;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1200;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.mobile-sidebar.open {
    transform: translateX(0);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1150;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.sidebar-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.close-btn {
    background: none;
    border: none;
    font-size: 40px;
    color: var(--primary-color);
    cursor: pointer;
    line-height: 1;
}

.mobile-links li {
    margin-bottom: 20px;
}

.mobile-links a {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    display: block;
}

.mobile-links a:hover {
    color: var(--accent-color);
    padding-left: 10px;
}

.mobile-btn-container {
    margin-top: auto;
    padding-top: 20px;
}

.mobile-btn-contatti {
    display: block;
    text-align: center;
    width: 100%;
}

/* ============================================================
   PULSANTE TORNA SU
   ============================================================ */

.scroll-top {
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 50px;
    height: 50px;
    z-index: 900;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    transform: translateY(20px);
    border-radius: 50%;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    background: white;
    overflow: hidden;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 2px 5px 15px rgba(0,0,0,0.3);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    background-color: var(--primary-color);
    color: #ccc;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h4 {
    font-size: 22px;
    margin-bottom: 25px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-col p {
    margin-bottom: 12px;
    font-size: 16px;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 25px;
    display: block;
    background-color: white;
    padding: 5px;
    border-radius: 5px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 15px;
}

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    box-shadow: 2px 2px 3px #999;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

.my-float {
    width: 35px;
    height: 35px;
    fill: white;
}

/* ============================================================
   BOTTONE HERO SECONDARIO (outline)
   ============================================================ */

.btn-hero-secondary {
    background-color: transparent !important;
    border: 2px solid var(--white);
    margin-left: 12px;
    box-shadow: none !important;
}

.btn-hero-secondary:hover {
    background-color: var(--white) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25) !important;
}

@media (max-width: 992px) {
    .btn-hero-secondary {
        margin-left: 0;
        margin-top: 10px;
        display: inline-block;
    }
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: var(--white);
    z-index: 20000;
    padding: 20px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    border-top: 4px solid var(--accent-color);
    animation: cookieSlideUp 0.4s ease-out;
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-banner--hide {
    animation: cookieSlideDown 0.4s ease-in forwards;
}

@keyframes cookieSlideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.cookie-banner__text {
    flex: 1 1 400px;
    font-size: 15px;
    line-height: 1.6;
}

.cookie-banner__text a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
}

.cookie-banner__text a:hover {
    color: var(--white);
}

.cookie-banner__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-banner__btn {
    padding: 10px 22px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: 0.25s;
    font-family: inherit;
}

.cookie-banner__btn--accept {
    background-color: var(--accent-color);
    color: var(--white);
}

.cookie-banner__btn--accept:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.cookie-banner__btn--reject {
    background-color: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.cookie-banner__btn--reject:hover {
    border-color: var(--white);
    background-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    .cookie-banner { padding: 16px 18px; }
    .cookie-banner__content { gap: 16px; }
    .cookie-banner__text { font-size: 14px; flex-basis: 100%; }
    .cookie-banner__actions { width: 100%; justify-content: stretch; }
    .cookie-banner__btn { flex: 1; padding: 10px 14px; font-size: 13px; }
}

/* ============================================================
   MEDIA QUERY MOBILE (≤ 992px) — solo regole comuni
   ============================================================ */

@media (max-width: 992px) {
    .nav-links,
    .btn-contatti {
        display: none;
    }
    .hamburger-icon {
        display: block;
    }
    .navbar {
        justify-content: space-between;
    }
    .logo-img {
        height: 60px;
    }
    header {
        height: 80px;
    }
    header::before {
        width: 120px;
        height: 5px;
    }
    .whatsapp-float {
        width: 50px;
        height: 50px;
        right: 20px;
        bottom: 20px;
        font-size: 24px;
    }
    .scroll-top {
        left: 20px;
        bottom: 20px;
    }
}
