/* ==========================================================================
   NOVABLOCK DESIGN SYSTEM & CONFIGURATION
   ========================================================================== */
:root {
    --primary: #0a2540;     /* Deep Night Blue */
    --accent: #00803F;      /* Energetic Green */
    --accent-hover: #006632;
    --bg-light: #f8f9fa;    /* Relaxing Off-white */
    --text-main: #333333;   /* Dark Grey for readability */
    --text-muted: #627d98;  /* Bluish Grey for secondary text */
    --white: #ffffff;
    --border-color: rgba(0, 0, 0, 0.06);
    --brand-blue: #004282;
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
#topcontrol {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--accent);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

#topcontrol.visible {
    opacity: 1;
    visibility: visible;
}

#topcontrol:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo img {
    height: 40px;
    width: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.main-nav a:hover, 
.main-nav .active a {
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.language-selector a {
    display: block;
    transition: transform 0.2s;
}

.language-selector a:hover {
    transform: scale(1.1);
}

.language-selector img {
    width: 30px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-cta {
    background-color: var(--primary);
    color: var(--white);
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s, transform 0.3s;
}

.header-cta:hover {
    background-color: var(--accent);
    transform: translateY(-1px);
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--primary);
    cursor: pointer;
    padding: 5px;
    z-index: 1100;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    display: flex;
    align-items: center;
    min-height: 80vh;
    padding: 80px 5%;
    background: linear-gradient(rgba(10, 37, 64, 0.75), rgba(10, 37, 64, 0.75)), url('../custom/novablock_ita/writable/files/wow-slider/data1/images/background_banner_06.jpg') no-repeat center center / cover;
    position: relative;
}

.hero-content {
    max-width: 700px;
    color: var(--white);
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--white);
}

.hero-content p {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin-bottom: 35px;
    font-weight: 300;
}

.badge-certified {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(227, 242, 253, 0.2);
    color: #ffffff;
    backdrop-filter: blur(4px);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.cta-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 128, 63, 0.3);
    transition: transform 0.3s, background 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background-color: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* ==========================================================================
   FEATURES (BENTO GRID)
   ========================================================================== */
.features-section {
    padding: 100px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 60px;
    font-weight: 300;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.bento-card {
    background: var(--bg-light);
    border-radius: 24px;
    padding: 40px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(10, 37, 64, 0.06);
}

.bento-card.wide {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--primary) 0%, #163657 100%);
    color: var(--white);
}

.bento-card.wide h3 { color: var(--white); }
.bento-card.wide p { color: #a5becc; }

.bento-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 25px;
}

.bento-card.wide i { color: #52b1ff; }

.bento-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 0.98rem;
}

/* Modifier speciale per box specifiche all'interno della bento */
.bento-card.bg-dark-custom {
    background: var(--primary); 
    color: white;
}
.bento-card.bg-dark-custom h3 { color: white; }
.bento-card.bg-dark-custom p { color: #9ab2cf; margin-bottom: 15px; }
.bento-card.bg-dark-custom i { color: var(--accent); }
.bento-card.bg-dark-custom a {
    color: var(--accent); 
    font-weight: 600; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
}

/* ==========================================================================
   TECHNICAL DEEP DIVE
   ========================================================================== */
.tech-section {
    background-color: var(--bg-light); 
    padding: 90px 5%;
}

.tech-container {
    max-width: 1100px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 60px; 
    align-items: center;
}

.tech-text h2 {
    font-size: 2.2rem; 
    margin-bottom: 25px;
}

.tech-text p {
    margin-bottom: 20px; 
    color: #4a5568; 
    font-size: 1.05rem;
}

.tech-image img {
    max-width: 280px; 
    margin: 0 auto; 
    display: block;
}

/* ==========================================================================
   BLOG / NEWS SECTION
   ========================================================================== */
.blog-section {
    padding: 100px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(10, 37, 64, 0.1);
}

.blog-img {
    width: 100%;
    height: 220px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
}

.blog-img i { 
    font-size: 2.5rem; 
    color: #cbd5e1; 
} 

.blog-meta {
    padding: 25px 25px 10px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-body {
    padding: 0 25px 25px;
}

.blog-body h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.blog-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.blog-link:hover { 
    color: var(--accent); 
}

/* ==========================================================================
   FAQ SECTION (ACCORDION)
   ========================================================================== */
.faq-section {
    background-color: var(--bg-light);
    padding: 100px 5%;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-grid {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 22px 30px;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: background 0.2s;
}

.faq-question:hover {
    background: rgba(0, 128, 63, 0.02);
}

.faq-question i {
    font-size: 1rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 30px;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    padding: 0 30px 25px;
    max-height: 300px;
}

/* ==========================================================================
   CONTACT SECTION & FORM
   ========================================================================== */
.contact-section {
    padding: 100px 5%; 
    background: linear-gradient(135deg, #0e2e4e 0%, var(--primary) 100%); 
    color: var(--white);
}

.contact-container {
    max-width: 1100px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 60px;
}

.contact-info h2 {
    color: var(--white); 
    font-size: 2.5rem; 
    margin-bottom: 20px;
}

.contact-info p {
    color: #a5becc; 
    font-size: 1.1rem; 
    margin-bottom: 40px;
}

.info-item {
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem; 
    color: var(--accent); 
    background: rgba(255,255,255,0.05); 
    padding: 15px; 
    border-radius: 50%; 
    width: 55px; 
    height: 55px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.info-item a {
    color: var(--white); 
    text-decoration: none; 
    font-size: 1.1rem; 
    font-weight: 500;
}

.info-item span {
    font-size: 1.1rem;
}

.contact-form {
    background: var(--white); 
    padding: 40px; 
    border-radius: 20px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block; 
    margin-bottom: 8px; 
    font-size: 0.9rem; 
    font-weight: 600; 
    color: var(--primary);
}

.form-group input, 
.form-group textarea {
    width: 100%; 
    padding: 14px; 
    border: 1px solid #dcdcdc; 
    border-radius: 8px; 
    font-family: 'Inter', sans-serif; 
    font-size: 1rem; 
    color: var(--text-main); 
    outline: none; 
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus { 
    border-color: var(--accent);
}

.btn-submit {
    width: 100%; 
    background-color: var(--accent); 
    color: var(--white); 
    border: none; 
    padding: 16px; 
    border-radius: 8px; 
    font-size: 1rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: background 0.3s;
}

.btn-submit:hover { 
    background-color: var(--primary); 
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: #051424;
    color: #8fa0b5;
    padding: 80px 5% 30px;
    font-size: 0.95rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-brand p {
    margin: 20px 0;
    line-height: 1.7;
}

.footer-brand img {
    height: 35px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #8fa0b5;
    font-size: 1.3rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #8fa0b5;
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom-links a {
    color: #8fa0b5;
    text-decoration: none;
    margin-left: 20px;
}

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

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 2.8rem; }
    .bento-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-card.wide { grid-column: span 2; }
}

@media (max-width: 991px) {
    .hamburger-btn { display: block; }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        padding: 100px 40px;
        transition: right 0.4s ease-in-out;
        z-index: 1050;
    }

    .main-nav.active { right: 0; }
    .main-nav ul { flex-direction: column; gap: 25px; }
    .main-nav a { font-size: 1.2rem; display: block; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }

    .header-actions { margin-right: 15px; }
    .header-cta { padding: 8px 16px; font-size: 0.8rem; }

    .hero { text-align: center; justify-content: center; padding: 60px 5%; min-height: 60vh; }
    .cta-group { justify-content: center; }
    .tech-container, .contact-container, .footer-grid { grid-template-columns: 1fr; gap: 40px; }

    .bento-grid, .blog-grid { grid-template-columns: 1fr; }
    .bento-card.wide { grid-column: span 1; }
}

@media (max-width: 576px) {
    .main-header { padding: 12px 4%; }
    .logo img { height: 32px; }
    
    .header-cta span { display: none; }
    .header-cta { padding: 10px 14px; border-radius: 50%; }

    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1.1rem; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; }
    
    .section-title { font-size: 1.8rem; }
    .bento-card { padding: 30px 20px; }
    .contact-form { padding: 25px 20px; }
    
    .footer-bottom { flex-direction: column; text-align: center; gap: 10px; }
    .footer-bottom-links a { margin: 0 10px; }
}