/* Italian Tech Blog Theme 
    Vibe: Elegant, Sophisticated, Editorial, Warm but Intellectual.
*/

:root {
  /* Palette: Deep Tuscan Green, Creamy Off-White, warm Gold/Bronze accent */
  --color-primary: #004d40; /* Deep Teal/Green */
  --color-primary-dark: #00382e;
  --color-secondary: #c5a572; /* Gold/Bronze accent */
  --color-secondary-hover: #b09060;

  --color-bg-main: #ffffff;
  --color-bg-cream: #f4f1ea; /* Warm off-white */
  --color-bg-dark: #1a202c;

  --color-text-main: #2d3748;
  --color-text-muted: #718096;
  --color-border: #e2e8f0;
  --color-border-gold: rgba(197, 165, 114, 0.5);

  /* Typography - Mixing Serif for editorial feel and Sans for UI */
  --font-serif: "Merriweather", "Georgia", serif;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.12);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --transition: all 0.3s ease-in-out;
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-main);
  color: var(--color-text-main);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Utility Classes */
.section {
  padding: 100px 0;
}

.bg-cream {
  background-color: var(--color-bg-cream);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}

.section-header {
  max-width: 760px;
  margin: 0 auto 60px;
}

.section-subtitle {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-secondary);
  margin-bottom: 16px;
  font-weight: 600;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.section-paragraph {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  font-family: var(--font-serif);
}

/* Buttons (Editorial Style) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 2px; /* Sharper corners for editorial feel */
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

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

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

.btn-sm {
  padding: 10px 24px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-gold);
  z-index: 1000;
  padding: 15px 0;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-primary);
}

.brand-logo {
  width: 40px;
  height: 40px;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-main);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link:hover::after {
  width: 100%;
}

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

.btn-burger,
.btn-close,
.mobile-nav-header {
  display: none;
}

/* Hero Section (Editorial Layout) */
.hero {
  padding: 180px 0 100px;
  background: linear-gradient(to right, #ffffff 50%, var(--color-bg-cream) 50%);
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 32px;
  color: var(--color-primary);
}

.hero-paragraph {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-family: var(--font-serif);
  line-height: 1.8;
}

.hero-visual {
  position: relative;
}

.hero-img {
  box-shadow: var(--shadow-lg);
  border-radius: 2px; /* Sharper editorial look */
  z-index: 1;
  position: relative;
}

.editorial-caption {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  text-align: right;
  border-right: 3px solid var(--color-secondary);
  padding-right: 16px;
}

/* Spectrum Section (Cards) */
.spectrum-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.spectrum-card {
  background: #ffffff;
  padding: 40px 32px;
  border: 1px solid var(--color-border);
  transition: var(--transition);
  position: relative;
}

.spectrum-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.spectrum-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.spectrum-card:hover::before {
  transform: scaleX(1);
}

.spectrum-card.highlight {
  border-color: var(--color-secondary);
  background: #fffcf5;
}

.spectrum-card.highlight::before {
  background: var(--color-secondary);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: var(--color-bg-cream);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  margin-bottom: 24px;
}

.spectrum-card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.card-desc {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* Split Layout (Deep Dive) */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.split-visual {
  position: relative;
}

.split-visual img {
  box-shadow: var(--shadow-lg);
  border-radius: 2px;
}

.visual-note {
  position: absolute;
  bottom: -30px;
  right: -30px;
  background: var(--color-primary);
  color: #fff;
  padding: 20px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  max-width: 300px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--color-secondary);
}

/* Italy Context Grid */
.italy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.italy-card {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  height: 400px;
  box-shadow: var(--shadow-md);
}

.italy-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.italy-card:hover img {
  transform: scale(1.05);
}

.italy-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  background: linear-gradient(to top, rgba(0, 40, 33, 0.9), transparent);
  color: #fff;
}

.italy-card-content h3 {
  color: #fff;
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.italy-card-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* FAQ Accordion (Blog Style) */
.faq-container {
  max-width: 800px;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.accordion-item.article-style {
  background: transparent;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 16px 0;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition);
}

.accordion-trigger:hover {
  color: var(--color-secondary);
}

.accordion-trigger i {
  color: var(--color-secondary);
  transition: transform 0.4s ease;
}

.accordion-item.active .accordion-trigger i {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-item.active .accordion-panel {
  padding: 16px 0 24px;
}

.accordion-panel p {
  color: var(--color-text-main);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.8;
}

/* Contact Section & Form (Column strictly) */
.contact-section {
  position: relative;
}

.contact-container {
  max-width: 600px; /* Restricted width for column look */
}

.form-wrapper.column-layout {
  background: #ffffff;
  padding: 50px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--color-secondary);
  border-radius: 2px;
}

.blog-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 16px;
  color: var(--color-secondary);
  width: 20px;
  height: 20px;
}

.input-wrapper input {
  width: 100%;
  padding: 16px 16px 16px 50px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-cream);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text-main);
  transition: var(--transition);
  border-radius: 2px;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--color-secondary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.2);
}

.captcha-group {
  padding-top: 20px;
  border-top: 1px dashed var(--color-border);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkbox-group input {
  margin-top: 5px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.wrap-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  cursor: pointer;
  white-space: normal;
  font-family: var(--font-sans);
}

.wrap-label a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-secondary);
  font-weight: 600;
}

/* Footer (Magazine Style) */
.footer {
  background-color: var(--color-bg-dark);
  color: #ffffff;
  padding: 100px 0 40px;
  font-family: var(--font-sans);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 80px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 60px;
}

.footer-logo-svg {
  color: var(--color-secondary);
}

.footer-brand-col .brand-name {
  color: #ffffff;
}

.footer-desc {
  color: #a0aec0;
  margin-top: 24px;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 400px;
}

.footer h4 {
  color: #ffffff;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1rem;
  margin-bottom: 24px;
}

.footer ul li {
  margin-bottom: 16px;
}

.footer a {
  color: #a0aec0;
  font-size: 1rem;
  transition: var(--transition);
}

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

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: #a0aec0;
}

.contact-list i {
  color: var(--color-secondary);
  margin-top: 4px;
}

.contact-link-highlight {
  color: var(--color-secondary) !important;
  font-weight: 600;
}

.footer-bottom {
  text-align: center;
  color: #718096;
  font-size: 0.9rem;
}

/* Cookie Popup (Elegant) */
.cookie-popup {
  position: fixed;
  bottom: -150%;
  left: 0;
  width: 100%;
  background: #ffffff;
  padding: 24px 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  transition: bottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 3px solid var(--color-secondary);
}

.cookie-popup.show {
  bottom: 0;
}

.cookie-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.cookie-icon {
  color: var(--color-secondary);
  width: 40px;
  height: 40px;
}

.cookie-text h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.cookie-text p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.cookie-text a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-secondary);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .hero {
    background: var(--color-bg-cream);
    padding-top: 140px;
  }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: left;
  }
  .hero-title {
    font-size: 3rem;
  }
  .hero-img {
    width: 100%;
  }
  .spectrum-grid,
  .italy-grid {
    grid-template-columns: 1fr 1fr;
  }
  .split-layout {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .visual-note {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 24px;
    max-width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .btn-burger {
    display: block;
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
  }
  .nav-btn {
    display: none;
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-bg-main);
    z-index: 1001;
    flex-direction: column;
    padding: 30px;
    transition: right 0.4s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    border-left: 3px solid var(--color-secondary);
  }

  .navbar.active {
    right: 0;
  }

  .mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
  }

  .mobile-brand {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--color-primary);
  }
  .btn-close {
    display: block;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
  }
  .nav-link {
    font-size: 1.2rem;
    font-family: var(--font-serif);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-paragraph {
    font-size: 1.1rem;
  }
  .section-title {
    font-size: 2rem;
  }

  .spectrum-grid,
  .italy-grid {
    grid-template-columns: 1fr;
  }
  .italy-card {
    height: 300px;
  }

  .form-wrapper.column-layout {
    padding: 30px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .cookie-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
  #btn-accept-cookie {
    width: 100%;
    margin-top: 20px;
  }
}

.pages {
  padding: 120px 0;
}

.pages-wrap {
  max-width: 1000px;
  padding: 0 20px;
  margin: 0 auto 20px;
}

.pages h1 {
  font-size: 40px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 40px;
  text-align: center;
}

.text-wrapper {
  background: #f8fafc;
  padding: 50px 40px;
  border-radius: 20px;
  line-height: 1.8;
}

.text-wrapper h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
  padding-bottom: 5px;
}

.text-wrapper h3 {
  color: #000000;
  margin-bottom: 20px;
}

.text-wrapper p {
  color: #64748b;
  margin-bottom: 20px;
}

.text-wrapper ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.text-wrapper ul li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 15px;
  color: #1e293b;
}

.text-wrapper ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--primary);
  top: 0;
}

.text-wrapper strong {
  color: var(--color-error);
}

.text-wrapper a {
  color: #001eff;
  text-decoration: underline;
  font-weight: 600;
}

.text-wrapper ol {
  display: flex;
  flex-direction: column;
  padding: 20px;
  color: #000000;
}

.margin {
  margin: 120px 0 50px;
  font-size: 40px;
}

@media (max-width: 768px) {
  .pages {
    padding: 100px 0 60px;
  }
  .pages h1 {
    font-size: 22px;
    margin-bottom: 30px;
  }
  h3 {
    font-size: 18px;
  }
  .text-wrapper {
    padding: 30px 20px;
  }
  .text-wrapper h2 {
    font-size: 24px;
    margin-top: 30px;
  }
  .margin {
    margin: 80px 0 30px;
    font-size: 28px;
  }
}

/* --- CONTACT PAGE SPECIFIC STYLES --- */
.contact-page-main {
  padding-top: 180px;
  padding-bottom: 120px;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cp-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: -2px;
  color: var(--accent);
  margin-bottom: 30px;
  line-height: 1;
}

.cp-divider {
  width: 60px;
  height: 1px;
  background-color: var(--accent);
  margin: 0 auto 40px auto;
}

.cp-status {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-muted);
  border: 1px solid var(--line);
  display: inline-block;
  padding: 10px 20px;
  margin-bottom: 60px;
  background: #fcfcfc;
}

.cp-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cp-label {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.cp-phone-link {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--accent);
  line-height: 1.2;
  border-bottom: 2px solid transparent;
  transition: 0.3s;
  margin-bottom: 40px;
}

.cp-phone-link:hover {
  border-bottom-color: var(--accent);
  opacity: 0.8;
}

.cp-address-box {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  width: 100%;
  max-width: 400px;
}

.cp-addr {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 10px;
}

.cp-email {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 1rem;
}

.cp-email a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

@media (max-width: 600px) {
  .contact-page-main {
    padding-top: 140px;
    text-align: center;
  }

  .cp-phone-link {
    font-size: 2rem;
  }
}
