/* style.css */
:root {
  --color-primary: #0B1E35; /* Midnight blue */
  --color-secondary: #0f172a00; /* Ivory / Off-white */
  --color-text: #344f75; /* Dark grey */
  --color-accent: #d4af37; /* Discrete gold */
  --color-white: #ffffff;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-secondary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-primary);
  font-weight: 600;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition-speed) ease;
}

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

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

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  text-align: center;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  border-radius: 4px;
}

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

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

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

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

.header .container {
  max-width: 1400px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.logo span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text);
  font-family: var(--font-sans);
}

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 15px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-primary);
  cursor: pointer;
}

.header-btn {
  margin-left: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(5, 18, 32, 0.92) 0%, rgba(5, 18, 32, 0.78) 42%, rgba(5, 18, 32, 0.35) 100%),
    url("img/hero-legale.png");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  color: #ffffff;
}

.hero .container,
.hero-content {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 800px;
}

.hero h1,
.hero p {
  color: #ffffff;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 40px;
  color: #cbd5e1;
}

.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  flex-wrap: wrap;
}

.hero-trust {
  margin-top: 50px;
  display: flex;
  justify-content: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.hero-trust span {
  position: relative;
}

.hero-trust span:not(:last-child)::after {
  content: "•";
  position: absolute;
  right: -18px;
  color: var(--color-accent);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-bg {
  background-color: var(--color-white);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: var(--color-accent);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

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

/* Cards */
.card {
  background-color: var(--color-secondary);
  padding: 30px;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.05);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: var(--color-primary);
}

/* Dove Siamo Section */
.where-section {
  background-color: var(--color-white);
}

.where-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.where-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.office-entrance-photo {
  margin-top: 20px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 500px;
}

.map-frame {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Contact Form */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.form-message {
  margin-top: 20px;
  padding: 15px;
  background-color: #f1f5f9;
  border-left: 4px solid var(--color-primary);
  display: none;
}

/* Footer */
.footer {
  background-color: var(--color-primary);
  color: #cbd5e1;
  padding: 60px 0 30px;
  font-size: 0.9rem;
}

.footer h3 {
  color: var(--color-white);
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

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

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom-links {
  margin-top: 10px;
}

.footer-bottom-links a {
  color: #cbd5e1;
  margin: 0 10px;
  font-size: 0.85rem;
}

/* WhatsApp Float */
.wa-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.15);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.wa-float:hover {
  transform: scale(1.1);
  color: #FFF;
}

.wa-float svg {
  width: 35px;
  height: 35px;
  fill: currentColor;
}

/* Mobile Bottom Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-white);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 99;
}

.mobile-bottom-grid {
  display: flex;
  justify-content: space-between;
}

.mobile-bar-btn {
  flex: 1;
  text-align: center;
  padding: 12px 5px;
  font-size: 0.8rem;
  font-weight: 500;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mobile-bar-btn:last-child {
  border-right: none;
}

.mobile-bar-btn svg {
  width: 20px;
  height: 20px;
}

/* Content Pages */
.page-header {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 60px 0;
  text-align: center;
}

.page-title {
  font-size: 2.2rem;
  color: var(--color-white);
}

.page-content {
  padding: 60px 0;
  max-width: 800px;
  margin: 0 auto;
}

.page-content p {
  margin-bottom: 20px;
}

.page-content ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.page-content li {
  margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 1200px) {
  .menu-toggle {
    display: block;
  }
  
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 20px;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.3s ease-out;
  }
  
  .nav.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 15px;
    text-align: center;
  }
  
  .header-btn {
    margin-left: 0;
    margin-top: 15px;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 90px 0;
    background:
      linear-gradient(rgba(5, 18, 32, 0.88), rgba(5, 18, 32, 0.88)),
      url("img/hero-legale.png");
    background-size: cover;
    background-position: center;
  }
  
  .hero .container, 
  .hero-content {
    text-align: center;
  }
  
  .hero-actions, 
  .hero-trust {
    justify-content: center;
  }

  .grid-2, .where-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-trust {
    flex-direction: column;
    gap: 10px;
  }
  
  .hero-trust span::after {
    display: none;
  }
  
  .wa-float {
    display: none; /* Hide float on mobile, use bottom bar */
  }
  
  .mobile-bottom-bar {
    display: block;
  }
  
  body {
    padding-bottom: 60px; /* Space for bottom bar */
  }
}

.hidden { display: none; }

