/* ========================================
   L'artigiano Edile D'Alfonso Luigi
   Design System
======================================== */

:root {
  --red:    #C41E3A;
  --red-dk: #9E1530;
  --red-lt: #E8294A;
  --black:  #0A0A0A;
  --dark:   #111111;
  --dark2:  #1A1A1A;
  --grey:   #2D2D2D;
  --mid:    #6B7280;
  --light:  #F3F4F6;
  --white:  #FFFFFF;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.18);
  --transition: all .3s cubic-bezier(.4,0,.2,1);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background: var(--white); color: var(--black); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* CONTAINER */
.container { width: min(1200px, 92%); margin: 0 auto; }

/* ========== TYPOGRAPHY ========== */
.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
  padding: 4px 14px;
  background: rgba(196,30,58,.08);
  border-radius: 100px;
  border-left: 3px solid var(--red);
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--mid);
  max-width: 560px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  line-height: 1;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(196,30,58,.35);
}
.btn-primary:hover { background: var(--red-lt); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(196,30,58,.45); }

.btn-whatsapp { background: #25D366; color: var(--white); box-shadow: 0 4px 16px rgba(37,211,102,.3); }
.btn-whatsapp:hover { background: #20b557; transform: translateY(-2px); }

.btn-white { background: var(--white); color: var(--black); }
.btn-white:hover { background: var(--light); transform: translateY(-2px); }

.btn-dark { background: var(--dark2); color: var(--white); border: 1px solid var(--grey); }
.btn-dark:hover { background: var(--grey); transform: translateY(-2px); }

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: var(--transition);
}
.header.transparent { background: rgba(10,10,10,.6); backdrop-filter: blur(12px); }
.header.scrolled    { background: rgba(10,10,10,.95); box-shadow: 0 2px 20px rgba(0,0,0,.3); }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-img-wrap {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  padding: 3px;
  flex-shrink: 0;
}
.logo-img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.logo-tagline {
  font-size: .65rem;
  color: rgba(255,255,255,.55);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* NAV LINKS */
.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.1); }

/* NAV ACTIONS */
.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-cta {
  font-size: .85rem;
  padding: 10px 18px;
  white-space: nowrap;
}

/* LANG SWITCHER */
.lang-switcher { display: flex; gap: 4px; background: rgba(255,255,255,.08); border-radius: 8px; padding: 3px; }
.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: .06em;
}
.lang-btn.active { background: var(--red); color: var(--white); }
.lang-btn:hover:not(.active) { color: var(--white); }

/* HAMBURGER */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; border-radius: 2px; transition: var(--transition); }

/* MOBILE MENU */
.mobile-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 80px; left: 0; right: 0;
  background: rgba(10,10,10,.97);
  backdrop-filter: blur(16px);
  padding: 24px;
  gap: 4px;
  z-index: 999;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: rgba(255,255,255,.8);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 8px;
  transition: var(--transition);
}
.mobile-menu a:hover { background: rgba(255,255,255,.07); color: var(--white); }
.mobile-menu .mobile-phone { color: var(--red) !important; font-weight: 700; }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero.png');
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease-out;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(10,10,10,.80) 0%,
    rgba(10,10,10,.60) 50%,
    rgba(196,30,58,.25) 100%);
}
.hero-content { position: relative; z-index: 1; width: 100%; padding: 120px 0 80px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(196,30,58,.2);
  border: 1px solid rgba(196,30,58,.4);
  color: rgba(255,255,255,.9);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
  max-width: 700px;
}
.hero-title span { color: var(--red); }
.hero-description {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.85);
  font-weight: 600;
  font-size: .95rem;
}
.icon-circle {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.hero-scroll {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,.4);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,.5), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine { 0%,100%{opacity:.3;transform:scaleY(1)} 50%{opacity:1;transform:scaleY(1.3)} }

/* AOS animations */
[data-aos] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-aos].aos-visible { opacity: 1; transform: translateY(0); }

/* ========== STATS BAR ========== */
.stats-bar { background: var(--dark); padding: 40px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.stat-item {
  text-align: center;
  padding: 24px;
  border-right: 1px solid rgba(255,255,255,.08);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: .85rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .08em; }

/* ========== ABOUT ========== */
.about { padding: 100px 0; background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.about-image-wrap { position: relative; }
.about-image {
  width: 100%; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 4/5;
}
.about-badge {
  position: absolute;
  bottom: -20px; right: -20px;
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(196,30,58,.4);
}
.about-badge-num { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; line-height: 1; }
.about-badge-text { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; margin-top: 4px; }

.about-content .section-title { max-width: 480px; }
.about-features { margin: 32px 0; display: flex; flex-direction: column; gap: 20px; }
.feature-item { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon { font-size: 1.4rem; flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--light); border-radius: 10px; }
.feature-text h4 { font-weight: 700; font-size: .95rem; margin-bottom: 4px; color: var(--black); }
.feature-text p  { font-size: .85rem; color: var(--mid); line-height: 1.5; }
.about-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ========== SERVICES ========== */
.services { padding: 100px 0; background: var(--light); }
.services-header { text-align: center; margin-bottom: 56px; }
.services-header .section-subtitle { max-width: 580px; margin: 0 auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-image-wrap { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.service-image { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.service-card:hover .service-image { transform: scale(1.06); }
.service-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 12px;
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover .service-overlay { opacity: 1; }
.service-overlay-icon { font-size: 1.8rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }

.service-body { padding: 20px; }
.service-number { font-size: .7rem; font-weight: 800; color: var(--red); letter-spacing: .12em; margin-bottom: 6px; }
.service-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--black); margin-bottom: 8px; }
.service-desc { font-size: .82rem; color: var(--mid); line-height: 1.6; margin-bottom: 14px; }
.service-link { font-size: .8rem; font-weight: 700; color: var(--red); letter-spacing: .03em; transition: var(--transition); }
.service-link:hover { color: var(--red-lt); }

/* ========== CTA BANNER ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--dark) 0%, var(--red-dk) 100%);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../images/hero.png') center/cover;
  opacity: .08;
}
.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-text h2 { font-family: var(--font-heading); font-size: clamp(1.6rem,3.5vw,2.2rem); color: var(--white); margin-bottom: 10px; }
.cta-text p  { color: rgba(255,255,255,.7); font-size: 1rem; max-width: 480px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ========== GALLERY ========== */
.gallery { padding: 100px 0; background: var(--white); }
.gallery-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 48px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 16px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: pointer;
  background: var(--light);
}
.gallery-item img { width: 100%; height: 260px; object-fit: cover; transition: transform .5s ease; display: block; }
.gallery-item.featured { grid-row: span 2; }
.gallery-item.featured img { height: 536px; }
.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 50%, transparent 100%);
  opacity: 0; transition: var(--transition);
  display: flex; align-items: flex-end; padding: 20px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay-text h4 { color: var(--white); font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 4px; }
.gallery-overlay-text span { font-size: .75rem; color: rgba(255,255,255,.7); }

/* ========== CONTACT ========== */
.contact { padding: 100px 0; background: var(--light); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.contact-grid .section-subtitle { max-width: 400px; }

.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; align-items: center; gap: 16px; }
.contact-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.contact-item-text h4 { font-weight: 700; font-size: .9rem; color: var(--black); margin-bottom: 3px; }
.contact-item-text a,
.contact-item-text p { font-size: .9rem; color: var(--mid); }
.contact-item-text a:hover { color: var(--red); }

/* FORM */
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}
.contact-form-wrap h3 { font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: 4px; }
.form-subtitle { font-size: .85rem; color: var(--mid); margin-bottom: 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .82rem; font-weight: 600; color: var(--black); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font-body);
  background: var(--light);
  color: var(--black);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--red); background: var(--white); box-shadow: 0 0 0 3px rgba(196,30,58,.1); }
.form-group textarea { min-height: 110px; resize: vertical; }
.form-group select { cursor: pointer; }

.form-success {
  display: none;
  margin-top: 16px;
  padding: 14px;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--radius);
  font-size: .9rem;
  color: #16a34a;
  font-weight: 600;
}

/* MAP */
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 400px; border: none; display: block; }

/* ========== FOOTER ========== */
.footer { background: var(--dark); padding: 72px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-logo { margin-bottom: 16px; }
.footer-logo-img {
  height: 56px;
  width: auto;
  background: var(--white);
  border-radius: 8px;
  padding: 4px 8px;
  object-fit: contain;
}
.footer-desc { font-size: .87rem; color: rgba(255,255,255,.45); line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.07);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}
.social-btn:hover { background: var(--red); }

.footer-col h4 { font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--white); margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: .87rem; color: rgba(255,255,255,.45); transition: var(--transition); }
.footer-links a:hover { color: var(--red); padding-left: 4px; }

.footer-contact-item { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; color: rgba(255,255,255,.45); font-size: .85rem; }
.footer-contact-item span:first-child { font-size: 1rem; flex-shrink: 0; }
.footer-contact-item a:hover { color: var(--red); }

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.3); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: .8rem; color: rgba(255,255,255,.3); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.6); }

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-float {
  position: fixed;
  bottom: 28px; right: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 500;
}
.whatsapp-label {
  background: var(--dark);
  color: var(--white);
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.whatsapp-float:hover .whatsapp-label { opacity: 1; transform: translateX(0); }
.whatsapp-btn {
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  animation: pulse-wa 2.5s infinite;
  flex-shrink: 0;
}
.whatsapp-btn:hover { background: #20b557; transform: scale(1.1); animation: none; }
@keyframes pulse-wa {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.4); }
  50%      { box-shadow: 0 4px 32px rgba(37,211,102,.7), 0 0 0 12px rgba(37,211,102,.1); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: block; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  .about-grid   { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery-header { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .stats-grid   { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item.featured { grid-column: span 2; grid-row: span 1; }
  .gallery-item.featured img { height: 260px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-actions { justify-content: center; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid  { grid-template-columns: 1fr; }
  .gallery-item.featured { grid-column: 1; }
  .hero-actions  { flex-direction: column; align-items: flex-start; }
  .stats-grid    { grid-template-columns: 1fr 1fr; }
  .about-badge   { bottom: -10px; right: -10px; }
  .whatsapp-float { bottom: 16px; right: 16px; }
  .contact-form-wrap { padding: 24px 16px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
