/* ==========================================================================
   Traslochi.Net — Frontend Stylesheet (EAA / EN 301 549 / WCAG 2.1 AA)
   ========================================================================== */

:root {
    /* Contrasto verificato >= 4.5:1 su #fff, #f8f9fa e #E6FFE3 */
    --brand-primary: #066d65;
    --brand-primary-hover: #04524c;
    /* Contrasto verificato >= 5.4:1 con testo #fff */
    --brand-secondary: #c7350b;
    --brand-secondary-hover: #a62b08;
    --brand-light-bg: #E6FFE3;
    --text-body: #111111;
    --text-muted-aa: #495057;
    --border-input-aa: #6c757d;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-body);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
}

/* Skip link (WCAG 2.4.1 Bypass Blocks) */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background-color: var(--brand-primary);
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    text-decoration: underline;
    border-radius: 0 0 0.5rem 0;
}
.skip-link:focus,
.skip-link:focus-visible {
    left: 0;
    top: 0;
    color: #ffffff;
    outline: 3px solid #000000;
    outline-offset: 2px;
}

/* Focus visibile globale (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--brand-primary) !important;
    outline-offset: 2px;
}

/* Evita che l'header sticky copra gli elementi focalizzati o le ancore (WCAG 2.4.11) */
#main-content,
#form-section,
[id] {
    scroll-margin-top: 96px;
}

.text-brand { color: var(--brand-primary) !important; }
.bg-brand-light { background-color: var(--brand-light-bg) !important; }
.bg-brand-secondary { background-color: var(--brand-secondary) !important; }

.btn-brand {
    background-color: var(--brand-secondary);
    color: #ffffff;
    font-weight: 700;
    border: 2px solid transparent;
    transition: background-color 0.2s ease;
}
.btn-brand:hover,
.btn-brand:focus-visible {
    background-color: var(--brand-secondary-hover);
    color: #ffffff;
}

a {
    color: var(--brand-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
a:hover {
    color: var(--brand-primary-hover);
}

/* Navigazione principale */
header.sticky-top {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.navbar-brand {
    text-decoration: none;
}
.navbar-brand img {
    max-height: 40px;
    width: auto;
}
.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--text-body);
    text-decoration: none;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus-visible,
.navbar-nav .nav-link.active {
    color: var(--brand-secondary);
    text-decoration: underline;
}
.navbar-nav .dropdown-toggle-split {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.dropdown-menu {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
.dropdown-item {
    color: var(--text-body);
    text-decoration: none;
}
.dropdown-item:hover,
.dropdown-item:focus-visible {
    background-color: var(--brand-light-bg);
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

/* Apertura menu desktop anche su hover senza bloccare la tastiera */
@media all and (min-width: 992px) {
    .navbar .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        border-radius: 0.5rem;
        margin-top: 0;
    }
}

/* Hero Section */
#hero-section {
    background-image: url('/assets/images/banner-1.png');
    background-size: cover;
    background-position: bottom;
    padding-top: 20px;
}
#hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
}
#hero-section h2 {
    font-size: 1.2rem;
    line-height: 1.6;
}
#hero-section .btn-cta-hero {
    display: inline-block;
    background-color: var(--brand-secondary);
    padding: 14px 30px;
    border-radius: 4px;
    color: #ffffff;
    font-weight: 700;
    margin-top: 30px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
#hero-section .btn-cta-hero:hover,
#hero-section .btn-cta-hero:focus-visible {
    background-color: var(--brand-secondary-hover);
    color: #ffffff;
}

/* Form Preventivo (WCAG 1.4.11 contrasto bordi >= 3:1) */
#form-section {
    border: 2px solid var(--brand-primary);
}
#form-progress-bar {
    transition: width 0.3s ease;
}
#form-preventivo .form-control,
#form-preventivo .form-select {
    border: 1px solid var(--border-input-aa) !important;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    color: var(--text-body);
}
#form-preventivo .form-check-input {
    border: 1.5px solid var(--border-input-aa);
}
#form-preventivo .form-control:focus,
#form-preventivo .form-select:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(6, 109, 101, 0.25);
}
#form-preventivo .form-control.is-invalid,
#form-preventivo .form-check-input.is-invalid {
    border-color: #b02a37 !important;
}
.card.rounded-4 {
    border-radius: 1rem !important;
}
.form-label.small {
    font-size: 0.85rem;
    color: #212529;
}

@media (min-width: 992px) {
    .sticky-lg-top {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
}

/* Content Sections */
.content-section img {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
}
.custom-list {
    list-style: none;
    padding-left: 0;
}
.custom-list li {
    margin-bottom: 0.5rem;
}
.custom-list .bi-check-lg {
    color: var(--brand-primary);
    margin-right: 0.75rem;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

/* Feature Section */
.feature-icon {
    width: 90px;
    height: 90px;
    background-color: rgba(199, 53, 11, 0.1);
    color: var(--brand-secondary);
    font-size: 40px;
}

/* Testimonials */
.testimonial-card .card-body {
    position: relative;
    padding-top: 2.5rem;
}
.testimonial-card .bi-quote {
    font-size: 3rem;
    color: #dee2e6;
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    z-index: 0;
}
.testimonial-card .card-text,
.testimonial-card .card-footer {
    position: relative;
    z-index: 1;
}
.star-rating .bi-star-fill {
    color: #b86e00;
}

#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.65);
    border-radius: 50%;
    padding: 1.2rem;
}

/* Silo & Hover Cards */
.hover-brand {
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.hover-brand:hover,
.hover-brand:focus-visible {
    border-color: var(--brand-primary) !important;
    background-color: var(--brand-light-bg);
}

/* Footer */
#main-footer {
    background-color: #f8f9fa;
}
#main-footer .text-muted {
    color: var(--text-muted-aa) !important;
}
.social-icons a {
    color: var(--brand-secondary);
    border: 1.5px solid var(--brand-secondary);
    width: 44px;
    height: 44px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.social-icons a:hover,
.social-icons a:focus-visible {
    background-color: var(--brand-secondary);
    color: #ffffff;
}
.lang-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    text-decoration: none;
    vertical-align: middle;
}

#fixed-footer {
    background-color: #ffebe2;
}
#fixed-footer .btn-brand {
    text-decoration: none;
}

/* Riduzione animazioni (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

