/*
Theme Name: Cuni Roland
Description: Tema su misura per il sito aziendale di Cuni Roland (impresa edile).
Author: Cuni Roland
Version: 1.0
Text Domain: cuniroland
*/

:root {
  --color-navy: #454b52;
  --color-primary: #4caf50;
  --color-primary-dark: #3d8b40;
  --color-primary-soft: #eaf5ea;
  --color-text: #2b2f33;
  --color-text-muted: #6b7280;
  --color-border: #e2e5e8;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8f9;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--color-primary-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-logo img { height: 44px; width: auto; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 15px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  margin: 5px 0;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    width: 100%;
    border-top: 1px solid var(--color-border);
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }
  .main-nav a { display: block; padding: 10px 0; }
  .site-header .container { flex-wrap: wrap; }
}

/* --- Hero --- */
.hero {
  background: var(--color-navy);
  color: white;
  padding: 80px 0 90px;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 18px;
  max-width: 640px;
}

.hero p {
  font-size: 18px;
  color: #d7dade;
  max-width: 560px;
  margin: 0 0 30px;
}

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  font-size: 15px;
}
.btn:hover { background: var(--color-primary-dark); color: white; }

.btn-outline {
  display: inline-block;
  border: 2px solid white;
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 3px;
  font-size: 15px;
  margin-left: 12px;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* --- Sections --- */
.section { padding: 70px 0; }
.section-alt { background: var(--color-bg-alt); }

.section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-header .eyebrow {
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.section-header h2 { font-size: 30px; margin: 8px 0 12px; }
.section-header p { color: var(--color-text-muted); font-size: 16px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 28px;
  background: var(--color-bg);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--color-text-muted); font-size: 14.5px; }

.stats-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 24px;
  text-align: center;
}
.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-primary-dark);
}
.stat-label {
  color: var(--color-text-muted);
  font-size: 14px;
}

.cta-band {
  background: var(--color-primary);
  color: white;
  text-align: center;
  padding: 56px 0;
}
.cta-band h2 { margin: 0 0 10px; font-size: 26px; }
.cta-band p { margin: 0 0 24px; color: rgba(255,255,255,0.9); }
.cta-band .btn { background: white; color: var(--color-primary-dark); }
.cta-band .btn:hover { background: var(--color-primary-soft); }

/* --- Generic page content (Chi siamo, Servizi, ecc.) --- */
.page-hero {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: 46px 0;
}
.page-hero h1 { margin: 0; font-size: 32px; }

.page-content { padding: 56px 0; }
.page-content .container { max-width: 780px; }
.page-content h2 { margin-top: 40px; }
.page-content p { color: var(--color-text); }

/* --- Contatti --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
@media (max-width: 780px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-info h3 { margin-top: 0; }
.contact-info ul { list-style: none; padding: 0; margin: 0; }
.contact-info li { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.contact-info li strong { display: block; font-size: 13px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { font-weight: 600; font-size: 14px; margin-bottom: 6px; display: block; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.contact-form .hp-field { position: absolute; left: -9999px; }
.form-msg { padding: 12px 14px; border-radius: 4px; font-size: 14px; margin-top: 4px; }
.form-msg.success { background: var(--color-primary-soft); color: var(--color-primary-dark); }
.form-msg.error { background: #fdeaea; color: #b3261e; }

/* --- Footer --- */
.site-footer {
  background: var(--color-navy);
  color: #cfd3d7;
  padding: 44px 0 24px;
  margin-top: 40px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
@media (max-width: 700px) {
  .footer-cols { grid-template-columns: 1fr; }
}
.site-footer h4 { color: white; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 14px; }
.site-footer a { color: #cfd3d7; text-decoration: none; }
.site-footer a:hover { color: white; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: 14.5px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  font-size: 13px;
  color: #9aa0a6;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
