/* ========================================
   TECNO GROUP SRL - Stylesheet
   ======================================== */

:root {
    --primary: #1a3a5c;
    --primary-dark: #0f2540;
    --primary-light: #2a5a8c;
    --secondary: #64748b;
    --accent: #f59e0b;
    --white: #ffffff;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --dark: #0f172a;
    --success: #10b981;
    --error: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --radius: 8px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: 50%;
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-menu a {
    font-weight: 500;
    color: var(--gray-600);
    position: relative;
    padding: 5px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: var(--dark);
}

.btn-primary:hover {
    background: #e08c00;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-secondary {
    background: var(--primary);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    padding: 80px 0;
}

.section-light {
    background: var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   FEATURES / CARDS
   ======================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--secondary);
    line-height: 1.7;
}

/* ========================================
   SERVICES
   ======================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image i {
    font-size: 4rem;
    color: var(--white);
}

.service-content {
    padding: 30px;
}

.service-content h3 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.service-content p {
    color: var(--secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-machines {
    font-size: 0.85rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 10px 15px;
    border-radius: var(--radius);
    margin-top: 15px;
    margin-bottom: 0;
}

.service-machines i {
    color: var(--accent);
    margin-right: 5px;
}

/* ========================================
   ABOUT PAGE
   ======================================== */

.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.about-content p {
    color: var(--secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--accent);
    color: var(--dark);
    padding: 20px 30px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--secondary);
    font-size: 0.95rem;
}

/* ========================================
   CONTACT
   ======================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--secondary);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item-content h4 {
    color: var(--primary);
    margin-bottom: 5px;
}

.contact-item-content p,
.contact-item-content a {
    color: var(--secondary);
}

.contact-item-content a:hover {
    color: var(--primary);
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-800);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-message {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
}

/* ========================================
   PAGE HEADER
   ======================================== */

.page-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.95rem;
}

.breadcrumb a {
    opacity: 0.8;
}

.breadcrumb a:hover {
    opacity: 1;
}

.breadcrumb span {
    opacity: 0.6;
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--gray-600);
}

.footer-logo {
    height: 70px;
    margin-bottom: 20px;
    border-radius: 50%;
}

.footer-col p {
    line-height: 1.8;
}

.footer-since {
    margin-top: 10px;
    font-weight: 600;
    color: var(--accent);
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a:hover {
    color: var(--accent);
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-list i {
    color: var(--accent);
    margin-top: 4px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--gray-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    color: var(--dark);
}

.footer-bottom {
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* ========================================
   MATERIALS LIST
   ======================================== */

.materials-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.material-tag {
    background: var(--primary);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .features-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--gray-200);
    }
    
    .nav-menu a {
        display: block;
        padding: 15px 0;
    }
    
    .hero {
        padding: 140px 0 80px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-section {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .contact-list li {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ========================================
   GALLERY & IMAGES
   ======================================== */

/* Hero con immagine di sfondo */
.hero-with-bg {
    position: relative;
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
}

.hero-with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.9) 0%, rgba(15, 37, 64, 0.95) 100%);
    z-index: 1;
}

.hero-with-bg .container {
    position: relative;
    z-index: 2;
}

/* Video Showcase */
.about-video {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.showcase-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

.video-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-caption i {
    color: var(--accent);
}

/* Image Grid per sezioni */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.image-grid-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
}

.image-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-grid-item:hover img {
    transform: scale(1.1);
}

.image-grid-item .image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    opacity: 0;
    transition: var(--transition);
}

.image-grid-item:hover .image-overlay {
    opacity: 1;
}

.image-grid-item .image-overlay h4 {
    font-size: 1rem;
    margin: 0;
}

/* Gallery Lightbox */
.gallery-section {
    background: var(--gray-100);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.15);
}

.gallery-item .gallery-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-zoom {
    opacity: 1;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--accent);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: var(--accent);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 0.9rem;
}

/* Service Image Card */
.service-card-with-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
    padding: 40px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.service-card-with-image.reverse {
    grid-template-columns: 1fr 1fr;
}

.service-card-with-image.reverse .service-card-image {
    order: 2;
}

.service-card-image {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contact Image Strip */
.contact-image-strip {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    overflow: hidden;
}

.contact-image-strip img {
    flex: 1;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-image-strip img:hover {
    transform: scale(1.05);
}

/* About Image Grid */
.about-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.about-image-grid .main-image {
    grid-column: 1 / -1;
    aspect-ratio: 16/9;
}

.about-image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

/* Responsive Gallery */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-card-with-image {
        grid-template-columns: 1fr;
    }
    
    .service-card-with-image.reverse .service-card-image {
        order: 0;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-image-strip {
        flex-wrap: wrap;
    }
    
    .contact-image-strip img {
        flex: 0 0 calc(50% - 7.5px);
    }
    
    .about-image-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
