/* =============================================
   ELENA FERRARI — REDESIGN 2025
   Override stylesheet (loaded last via handlers/css.php)
   ============================================= */

/* === CSS Variables === */
:root {
  --ef-navy:       #1e2d45;
  --ef-gold:       #c4a46b;
  --ef-gold-light: #d4b880;
  --ef-cream:      #f5f2ec;
  --ef-white:      #ffffff;
  --ef-text:       #2c2c2c;
  --ef-muted:      #6b7280;
  --ef-border:     #e8e4dc;
  --ef-radius-sm:  8px;
  --ef-radius-md:  16px;
  --ef-radius-lg:  32px;
}

/* === Body & Base === */
body {
  background: var(--ef-cream) !important;
  color: var(--ef-text) !important;
  font-family: 'Barlow', sans-serif !important;
}

/* Hide old pi-header (replaced inline in index.php) */
.pi-header { display: none !important; }

/* Reset old framework padding on wrappers we no longer use */
#pi-all { background: var(--ef-cream) !important; }

/* =============================================
   HEADER
   ============================================= */
.ef-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--ef-navy);
  padding: 0 48px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 16px rgba(30,45,69,0.18);
}

.ef-header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  flex-shrink: 0;
}

.ef-header-logo-icon { width: 38px; height: 38px; flex-shrink: 0; }

.ef-header-logo-text {
  font-size: 0.98em;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.005em;
  line-height: 1.3;
  white-space: nowrap;
}

.ef-header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}

.ef-header-nav li a {
  color: rgba(255,255,255,0.78);
  text-decoration: none !important;
  font-size: 0.90em;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  display: block;
}

.ef-header-nav li a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.10);
}

.ef-header-nav li.ef-nav-cta a {
  background: var(--ef-gold);
  color: var(--ef-navy) !important;
  font-weight: 600;
  padding: 7px 20px;
  margin-left: 6px;
  border-radius: 20px;
}

.ef-header-nav li.ef-nav-cta a:hover {
  background: var(--ef-gold-light);
  color: var(--ef-navy) !important;
}

/* Mobile toggle */
.ef-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #fff;
  line-height: 1;
}

/* Mobile dropdown menu */
.ef-mobile-menu {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: var(--ef-navy);
  z-index: 999;
  padding: 8px 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.20);
}

.ef-mobile-menu.open { display: block; }

.ef-mobile-menu ul { list-style: none; margin: 0; padding: 0; }

.ef-mobile-menu ul li { border-bottom: 1px solid rgba(255,255,255,0.07); }

.ef-mobile-menu ul li a {
  display: block;
  padding: 13px 8px;
  color: rgba(255,255,255,0.85);
  text-decoration: none !important;
  font-size: 0.97em;
  font-weight: 500;
  transition: color 0.2s;
}

.ef-mobile-menu ul li a:hover { color: var(--ef-gold); }

@media (max-width: 960px) {
  .ef-header-nav  { display: none; }
  .ef-mobile-toggle { display: flex; align-items: center; }
  .ef-header { padding: 0 20px; }
  .ef-header-logo-text { font-size: 0.88em; }
}

/* =============================================
   HERO
   ============================================= */
.ef-hero {
  margin-top: 70px;
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ef-navy);
}

.ef-hero-img {
  position: absolute;
  inset: 0; z-index: 0;
}

.ef-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.ef-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(20, 35, 55, 0.52);
}

.ef-hero-content {
  position: relative; z-index: 2;
  max-width: 600px;
  padding: 80px 60px;
}

.ef-hero-content-center {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 80px 40px;
}

.ef-hero-badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--ef-gold);
  color: var(--ef-navy);
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border-radius: 20px;
  margin-bottom: 20px;
}

.ef-hero-tagline {
  font-size: 2.8em;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}

.ef-hero-sub {
  font-size: 1.05em;
  color: rgba(255,255,255,0.82);
  line-height: 1.72;
  margin: 0 0 32px;
}

.ef-hero-sub em { font-style: italic; opacity: 0.85; }

.ef-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.ef-hero-cta-center { justify-content: center; }

/* Buttons */
.ef-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 50px;
  font-size: 0.90em;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.22s ease;
  font-family: inherit;
  line-height: 1;
}

.ef-btn-gold {
  background: var(--ef-gold);
  color: var(--ef-navy) !important;
  border-color: var(--ef-gold);
}
.ef-btn-gold:hover {
  background: var(--ef-gold-light);
  border-color: var(--ef-gold-light);
  color: var(--ef-navy) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196,164,107,0.40);
}

.ef-btn-outline {
  background: transparent;
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.55);
}
.ef-btn-outline:hover {
  background: rgba(255,255,255,0.12);
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.90);
}

.ef-btn-wa {
  background: #25D366;
  color: #ffffff !important;
  border-color: #25D366;
}
.ef-btn-wa:hover {
  background: #1db855;
  border-color: #1db855;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,0.35);
}

.ef-btn-navy {
  background: var(--ef-navy);
  color: #ffffff !important;
  border-color: var(--ef-navy);
}
.ef-btn-navy:hover {
  background: #253759;
  border-color: #253759;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,45,69,0.30);
}

@media (max-width: 960px) {
  .ef-hero { min-height: 70vh; }
  .ef-hero-content { padding: 60px 32px; }
  .ef-hero-tagline { font-size: 2.1em; }
}

@media (max-width: 600px) {
  .ef-hero { min-height: auto; padding-bottom: 0; }
  .ef-hero-content { padding: 52px 20px 48px; }
  .ef-hero-tagline { font-size: 1.75em; }
  .ef-hero-overlay {
    background: linear-gradient(180deg, rgba(30,45,69,0.85) 0%, rgba(30,45,69,0.65) 100%);
  }
}

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.ef-section {
  padding: 90px 0;
}

.ef-section-sm { padding: 60px 0; }

.ef-section-cream  { background: var(--ef-cream); }
.ef-section-white  { background: var(--ef-white); }
.ef-section-navy   { background: var(--ef-navy); color: rgba(255,255,255,0.88); position: relative; overflow: hidden; }

/* Subtle texture overlay on navy sections */
.ef-section-navy::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../img/cover-overlay.png');
  background-size: cover;
  background-position: center;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.ef-section-navy > .ef-container { position: relative; z-index: 1; }

.ef-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 44px;
}

@media (max-width: 768px) {
  .ef-container { padding: 0 20px; }
  .ef-section    { padding: 64px 0; }
  .ef-section-sm { padding: 44px 0; }
}

/* Section typography */
.ef-label {
  display: block;
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ef-gold);
  margin-bottom: 10px;
}

.ef-title {
  font-size: 2.1em;
  font-weight: 700;
  color: var(--ef-navy);
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.ef-title-white { color: #ffffff !important; }

.ef-body {
  font-size: 1.0em;
  line-height: 1.76;
  color: var(--ef-muted);
}

.ef-body-white { color: rgba(255,255,255,0.80) !important; }

/* =============================================
   SERVICE CARDS
   ============================================= */
.ef-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
}

.ef-service-card {
  background: var(--ef-white);
  border-radius: var(--ef-radius-md);
  padding: 34px 26px 30px;
  box-shadow: 0 2px 14px rgba(30,45,69,0.07);
  border: 1px solid var(--ef-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ef-service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(30,45,69,0.12);
}

.ef-service-icon {
  width: 60px; height: 60px;
  background: rgba(196,164,107,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.ef-service-icon i {
  font-size: 1.75em;
  color: var(--ef-gold);
}

.ef-service-card h4 {
  font-size: 1.02em;
  font-weight: 700;
  color: var(--ef-navy);
  margin: 0 0 10px;
  line-height: 1.35;
}

.ef-service-card p {
  font-size: 0.91em;
  color: var(--ef-muted);
  line-height: 1.72;
  margin: 0;
}

@media (max-width: 960px) { .ef-services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .ef-services-grid { grid-template-columns: 1fr; } }

/* =============================================
   ABOUT / CHI SONO
   ============================================= */
.ef-about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.ef-about-img img {
  width: 100%;
  display: block;
  border-radius: 14px 80px 14px 14px;
  box-shadow: 0 8px 32px rgba(30,45,69,0.12);
}

.ef-photo-circle {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(30,45,69,0.15);
}

.ef-photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  border-radius: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 860px) {
  .ef-about-grid { grid-template-columns: 1fr; gap: 40px; }
  .ef-about-img { max-width: 420px; margin: 0 auto; }
}

/* =============================================
   "DA DOVE SI COMINCIA" — QUOTE BLOCKS
   ============================================= */
.ef-start-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.ef-start-img img {
  width: 100%;
  display: block;
  border-radius: 14px 80px 14px 14px;
  opacity: 0.80;
}

.ef-quote-block {
  margin-top: 18px;
  padding: 0 0 0 18px;
  border-left: 3px solid var(--ef-gold);
}

.ef-quote-block + .ef-quote-block { margin-top: 20px; }

.ef-quote-text {
  font-style: italic;
  font-weight: 600;
  color: rgba(255,255,255,0.94);
  font-size: 0.96em;
  line-height: 1.58;
  margin: 0 0 6px;
}

.ef-quote-desc {
  color: rgba(255,255,255,0.62);
  font-size: 0.86em;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 860px) {
  .ef-start-grid { grid-template-columns: 1fr; gap: 40px; }
  .ef-start-img { display: none; }
}

/* =============================================
   COME LAVORO
   ============================================= */
.ef-work-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}

.ef-work-img img {
  width: 100%;
  display: block;
  border-radius: 14px 14px 80px 14px;
  box-shadow: 0 8px 32px rgba(30,45,69,0.10);
}

@media (max-width: 860px) {
  .ef-work-grid { grid-template-columns: 1fr; gap: 40px; }
  .ef-work-img { max-width: 420px; margin: 0 auto; }
}

/* =============================================
   FAQ
   ============================================= */
.ef-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 64px;
  margin-top: 52px;
}

.ef-faq-item {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.ef-faq-q {
  font-weight: 700;
  color: var(--ef-gold);
  font-size: 0.97em;
  margin: 0 0 8px;
  line-height: 1.4;
}

.ef-faq-a {
  color: rgba(255,255,255,0.80);
  font-size: 0.93em;
  line-height: 1.72;
  margin: 0;
}

.ef-faq-item:last-child { border-bottom: none; }

@media (max-width: 700px) {
  .ef-faq-grid { grid-template-columns: 1fr; }
}

/* =============================================
   CONTATTI + AREE
   ============================================= */
.ef-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.ef-aree-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.ef-area-card {
  background: var(--ef-white);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.22s;
  cursor: default;
}

.ef-area-card:hover {
  background: var(--ef-white);
  box-shadow: 0 4px 16px rgba(30,45,69,0.09);
  transform: translateY(-2px);
  border-color: rgba(196,164,107,0.35);
}

.ef-area-icon {
  width: 44px; height: 44px;
  background: rgba(196,164,107,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ef-area-icon i {
  font-size: 1.3em;
  color: var(--ef-gold);
}

.ef-area-card h5 {
  font-size: 0.88em;
  font-weight: 600;
  color: var(--ef-navy);
  margin: 0;
  line-height: 1.35;
}

@media (max-width: 580px) { .ef-aree-grid { grid-template-columns: 1fr; } }

/* =============================================
   FORM CONTATTO
   ============================================= */
.ef-form-card {
  background: var(--ef-white);
  border-radius: var(--ef-radius-md);
  padding: 38px 36px;
  box-shadow: 0 4px 28px rgba(30,45,69,0.10);
  border: 1px solid var(--ef-border);
}

.ef-form-card h3 {
  font-size: 1.42em;
  font-weight: 700;
  color: var(--ef-navy);
  margin: 0 0 8px;
  line-height: 1.3;
}

.ef-form-card > p {
  color: var(--ef-muted);
  font-size: 0.93em;
  line-height: 1.66;
  margin: 0 0 22px;
}

.ef-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.ef-form-group { margin-bottom: 14px; }

.ef-form-group label {
  display: block;
  font-size: 0.84em;
  font-weight: 600;
  color: var(--ef-navy);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.ef-form-group input,
.ef-form-group textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--ef-border);
  border-radius: var(--ef-radius-sm);
  font-size: 0.93em;
  font-family: 'Barlow', inherit;
  color: var(--ef-text);
  background: var(--ef-cream);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  box-sizing: border-box;
  display: block;
}

.ef-form-group input:focus,
.ef-form-group textarea:focus {
  border-color: var(--ef-gold);
  box-shadow: 0 0 0 3px rgba(196,164,107,0.16);
  background: var(--ef-white);
}

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

.ef-form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.85em;
  color: var(--ef-muted);
  cursor: pointer;
  line-height: 1.5;
}

.ef-form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--ef-gold);
  cursor: pointer;
}

.ef-form-check a { color: var(--ef-gold); text-decoration: underline; }

.ef-form-submit {
  background: var(--ef-navy);
  color: #ffffff;
  padding: 13px 34px;
  border: none;
  border-radius: 50px;
  font-size: 0.97em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s;
  display: inline-block;
  font-family: 'Barlow', inherit;
  letter-spacing: 0.01em;
}

.ef-form-submit:hover {
  background: #253759;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,45,69,0.26);
}

.ef-form-submit:disabled {
  opacity: 0.60;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Alert boxes */
.ef-alert {
  padding: 13px 16px;
  border-radius: var(--ef-radius-sm);
  margin-bottom: 18px;
  font-size: 0.92em;
  line-height: 1.5;
  display: none;
}

.ef-alert-success {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  color: #2e7d32;
}

.ef-alert-error {
  background: #fdecea;
  border-left: 4px solid #e53935;
  color: #b71c1c;
}

@media (max-width: 900px) {
  .ef-contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .ef-form-card { padding: 28px 20px; }
}

@media (max-width: 540px) {
  .ef-form-row { grid-template-columns: 1fr; }
}

/* =============================================
   STUDIO / MAPPA
   ============================================= */
.ef-studio-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: start;
}

.ef-studio-grid .ef-map iframe {
  width: 100%;
  border-radius: var(--ef-radius-md);
  min-height: 340px;
  border: none;
  display: block;
}

@media (max-width: 860px) {
  .ef-studio-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* =============================================
   WHATSAPP CTA
   ============================================= */
.ef-wa-section {
  background: var(--ef-navy);
  text-align: center;
  padding: 90px 44px;
  position: relative;
  overflow: hidden;
}

.ef-wa-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../img/cover-overlay.png');
  background-size: cover;
  background-position: center;
  opacity: 0.04;
  pointer-events: none;
}

.ef-wa-section > * { position: relative; z-index: 1; }

.ef-wa-title {
  font-size: 2.0em;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
}

.ef-wa-sub {
  color: rgba(255,255,255,0.76);
  font-size: 1.0em;
  line-height: 1.72;
  max-width: 480px;
  margin: 0 auto 28px;
}

/* =============================================
   FOOTER
   ============================================= */
.ef-footer {
  background: var(--ef-navy);
  color: rgba(255,255,255,0.78);
  padding: 64px 0 0;
}

.ef-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 44px;
}

.ef-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ef-footer-brand-icon { width: 30px; height: 30px; }

.ef-footer-brand-name {
  font-size: 0.93em;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.ef-footer h5 {
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ef-gold);
  margin: 0 0 14px;
}

.ef-footer ul { list-style: none; margin: 0; padding: 0; }

.ef-footer ul li {
  margin-bottom: 8px;
  font-size: 0.88em;
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
}

.ef-footer ul li a {
  color: rgba(255,255,255,0.65);
  text-decoration: none !important;
  transition: color 0.2s;
}

.ef-footer ul li a:hover { color: var(--ef-gold); }

.ef-footer-bottom {
  max-width: 1180px;
  margin: 44px auto 0;
  padding: 20px 44px;
  border-top: 1px solid rgba(255,255,255,0.09);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82em;
  color: rgba(255,255,255,0.40);
}

.ef-footer-bottom a {
  color: rgba(255,255,255,0.48);
  text-decoration: none !important;
  transition: color 0.2s;
}

.ef-footer-bottom a:hover { color: var(--ef-gold); }

.ef-footer-bottom img { height: 22px; opacity: 0.45; vertical-align: middle; }

@media (max-width: 860px) {
  .ef-footer-grid { grid-template-columns: 1fr 1fr; padding: 0 20px; gap: 32px; }
  .ef-footer-bottom { padding: 20px; flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 540px) {
  .ef-footer-grid { grid-template-columns: 1fr; }
}

/* =============================================
   WHATSAPP FLOATING BUTTON (unchanged)
   ============================================= */
.btn-whatsapp {
  z-index: 999999;
  background: #3BBF5A;
  position: fixed;
  bottom: 30px; right: 30px;
  width: 70px; height: 70px;
  border-radius: 50%;
  box-shadow: 0 0 1px 1px rgba(59,191,90,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-center { display: block; width: 38px; height: 38px; margin: auto; }

.pulse { animation: ef-pulse 2s infinite; }

@keyframes ef-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.50); }
  100% { box-shadow: 0 0 0 20px rgba(37,211,102,0); }
}
