/* ════════════════════════════════════════════════════════════
   MagreServizi — main.css
   Tutti gli stili del sito. Importato dal child theme functions.php
════════════════════════════════════════════════════════════ */

/* ─── VARIABILI ─── */
:root {
    --navy: #132E5C;
    --blue: #1A3A6B;
    --blue-mid: #2856A3;
    --accent: #1E5FBF;
    --accent-light: #3B82F6;
    --steel: #4A6080;
    --silver: #8FA4BE;
    --light: #EDF2F9;
    --lighter: #F5F8FC;
    --white: #FFFFFF;
    --text: #1E2D40;
    --text-muted: #5A7090;
    --energy-green: #059669;
    --energy-teal: #0D9488;
    --border: #D1DDE8;
    --hero-bg: #E8EEF7;
}

/* ─── RESET BASE ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }

/* ─── NAVIGAZIONE ─── */
#mgrs-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 60px; height: 70px;
    box-shadow: 0 2px 20px rgba(19,46,92,0.08);
    transition: box-shadow 0.3s;
}
#mgrs-nav.scrolled { box-shadow: 0 4px 30px rgba(19,46,92,0.14); }
.logo-nav img { height: 44px; width: auto; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
    color: var(--text-muted); font-size: 14px; font-weight: 500;
    letter-spacing: 0.2px; transition: color 0.2s;
}
.nav-links a:hover,
.nav-links .current-menu-item a { color: var(--navy); }
.nav-cta {
    background: var(--navy); color: white;
    padding: 10px 24px; border-radius: 6px;
    font-size: 13.5px; font-weight: 600;
    transition: background 0.2s;
}
.nav-cta:hover { background: var(--blue-mid); color: white; }

/* Hamburger (mobile) */
.nav-hamburger {
    display: none; flex-direction: column; justify-content: space-between;
    width: 26px; height: 18px; background: none; border: none;
    cursor: pointer; padding: 0;
}
.nav-hamburger span {
    display: block; height: 2px; background: var(--navy);
    border-radius: 2px; transition: all 0.3s;
}

/* ─── PULSANTI ─── */
.btn-primary {
    display: inline-block;
    background: var(--navy); color: white;
    padding: 14px 30px; border-radius: 8px;
    font-size: 15px; font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 6px 24px rgba(19,46,92,0.25);
}
.btn-primary:hover { background: var(--blue-mid); transform: translateY(-2px); color: white; }

.btn-ghost {
    display: inline-block;
    border: 1.5px solid var(--border); color: var(--navy);
    padding: 13px 28px; border-radius: 8px;
    font-size: 15px; font-weight: 500;
    background: white; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--accent-light); color: var(--accent); }

/* ─── SEZIONI — BASE ─── */
.section-tag {
    font-size: 11px; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
    display: block;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 3.2vw, 46px);
    font-weight: 700; line-height: 1.15;
    color: var(--navy); letter-spacing: -0.8px; margin-bottom: 14px;
}
.section-sub {
    font-size: 16.5px; line-height: 1.65;
    color: var(--text-muted); max-width: 580px;
}
.section-header { margin-bottom: 56px; }

/* ─── HERO ─── */
.hero {
    min-height: 100vh;
    background: var(--hero-bg);
    background-image:
        radial-gradient(ellipse 70% 60% at 75% 50%, rgba(59,130,246,0.18) 0%, transparent 55%),
        radial-gradient(ellipse 40% 50% at 10% 80%, rgba(5,150,105,0.08) 0%, transparent 50%),
        repeating-linear-gradient(90deg, rgba(19,46,92,0.03) 0px, rgba(19,46,92,0.03) 1px, transparent 1px, transparent 80px),
        repeating-linear-gradient(0deg, rgba(19,46,92,0.03) 0px, rgba(19,46,92,0.03) 1px, transparent 1px, transparent 80px);
    display: flex; align-items: center;
    padding: 120px 60px 80px;
    position: relative; overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute; right: -80px; top: 50%; transform: translateY(-50%);
    width: 600px; height: 600px;
    border: 1.5px solid rgba(30,95,191,0.15); border-radius: 50%;
    box-shadow: 0 0 0 80px rgba(30,95,191,0.05), 0 0 0 160px rgba(30,95,191,0.025);
    pointer-events: none;
}
.hero-content { max-width: 680px; position: relative; z-index: 2; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(30,95,191,0.1); border: 1px solid rgba(30,95,191,0.25);
    color: var(--accent); font-size: 11.5px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 6px 14px; border-radius: 20px; margin-bottom: 28px;
}
.hero-badge::before { content: '●'; font-size: 7px; animation: mgrs-pulse 2s infinite; }
@keyframes mgrs-pulse { 0%,100%{opacity:1}50%{opacity:0.3} }

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 4.5vw, 64px);
    font-weight: 900; line-height: 1.08;
    color: var(--navy); margin-bottom: 22px; letter-spacing: -1.5px;
}
.hero h1 em { font-style: normal; color: var(--accent-light); }
.hero p {
    font-size: 17.5px; line-height: 1.7; color: var(--text-muted);
    max-width: 560px; margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
    display: flex; gap: 44px; margin-top: 52px;
    padding-top: 32px; border-top: 1px solid rgba(19,46,92,0.12);
}
.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 32px; font-weight: 700; color: var(--navy);
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── SERVIZI ─── */
.services-section { background: var(--lighter); }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.service-card {
    background: white; padding: 52px 48px;
    position: relative; overflow: hidden; transition: box-shadow 0.3s;
}
.service-card:hover { box-shadow: 0 20px 60px rgba(19,46,92,0.1); z-index: 2; }
.service-card.it  { border-top: 4px solid var(--accent-light); }
.service-card.energy { border-top: 4px solid var(--energy-green); }
.service-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 22px;
}
.it .service-icon     { background: rgba(59,130,246,0.1); }
.energy .service-icon { background: rgba(5,150,105,0.1); }
.service-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px; font-weight: 700; color: var(--navy); margin-bottom: 12px;
}
.service-card p  { font-size: 15px; line-height: 1.7; color: var(--text-muted); margin-bottom: 24px; }
.service-features { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 28px; }
.service-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--text); }
.service-features li::before { content: '→'; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.it .service-features li::before     { color: var(--accent-light); }
.energy .service-features li::before { color: var(--energy-green); }
.service-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; transition: gap 0.2s; }
.it .service-link     { color: var(--accent); }
.energy .service-link { color: var(--energy-green); }
.service-link:hover   { gap: 14px; }

/* ─── PERCHÉ SCEGLIERCI ─── */
.why-section { background: var(--navy); padding: 90px 60px; }
.why-section .section-title { color: white; }
.why-section .section-sub   { color: var(--silver); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px; padding: 32px 28px; transition: all 0.3s;
}
.why-card:hover { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); }
.why-num {
    font-family: 'Playfair Display', serif;
    font-size: 42px; font-weight: 900; color: rgba(59,130,246,0.2); line-height: 1; margin-bottom: 12px;
}
.why-card h4 { font-size: 16px; font-weight: 600; color: white; margin-bottom: 8px; }
.why-card p  { font-size: 14px; line-height: 1.65; color: var(--silver); }

/* ─── IT HERO ─── */
.it-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-mid) 100%);
    padding: 120px 60px 72px; color: white; position: relative; overflow: hidden;
}
.it-hero::before {
    content: ''; position: absolute; bottom: -20%; left: -5%;
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 60%);
    pointer-events: none;
}
.it-hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 3.8vw, 56px); font-weight: 900;
    line-height: 1.1; letter-spacing: -1px; margin-bottom: 18px;
    position: relative; z-index: 1;
}
.it-hero h2 em { font-style: normal; color: #93C5FD; }
.it-hero p { font-size: 17px; color: rgba(255,255,255,0.72); max-width: 540px; line-height: 1.7; position: relative; z-index: 1; }

.it-solutions {
    background: white; padding: 72px 60px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.solution-card {
    border: 1px solid var(--border); border-radius: 12px;
    padding: 28px 24px; transition: box-shadow 0.3s; position: relative; overflow: hidden;
}
.solution-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent-light); transform: scaleX(0); transition: transform 0.3s; transform-origin: left;
}
.solution-card:hover { box-shadow: 0 10px 36px rgba(19,46,92,0.1); }
.solution-card:hover::before { transform: scaleX(1); }
.solution-card h4 { font-size: 15.5px; font-weight: 600; color: var(--navy); margin: 12px 0 8px; }
.solution-card p  { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }
.sol-icon { font-size: 26px; }

/* Strip CTA */
.cta-strip {
    background: var(--lighter); padding: 60px;
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
    flex-wrap: wrap;
}
.cta-strip p { font-size: 18px; font-weight: 500; color: var(--navy); }

/* ─── ENERGY HERO ─── */
.energy-hero {
    background: linear-gradient(135deg, #022C22 0%, #065F46 50%, #0D9488 100%);
    padding: 120px 60px 72px; color: white; position: relative; overflow: hidden;
}
.energy-hero::before {
    content: ''; position: absolute; top: -50%; right: -10%;
    width: 550px; height: 550px;
    background: radial-gradient(circle, rgba(13,148,136,0.3) 0%, transparent 60%);
    pointer-events: none;
}
.energy-hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 3.8vw, 56px); font-weight: 900;
    line-height: 1.1; letter-spacing: -1px; margin-bottom: 18px;
    position: relative; z-index: 1;
}
.energy-hero h2 em { font-style: normal; color: #6EE7B7; }
.energy-hero p { font-size: 17px; color: rgba(255,255,255,0.72); max-width: 540px; line-height: 1.7; position: relative; z-index: 1; }

.energy-process {
    background: var(--lighter); padding: 72px 60px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
    border-top: 3px solid var(--energy-teal);
}
.process-step { padding: 28px 24px; position: relative; }
.process-step:not(:last-child)::after {
    content: '→'; position: absolute; right: -10px; top: 40px;
    font-size: 18px; color: var(--energy-teal); z-index: 1;
}
.step-num {
    font-family: 'Playfair Display', serif;
    font-size: 38px; font-weight: 900; color: rgba(13,148,136,0.2); line-height: 1; margin-bottom: 8px;
}
.process-step h4 { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
.process-step p  { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

/* ─── CHI SIAMO ─── */
.about-section {
    background: white;
    display: grid; grid-template-columns: 1fr 1fr; gap: 70px;
    align-items: center; padding: 90px 60px;
}
.about-visual {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-mid) 100%);
    border-radius: 14px; padding: 50px 42px;
    display: flex; flex-direction: column; gap: 22px;
}
.about-metric { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 18px; }
.about-metric:last-child { border-bottom: none; padding-bottom: 0; }
.about-metric-num { font-family: 'Playfair Display', serif; font-size: 38px; font-weight: 700; color: white; line-height: 1; }
.about-metric-label { font-size: 13px; color: var(--silver); margin-top: 4px; }
.about-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 36px; font-weight: 700; color: var(--navy);
    line-height: 1.15; letter-spacing: -0.7px; margin-bottom: 16px;
}
.about-text p { font-size: 15.5px; line-height: 1.75; color: var(--text-muted); margin-bottom: 12px; }
.about-wp-content { margin-top: 16px; font-size: 15.5px; line-height: 1.75; color: var(--text-muted); }
.values-list { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.value-item { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; color: var(--text); }
.value-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-light); flex-shrink: 0; }

/* ─── CONTATTI ─── */
.contact-section {
    background: var(--navy);
    display: grid; grid-template-columns: 1fr 1fr; gap: 70px;
    align-items: start; padding: 90px 60px;
}
.contact-info .section-title { color: white; }
.contact-info .section-sub   { color: var(--silver); margin-bottom: 40px; }
.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item  { display: flex; align-items: flex-start; gap: 14px; }
.contact-item-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
}
.contact-item-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--silver); margin-bottom: 3px; }
.contact-item-value { font-size: 15px; color: white; font-weight: 500; }
.contact-form-wrap {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px; padding: 38px 34px;
}
.contact-form-wrap h3 { font-family: 'Playfair Display', serif; font-size: 22px; color: white; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--silver); display: block; margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 7px;
    padding: 12px 14px; font-size: 14px; color: white;
    font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.2s;
    -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.28); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent-light); }
.form-group select { color: rgba(255,255,255,0.5); cursor: pointer; }
.form-group select option { background: var(--navy); color: white; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btn-submit {
    width: 100%; background: var(--accent-light); color: white;
    border: none; padding: 14px; border-radius: 7px;
    font-size: 14.5px; font-weight: 600; cursor: pointer;
    font-family: 'DM Sans', sans-serif; transition: background 0.2s; margin-top: 6px;
}
.btn-submit:hover    { background: var(--blue-mid); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Form response messages */
#mgrs-form-response {
    padding: 12px 16px; border-radius: 7px; margin-bottom: 20px; font-size: 14px;
}
#mgrs-form-response.success { background: rgba(5,150,105,0.2); color: #6EE7B7; border: 1px solid rgba(5,150,105,0.4); }
#mgrs-form-response.error   { background: rgba(239,68,68,0.2); color: #FCA5A5; border: 1px solid rgba(239,68,68,0.4); }

/* ─── FOOTER ─── */
#mgrs-footer {
    background: #080F1C; padding: 34px 60px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-logo img { height: 34px; width: auto; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--steel); transition: color 0.2s; }
.footer-links a:hover { color: var(--silver); }
.footer-copy { font-size: 12px; color: var(--steel); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .services-grid   { grid-template-columns: 1fr; }
    .why-grid        { grid-template-columns: 1fr 1fr; }
    .it-solutions    { grid-template-columns: 1fr 1fr; }
    .energy-process  { grid-template-columns: 1fr 1fr; gap: 24px; }
    .process-step:not(:last-child)::after { display: none; }
    .about-section   { grid-template-columns: 1fr; }
    .contact-section { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    #mgrs-nav { padding: 0 24px; }
    .nav-links, .nav-cta { display: none; }
    .nav-hamburger { display: flex; }

    /* Menu mobile aperto */
    #mgrs-nav.menu-open .nav-links {
        display: flex; flex-direction: column; gap: 0;
        position: fixed; top: 70px; left: 0; right: 0;
        background: white; border-bottom: 1px solid var(--border);
        padding: 16px 0; box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    }
    #mgrs-nav.menu-open .nav-links li a { display: block; padding: 12px 24px; font-size: 15px; }
    #mgrs-nav.menu-open .nav-cta {
        display: block; margin: 8px 24px 16px; text-align: center;
    }

    .hero { padding: 100px 24px 60px; min-height: auto; }
    .hero::after { display: none; }
    .hero-stats { flex-wrap: wrap; gap: 24px; }

    .service-card  { padding: 36px 28px; }
    .why-grid      { grid-template-columns: 1fr; }
    .it-hero, .energy-hero { padding: 100px 24px 56px; }
    .it-solutions  { padding: 48px 24px; grid-template-columns: 1fr; }
    .energy-process { padding: 48px 24px; grid-template-columns: 1fr; }
    .about-section  { padding: 60px 24px; gap: 40px; }
    .contact-section { padding: 70px 24px; }
    .why-section    { padding: 64px 24px; }
    .cta-strip      { padding: 40px 24px; flex-direction: column; text-align: center; }
    #mgrs-footer    { padding: 28px 24px; flex-direction: column; text-align: center; }
    .form-row       { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1   { font-size: 36px; }
    .it-hero h2, .energy-hero h2 { font-size: 30px; }
    .section-title { font-size: 28px; }
}
