/* ============================================
   BLUE CRISTAL SAGL — Custom Styles
   ============================================ */

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Body when header is scrolled */
body { padding-top: 0; }

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
#site-header {
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
}

#site-header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* When the page hero is light (privacy page), header needs visible bg from start */
.light-hero #site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
}

/* Nav link */
.nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: #063D70;
    transition: color 0.3s;
    padding: 0.25rem 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0073D6, #36AEFF);
    transition: width 0.3s ease;
}
.nav-link:hover { color: #0073D6; }
.nav-link:hover::after { width: 100%; }
.nav-link-active { color: #0073D6; }
.nav-link-active::after { width: 100%; }

/* When over the hero (transparent header, dark BG), nav text is white */
#site-header:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.92);
}
#site-header:not(.scrolled) .nav-link:hover {
    color: white;
}
#site-header:not(.scrolled) #current-lang,
#site-header:not(.scrolled) #mobile-menu-btn {
    color: white;
}
#site-header:not(.scrolled) .font-display {
    color: white;
}
/* Logo PNG: leggera ombra per leggibilità sopra hero scuri,
   ma colori originali preservati */
#site-header:not(.scrolled) img[alt="Blue Cristal Sagl"] {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: white;
    color: #042653;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-primary-alt {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #0073D6, #36AEFF);
    color: white;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 115, 214, 0.3);
}
.btn-primary-alt:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 115, 214, 0.4);
}

/* ============================================
   CARDS
   ============================================ */
.card-activity {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid #E0F4FF;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}
.card-activity::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073D6, #36AEFF);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.card-activity:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 115, 214, 0.1);
    border-color: #B5E1FF;
}
.card-activity:hover::before { transform: scaleX(1); }

.card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}
.card-activity:hover .card-icon { transform: rotate(-5deg) scale(1.05); }

.card-product {
    background: white;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid #E0F4FF;
    transition: all 0.4s ease;
    cursor: pointer;
    display: block;
    color: inherit;
    text-decoration: none;
}
.card-product:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 115, 214, 0.1);
    border-color: #B5E1FF;
}

.card-value {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    border: 1px solid #E0F4FF;
    transition: all 0.3s ease;
}
.card-value:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 115, 214, 0.08);
}

/* ============================================
   FORM
   ============================================ */
.form-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.75rem;
    background: white;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
}
.form-input:focus {
    outline: none;
    border-color: #0073D6;
    box-shadow: 0 0 0 3px rgba(0, 115, 214, 0.1);
}
.form-input::placeholder { color: #94A3B8; }

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23475569%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   LANG SWITCHER ACTIVE STATE
   ============================================ */
.lang-option.active {
    background: #EFF8FF;
    color: #0073D6;
    font-weight: 600;
}

/* ============================================
   PROSE OVERRIDES (Privacy page)
   ============================================ */
.prose h2 { color: #042653; }
.prose a { color: #0073D6; transition: color 0.2s; }
.prose a:hover { color: #042653; }
.prose strong { color: #042653; }

/* ============================================
   CLIENT LOGOS
   ============================================ */
.client-logo {
    height: 60px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.55;
    transition: filter 0.4s ease, opacity 0.4s ease, transform 0.3s ease;
}
.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */
@media (max-width: 768px) {
    .font-display { letter-spacing: -0.02em; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    [data-animate] { opacity: 1; transform: none; }
}

/* Selection */
::selection { background: #B5E1FF; color: #042653; }
