/* Gestione Interventi - Website Custom Styles */

:root {
    /* Brand Colors */
    --primary-color: #007AFF;
    --primary-dark: #0056CC;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;

    /* Neutral Colors */
    --dark-color: #1C1C1E;
    --gray-color: #636366; /* Improved contrast ratio for WCAG AA */
    --light-gray: #F2F2F7;
    --white: #FFFFFF;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-hero: linear-gradient(180deg, #F8F9FA 0%, #FFFFFF 100%);
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    padding: 6rem 0 4rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-color);
    margin-bottom: 2rem;
}

.hero-image {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

.hero-screenshot {
    max-height: 600px;
    width: auto;
    border-radius: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* App Store Badge */
.app-store-badge {
    height: 54px;
    transition: transform 0.3s ease;
}

.app-store-badge:hover {
    transform: scale(1.05);
}

/* Device Badges */
.device-badges {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.device-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

.device-badge i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-color);
    text-align: center;
    margin-bottom: 4rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 20px;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--white);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--gray-color);
    font-size: 0.95rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    text-align: left;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.feature-list li::before {
    content: "\F272";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    color: var(--success-color);
}

/* Screenshots Section */
.screenshots-section {
    padding: 6rem 0;
    background: var(--light-gray);
}

.screenshot-tabs .nav-link {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--dark-color);
    background: transparent;
    border: 2px solid transparent;
}

.screenshot-tabs .nav-link.active {
    background: var(--primary-color);
    color: var(--white);
}

.screenshot-carousel .carousel-item img {
    max-height: 500px;
    width: auto;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    min-width: 48px;
    min-height: 48px;
    background: var(--white);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-control-prev:focus,
.carousel-control-next:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) grayscale(100);
}

/* Pricing Section */
.pricing-section {
    padding: 6rem 0;
    background: var(--white);
}

.pricing-card {
    border-radius: 24px;
    padding: 2.5rem;
    height: 100%;
    transition: all 0.3s ease;
}

.pricing-card.free {
    background: var(--white);
    border: 2px solid var(--light-gray);
}

.pricing-card.pro {
    background: var(--gradient-primary);
    color: var(--white);
    transform: scale(1.05);
}

.pricing-card.pro .pricing-price,
.pricing-card.pro .pricing-features li {
    color: var(--white);
}

.pricing-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.pricing-card.free .pricing-badge {
    background: var(--light-gray);
    color: var(--gray-color);
}

.pricing-card.pro .pricing-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

.pricing-period {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pricing-card.pro .pricing-features li {
    border-color: rgba(255, 255, 255, 0.1);
}

.pricing-features li::before {
    content: "\F272";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    color: var(--success-color);
}

.pricing-card.pro .pricing-features li::before {
    color: var(--white);
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: var(--gradient-primary);
    text-align: center;
    color: var(--white);
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    background: var(--dark-color);
    color: var(--white);
}

.footer-logo {
    height: 50px;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 3rem;
}

.footer-copyright {
    color: var(--gray-color);
    font-size: 0.875rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 122, 255, 0.3);
}

.btn-outline-light {
    border-width: 2px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 16px;
}

/* Language Selector */
.language-selector .dropdown-toggle {
    background: transparent;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.language-selector .dropdown-menu {
    min-width: 120px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Legal Pages */
.legal-page {
    padding-top: 100px;
}

.legal-content {
    padding: 3rem 0;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content p,
.legal-content li {
    color: var(--gray-color);
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-section {
        padding: 4rem 0;
        min-height: auto;
    }

    .hero-screenshot {
        max-height: 400px;
        margin-top: 3rem;
    }

    .pricing-card.pro {
        transform: none;
        margin-top: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .device-badges {
        flex-direction: column;
        gap: 0.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .pricing-card {
        padding: 1.5rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 12px 12px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    color: var(--white);
}

/* Accessibility - Focus Styles */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove default focus outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Ensure proper focus on interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animation - Prevent flash of unstyled content */
.js-animate {
    opacity: 0;
}

.js-loaded .js-animate {
    opacity: 1;
}

/* Carousel indicators */
.carousel-indicators {
    bottom: -40px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--gray-color);
    border: none;
    margin: 0 4px;
}

.carousel-indicators button.active {
    background-color: var(--primary-color);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-color);
    color: var(--white);
    padding: 1rem 0;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-banner p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-banner .btn {
    white-space: nowrap;
}

.cookie-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 575.98px) {
    .cookie-banner {
        padding: 1rem 0;
    }

    .cookie-banner p {
        font-size: 0.875rem;
        text-align: center;
    }
}
