/* ==========================================================================
   RHINOVA - STYLESHEET PRINCIPALE (OTTIMIZZATO)
   Palette Colori Ufficiale:
   - Primary Header & Text: #1F4068
   - Secondary Icons & Links: #0082C8
   - Accent CTA Buttons: #F8C300
   - Accent Text/Dark: #1F4068
   - Text Main Body: #2C3E50 (Migliorato per il contrasto)
   - Text Muted: #4A5568 (Migliorato per la leggibilità)
   ========================================================================== */

:root {
  --primary: #1F4068;
  --secondary: #0082C8;
  --accent: #F8C300;
  --accent-hover: #F48220;
  --bg-light: #F8F9FA;
  --dark: #1A1D20;
  --text-main: #2C3E50;
  --text-muted: #4A5568;
  --white: #FFFFFF;
  --gray-border: #CBD5E1;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --transition: all 0.3s ease;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- HEADER & NAVIGATION --- */
header {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
}

.logo img {
  height: 50px;
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--secondary);
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-weight: 700;
  border-radius: 6px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
}

/* Testo scuro sul pulsante giallo per garantire contrasto WCAG AAA */
.btn-primary {
  background-color: var(--accent);
  color: #1F4068;
}

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

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

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

/* --- HERO SECTION --- */
.hero {
  background: linear-gradient(rgba(31, 64, 104, 0.65), rgba(31, 64, 104, 0.65)), url('genova 3.jpg') no-repeat center center/cover;
  color: #fff;
  padding: 120px 0 100px;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero p {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* --- PAGE HEADERS --- */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

/* --- SECTIONS & HEADINGS --- */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  width: 60px;
  height: 4px;
  background-color: var(--accent);
  display: block;
  margin: 0.8rem auto 0;
  border-radius: 2px;
}

/* --- GRID LAYOUTS --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* --- CARDS & BOXES --- */
.card {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-top: 4px solid var(--secondary);
}

.card:hover {
  transform: translateY(-5px);
  border-top-color: var(--accent-hover);
}

.card h3 {
  color: var(--primary);
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

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

.sector-card {
  background: var(--primary);
  color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.sector-card:hover {
  background: var(--secondary);
  transform: scale(1.03);
}

/* --- FORMS --- */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--gray-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  transition: var(--transition);
}

/* Focus stato ben evidenziato */
.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0, 130, 200, 0.2);
}

/* --- FOOTER UNIFORMATO --- */
footer {
  background-color: var(--dark);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--accent);
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}

.footer-col p {
  color: #94A3B8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-links a,
.footer-col a {
  display: block;
  color: #94A3B8;
  margin-bottom: 0.6rem;
  transition: var(--transition);
  font-size: 0.95rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  color: #94A3B8;
  font-size: 0.9rem;
}

/* --- MAPPA CONTENITORE --- */
.map-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 15px;
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

.map-container small {
  display: block;
  margin-top: 8px;
  text-align: right;
  font-size: 13px;
}

.map-container small a {
  color: var(--secondary);
  text-decoration: none;
}

.map-container small a:hover {
  text-decoration: underline;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .grid-2, .grid-3, .grid-4, .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero-btns {
    flex-direction: column;
  }
}