/* Font personalizzato */
@font-face {
    font-family: 'Dune Rise';
    src: url('font/Dune_Rise.ttf') format('truetype'),
         url('font/Dune_Rise.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Reset e variabili CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --text-color: #334155;
    --text-light: #64748b;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #2563eb, #1e40af);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* Header e Navigazione */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    text-decoration: none;
    font-family: 'Dune Rise', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: normal;
    color: var(--dark-color);
    flex-shrink: 0;
}

.logo span {
    margin-top: 1rem;
}

.logo .letter-blue {
    color: #0f172a;
}

.logo .letter-orange {
    color: #f59e0b;
}

.logo-image {
    width: 75px;
    height: 75px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: auto;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Sezione Offerta del Mese */
.monthly-offer {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #5b21b6 100%);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.monthly-offer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(90deg); }
    50% { transform: translate(-20px, -40px) rotate(180deg); }
    75% { transform: translate(-40px, 20px) rotate(270deg); }
}

.offer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.offer-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.monthly-offer h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    white-space: nowrap;
}

.monthly-offer .price {
    font-size: 4rem;
    font-weight: 900;
    color: #fbbf24;
    margin: 1rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.monthly-offer .old-price {
    font-size: 2rem;
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 1rem;
}

.monthly-offer p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-align: justify;
}

/* Bottoni */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #1e40af, #1e3a8a);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #1e3a8a, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.6);
}

.btn-secondary {
    background: rgba(30, 64, 175, 0.1);
    color: #1e40af;
    border: 2px solid #1e40af;
}

.btn-secondary:hover {
    background: rgba(30, 64, 175, 0.2);
    color: #1e3a8a;
    border-color: #1e3a8a;
    transform: translateY(-2px);
}

/* Stili specifici per i pulsanti nella sezione monthly-offer */
.monthly-offer .btn-primary {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: #0f172a;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.monthly-offer .btn-primary:hover {
    background: linear-gradient(45deg, #f59e0b, #fbbf24);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
}

.monthly-offer .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.monthly-offer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sezioni */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    background: var(--gray-100);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
}

/* Hero Chi Siamo con sfondo immagine */
.hero-chisiamo {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('immagini/carousel-1.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: white;
    padding: 200px 0 120px;
    min-height: 65vh;
}

.hero-chisiamo {
    position: relative;
}

.hero-chisiamo .hero-content {
    position: absolute;
    bottom: 40px;
    left: 40px;
    text-align: left;
    max-width: none;
    padding: 0;
}

.hero-chisiamo h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0;
}

.hero-chisiamo p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Hero Contatti con sfondo immagine */
.hero-contatti {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('immagini/contatti.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    padding: 250px 0 150px;
    min-height: 80vh;
    position: relative;
}

.hero-contatti h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-contatti p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Griglia servizi */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Portfolio Styles */
.portfolio-section {
    background: var(--white);
    padding: 80px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(249, 115, 22, 0.9));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    text-align: center;
    padding: 2rem;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.portfolio-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.portfolio-overlay p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.portfolio-link {
    background: white;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-link:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Portfolio senza gradiente */
.portfolio-no-gradient .portfolio-overlay {
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid #1e40af;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Sezione Chi Siamo */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    text-align: left;
    hyphens: auto;
    word-spacing: normal;
    letter-spacing: normal;
}

.about-image {
    height: 400px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-image-mobile {
    display: none;
}

/* Footer */
footer {
    background: #ffffff;
    color: #1e3a8a;
    padding: 2rem 0 1.5rem;
    border-top: 1px solid #1e3a8a;
}

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

.footer-section h3 {
    margin-bottom: 0.75rem;
    color: #1e3a8a;
}

/* Mantieni i colori originali per le lettere colorate nel footer */
.footer-section h3 .letter-blue {
    color: #0f172a;
}

.footer-section h3 .letter-orange {
    color: #f59e0b;
}

.footer-section p,
.footer-section a {
    color: #374151;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
    transition: var(--transition);
}

.footer-section a:hover {
    color: #1e3a8a;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #1e3a8a;
    padding: 0.75rem 2rem 0;
    color: #6b7280;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 2rem;
        box-shadow: var(--shadow);
        margin-left: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .monthly-offer h1 {
        font-size: 2.2rem;
        white-space: normal;
    }

    .monthly-offer p {
        text-align: justify;
    }

    .monthly-offer .price {
        font-size: 3rem;
    }

    .hero {
        padding: 120px 0 60px;
    }

    /* Footer mobile ancora più piccolo */
    footer {
        padding: 1rem 0 0.75rem;
    }

    .footer-content {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .footer-section h3 {
        margin-bottom: 0.25rem;
        font-size: 1rem;
    }

    .footer-section p {
        font-size: 0.85rem;
        margin-bottom: 0.15rem;
        line-height: 1.3;
    }

    .footer-bottom {
        padding: 0.25rem 1rem 0;
        font-size: 0.8rem;
    }

    .hero-chisiamo {
        padding: 120px 0 80px;
        min-height: 45vh;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .services .display-5 {
        font-size: 1.1rem !important;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-image {
        height: 250px;
    }

    .portfolio-overlay {
        padding: 1.5rem;
    }

    .portfolio-overlay h3 {
        font-size: 1.3rem;
    }

    .hero-chisiamo .hero-content {
        bottom: 20px;
        left: 20px;
    }

    .hero-chisiamo h1 {
        font-size: 2.2rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }

    .hero-chisiamo p {
        font-size: 1.1rem;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    }

    .hero-contatti {
        padding: 150px 0 100px;
        min-height: 60vh;
    }

    .hero-contatti h1 {
        font-size: 2.2rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }

    .hero-contatti p {
        font-size: 1.1rem;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    }

    /* Hero Blog responsive */
    .hero[style*="blog.webp"] {
        padding: 120px 0 80px !important;
        min-height: 45vh !important;
    }

    .hero[style*="blog.webp"] .hero-content {
        bottom: 20px !important;
        left: 20px !important;
    }

    .hero[style*="blog.webp"] h1 {
        font-size: 2.2rem !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }

    /* Responsive per hero contatti con stili inline */
    .hero[style*="contatti.png.webp"] {
        padding: 120px 0 80px !important;
        min-height: 45vh !important;
    }

    .hero[style*="contatti.png.webp"] .hero-content {
        bottom: 20px !important;
        left: 20px !important;
    }

    .hero[style*="contatti.png.webp"] h1 {
        font-size: 2.2rem !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }

    .about-content {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .about-image {
        order: 2;
    }

    .about-text {
        order: 1;
    }

    .about-image-mobile {
        display: block;
    }

    .about-image {
        display: none;
    }

    .about-text .btn-group {
        justify-content: center !important;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 2rem;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .logo-image {
        width: 50px;
        height: 50px;
    }
    
    .logo span {
        margin-top: 0.4rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    nav {
        padding: 0 1rem;
    }

    .monthly-offer {
        padding: 120px 0 60px;
    }

    .monthly-offer h1 {
        font-size: 1.8rem;
        white-space: normal;
    }

    .monthly-offer p {
        text-align: justify;
    }

    .service-card {
        padding: 1.5rem;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .logo-image {
        width: 45px;
        height: 45px;
    }
    
    .logo span {
        margin-top: 0.3rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

@media screen and (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}