/* ==================== 
   DUO FIDE - Custom Styles
   ==================== */

/* ==================== VARIABLES ==================== */
:root {
    /* Brand Colors */
    --primary: #22c55e;
    --primary-light: rgba(34, 197, 94, 0.1);
    --primary-dark: #16a34a;
    --accent: #ef4444;
    --accent-light: rgba(239, 68, 68, 0.1);
    
    /* Neutrals */
    --foreground: #141414;
    --background: #ffffff;
    --muted: #666666;
    --border: #e5e5e5;
    --card: #ffffff;
    --light-bg: #f8faf8;
    
    /* Typography */
    --font-body: 'Inter', sans-serif;
    --font-display: 'Poppins', sans-serif;
    
    /* Spacing */
    --section-padding: 6rem;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-brand: 0 10px 40px -10px rgba(34, 197, 94, 0.3);
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* ==================== BASE ==================== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--foreground);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
}

.text-primary {
    color: var(--primary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.text-muted {
    color: var(--muted) !important;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline-dark {
    border-width: 2px;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.btn-outline-dark:hover {
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.shadow-brand {
    box-shadow: var(--shadow-brand);
}

/* ==================== HEADER ==================== */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-fixed .navbar {
    padding: 0.15rem 0;
}

.logo-img {
    height: 48px;
    width: auto;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .logo-img {
        height: 85px;
    }
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--foreground);
    white-space: nowrap;
}

@media (min-width: 768px) {
    .brand-name {
        font-size: 1.25rem;
    }
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: var(--foreground);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.nav-link {
    color: rgba(20, 20, 20, 0.8);
    font-weight: 500;
    padding: 0.5rem 0 !important;
    transition: color 0.2s ease;
}

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

@media (min-width: 768px) {
    .nav-link {
        padding: 0.5rem 0.75rem !important;
    }
}

/* ==================== HERO ==================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.8) 50%, 
        transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 42rem;
}

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

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (min-width: 992px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.hero-description {
    font-size: 1.125rem;
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.75;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 576px) {
    .hero-buttons {
        flex-direction: row;
    }
}

/* ==================== SECTIONS ==================== */
.section-padding {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: var(--section-padding) 0;
    }
}

.bg-light {
    background-color: var(--light-bg) !important;
}

.section-header {
    max-width: 42rem;
    margin: 0 auto 4rem;
}

.badge-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.875rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--muted);
}

/* ==================== SERVICES ==================== */
.service-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-lg);
    border: none;
    height: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

@media (min-width: 768px) {
    .service-card {
        padding: 2rem;
    }
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.bg-primary-light {
    background-color: var(--primary-light);
}

.bg-accent-light {
    background-color: var(--accent-light);
}

.service-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.service-description {
    color: var(--muted);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ==================== ABOUT ==================== */
.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-item i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.about-logo-card {
    position: relative;
}

.about-logo-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    opacity: 0.2;
    filter: blur(48px);
    border-radius: 50%;
}

.about-logo-content {
    position: relative;
    background: var(--card);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 3rem;
    border: 1px solid var(--border);
}

.about-logo-img {
    width: 18rem;
    height: 18rem;
    object-fit: contain;
}

/* ==================== TESTIMONIALS ==================== */
.testimonial-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--border);
    position: relative;
    height: 100%;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .testimonial-card {
        padding: 2rem;
    }
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.testimonial-quote {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--primary-light);
    opacity: 0.5;
}

.testimonial-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.testimonial-text {
    color: rgba(20, 20, 20, 0.8);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    font-weight: 500;
    margin-bottom: 0;
    font-size: 1rem;
}

.testimonial-author p {
    color: var(--muted);
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* ==================== CONTACT ==================== */
.contact-form-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .contact-form-card {
        padding: 2rem;
    }
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.contact-info-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    height: 100%;
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.contact-info-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-info-card h4 {
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contact-info-card p {
    color: var(--muted);
    margin-bottom: 0;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--foreground);
    color: var(--background);
    padding: 4rem 0 0;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    overflow: visible;
}

@media (min-width: 768px) {
    .footer-brand {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 1rem;
    }
}

.footer-brand-text {
    min-width: 0;
    overflow: visible;
}

.footer-logo {
    height: 5rem;
    width: auto;
    background-color: var(--background);
    border-radius: 50%;
    padding: 0.25rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .footer-logo {
        height: 9rem;
    }
}

.footer-brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.8vw, 3.5rem);
    display: block;
    white-space: nowrap;
    overflow: visible;
}

.footer-brand-subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 0;
}

.footer-description {
    opacity: 0.7;
    line-height: 2;
    max-width: 100%;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .footer-description {
        max-width: 28rem;
    }
}

.footer-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--background);
    font-size: 1.25rem;
    transition: background-color 0.2s ease;
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-bottom p {
    opacity: 0.6;
    font-size: 0.875rem;
    margin-bottom: 0;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

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

/* ==================== CHIAMACI BUTTON ==================== */
@media (min-width: 768px) {
    .btn-chiamaci {
        display: none !important;
    }
}

/* ==================== UTILITIES ==================== */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ==================== LEGAL PAGES ==================== */
.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--foreground);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.legal-content ul {
    padding-left: 1.5rem;
}

.legal-content a {
    color: var(--primary-dark);
    text-decoration: underline;
}

.legal-content table {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.legal-content table code {
    background: var(--light-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.cookie-banner-content {
    max-width: 1100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-banner-text {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #e5e5e5;
    font-size: 0.875rem;
    line-height: 1.5;
}

.cookie-banner-text i {
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-banner-text p {
    margin: 0;
}

.cookie-banner-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-banner-text {
        flex-direction: column;
        align-items: center;
    }
    .cookie-banner-actions {
        width: 100%;
        justify-content: center;
    }
}