/* ========================================
   GIALDINI DIGITAL BUSINESS CARD — STYLE
   ======================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  --color-navy:      hsl(222, 65%, 14%);
  --color-navy-mid:  hsl(222, 55%, 20%);
  --color-navy-soft: hsl(222, 40%, 26%);
  --color-gold:      hsl(42, 90%, 58%);
  --color-gold-dark: hsl(38, 85%, 44%);
  --color-gold-glow: hsla(42, 90%, 58%, 0.35);
  --color-white:     hsl(0, 0%, 100%);
  --color-white-80:  hsla(0, 0%, 100%, 0.80);
  --color-white-60:  hsla(0, 0%, 100%, 0.60);
  --color-white-20:  hsla(0, 0%, 100%, 0.12);
  --color-white-10:  hsla(0, 0%, 100%, 0.06);

  --color-phone:     hsl(152, 60%, 42%);
  --color-whatsapp:  hsl(142, 70%, 38%);
  --color-email:     hsl(215, 75%, 55%);
  --color-video:     hsl(262, 70%, 60%);
  --color-maps:      hsl(5, 80%, 55%);
  --color-fb:        hsl(221, 60%, 50%);
  --color-ig-start:  hsl(330, 90%, 55%);
  --color-ig-end:    hsl(38, 95%, 55%);
  --color-li:        hsl(201, 100%, 36%);

  --glass-bg:        hsla(222, 55%, 18%, 0.65);
  --glass-border:    hsla(0, 0%, 100%, 0.10);
  --glass-shadow:    0 8px 40px hsla(222, 60%, 6%, 0.50);

  --radius-card:     28px;
  --radius-btn:      16px;
  --radius-social:   14px;
  --radius-tag:      50px;

  --font-display:    'Playfair Display', Georgia, serif;
  --font-body:       'Inter', system-ui, sans-serif;

  --transition:      0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.18s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-navy);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
  color: var(--color-white);
  overflow-x: hidden;
  position: relative;
}

/* --- Animated Background Particles --- */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  animation: float-particle linear infinite;
}

.p1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--color-gold), transparent 70%);
  top: -100px; left: -120px;
  animation-duration: 28s;
}
.p2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, hsl(215, 80%, 65%), transparent 70%);
  bottom: 80px; right: -80px;
  animation-duration: 22s;
  animation-delay: -6s;
}
.p3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--color-gold), transparent 70%);
  top: 40%; right: 10%;
  animation-duration: 18s;
  animation-delay: -10s;
  opacity: 0.05;
}
.p4 {
  width: 160px; height: 160px;
  background: radial-gradient(circle, hsl(262, 70%, 70%), transparent 70%);
  bottom: 30%; left: 5%;
  animation-duration: 24s;
  animation-delay: -4s;
  opacity: 0.06;
}
.p5 {
  width: 100px; height: 100px;
  background: radial-gradient(circle, var(--color-gold), transparent 70%);
  top: 20%; left: 40%;
  animation-duration: 16s;
  animation-delay: -14s;
  opacity: 0.04;
}

@keyframes float-particle {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -40px) scale(1.05); }
  66%  { transform: translate(-20px, 20px) scale(0.97); }
  100% { transform: translate(0, 0) scale(1); }
}

/* --- Card Wrapper --- */
.card-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

/* --- Main Card --- */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow), 0 0 0 1px hsla(0,0%,100%,0.04);
  overflow: hidden;
  animation: card-enter 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Card Header --- */
.card-header {
  padding: 44px 32px 32px;
  text-align: center;
  background: linear-gradient(
    160deg,
    hsla(222, 60%, 22%, 0.9) 0%,
    hsla(222, 50%, 16%, 0.7) 100%
  );
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

/* Avatar – rettangolo proporzionale (rapporto 647:279 ≈ 7:3) */
.avatar-ring {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 647 / 279;
  border-radius: 18px;
  margin: 0 auto 20px;
  padding: 3px;
  background: linear-gradient(135deg, var(--color-gold), hsl(42, 60%, 80%), var(--color-gold-dark));
  box-shadow: 0 0 28px var(--color-gold-glow), 0 6px 24px hsla(0,0%,0%,0.5);
  overflow: hidden;
  animation: spin-ring 8s linear infinite;
}

@keyframes spin-ring {
  from { background-position: 0% 50%; }
  to   { filter: hue-rotate(15deg); }
}

.avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: 15px;           /* segue il contenitore */
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.avatar-ring:hover .avatar-photo {
  transform: scale(1.03);
  filter: brightness(1.07) saturate(1.1);
}

/* Badge */
.header-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold));
  color: var(--color-navy);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

/* Name */
.card-name {
  font-family: var(--font-display);
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-white);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.card-name span {
  color: var(--color-gold);
}

/* Role */
.card-role {
  font-size: 13px;
  color: var(--color-white-80);
  font-weight: 400;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
}

.role-icon {
  color: var(--color-gold);
  font-size: 14px;
}

.role-mn {
  background: var(--color-white-20);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Divider */
.divider-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 0 auto 20px;
  border-radius: 2px;
}

/* Deleghe tags */
.deleghe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.delega-tag {
  background: var(--color-white-10);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-tag);
  font-size: 11px;
  color: var(--color-white-80);
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.delega-tag i {
  color: var(--color-gold);
  font-size: 10px;
}

.delega-tag:hover {
  background: var(--color-white-20);
  color: var(--color-white);
}

/* --- CTA Section --- */
.cta-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 14px;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition-fast);
  cursor: pointer;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-primary {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(120deg, var(--color-gold-dark), var(--color-gold) 60%, hsl(45,95%,68%));
  color: var(--color-navy);
  font-size: 15px;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 20px var(--color-gold-glow), 0 2px 8px hsla(0,0%,0%,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px var(--color-gold-glow), 0 4px 16px hsla(0,0%,0%,0.4);
  filter: brightness(1.06);
}

.btn-primary .fa-arrow-down {
  animation: bounce-down 1.6s ease-in-out infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(3px); }
}

/* Pulse ring animation */
.pulse-anim {
  position: relative;
}

.pulse-anim::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  border: 2px solid var(--color-gold);
  opacity: 0;
  animation: pulse-ring 2.5s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.05); }
}

/* --- Section Title --- */
.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 16px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before,
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-white-20));
}
.section-title::before {
  background: linear-gradient(90deg, var(--color-white-20), transparent);
}

/* --- Contact Section --- */
.contact-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--glass-border);
}

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-white-10);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-btn);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--color-white);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  animation: item-enter 0.5s ease both;
}

.contact-btn:nth-child(1) { animation-delay: 0.1s; }
.contact-btn:nth-child(2) { animation-delay: 0.15s; }
.contact-btn:nth-child(3) { animation-delay: 0.2s; }
.contact-btn:nth-child(4) { animation-delay: 0.25s; }
.contact-btn:nth-child(5) { animation-delay: 0.3s; }

@keyframes item-enter {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.contact-btn:hover {
  background: var(--color-white-20);
  transform: translateX(4px) scale(1.01);
  box-shadow: 0 4px 20px hsla(0,0%,0%,0.25);
}

.contact-btn:active {
  transform: translateX(4px) scale(0.99);
}

.contact-btn-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.contact-btn:hover .contact-btn-icon {
  transform: scale(1.1) rotate(-4deg);
}

.phone-icon    { background: hsla(152, 60%, 42%, 0.20); color: hsl(152, 70%, 60%); border: 1px solid hsla(152, 60%, 42%, 0.25); }
.whatsapp-icon { background: hsla(142, 70%, 38%, 0.20); color: hsl(142, 80%, 58%); border: 1px solid hsla(142, 70%, 38%, 0.25); }
.email-icon    { background: hsla(215, 75%, 55%, 0.20); color: hsl(215, 85%, 70%); border: 1px solid hsla(215, 75%, 55%, 0.25); }
.video-icon    { background: hsla(262, 70%, 60%, 0.20); color: hsl(262, 80%, 78%); border: 1px solid hsla(262, 70%, 60%, 0.25); }
.maps-icon     { background: hsla(5, 80%, 55%, 0.20);   color: hsl(5, 90%, 70%);   border: 1px solid hsla(5, 80%, 55%, 0.25); }

.contact-btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-white-60);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.contact-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
}

.contact-value-sm {
  font-size: 12px;
  line-height: 1.4;
}

/* --- Social Section --- */
.social-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--glass-border);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: var(--radius-social);
  text-decoration: none;
  color: var(--color-white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid var(--glass-border);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition-fast);
  animation: item-enter 0.5s ease both;
}

.social-btn:nth-child(1) { animation-delay: 0.15s; }
.social-btn:nth-child(2) { animation-delay: 0.2s; }
.social-btn:nth-child(3) { animation-delay: 0.25s; }

.social-btn i {
  font-size: 22px;
  transition: transform var(--transition);
}

.social-btn:hover {
  transform: translateY(-4px) scale(1.04);
  filter: brightness(1.1);
}

.social-btn:hover i {
  transform: scale(1.15) rotate(-8deg);
}

.social-btn:active {
  transform: translateY(-2px) scale(1.01);
}

.fb {
  background: hsla(221, 60%, 50%, 0.18);
  border-color: hsla(221, 60%, 50%, 0.30);
  box-shadow: 0 4px 18px hsla(221, 60%, 50%, 0.15);
}
.fb:hover {
  background: hsla(221, 60%, 50%, 0.30);
  box-shadow: 0 8px 28px hsla(221, 60%, 50%, 0.30);
}

.ig {
  background: hsla(330, 90%, 55%, 0.15);
  border-color: hsla(330, 80%, 60%, 0.28);
  box-shadow: 0 4px 18px hsla(330, 90%, 55%, 0.12);
}
.ig:hover {
  background: hsla(330, 90%, 55%, 0.25);
  box-shadow: 0 8px 28px hsla(330, 90%, 55%, 0.28);
}
.ig i {
  background: linear-gradient(135deg, var(--color-ig-start), var(--color-ig-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.li {
  background: hsla(201, 100%, 36%, 0.18);
  border-color: hsla(201, 100%, 36%, 0.30);
  box-shadow: 0 4px 18px hsla(201, 100%, 36%, 0.12);
}
.li:hover {
  background: hsla(201, 100%, 36%, 0.30);
  box-shadow: 0 8px 28px hsla(201, 100%, 36%, 0.28);
}

/* --- Progetto Civico Section --- */
.progetto-section {
  padding: 20px 16px;
  border-bottom: 1px solid var(--glass-border);
}

.progetto-banner {
  display: block;
  text-decoration: none;
  background: linear-gradient(
    120deg,
    hsla(222, 55%, 24%, 0.8) 0%,
    hsla(222, 40%, 20%, 0.6) 100%
  );
  border: 1px solid hsla(42, 90%, 58%, 0.25);
  border-radius: 18px;
  padding: 18px 20px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition-fast);
  box-shadow: 0 4px 20px hsla(222, 60%, 8%, 0.35);
  animation: item-enter 0.5s 0.3s ease both;
}

.progetto-banner:hover {
  transform: translateY(-3px);
  background: linear-gradient(
    120deg,
    hsla(222, 55%, 30%, 0.9) 0%,
    hsla(222, 40%, 26%, 0.7) 100%
  );
  box-shadow: 0 8px 32px hsla(222, 60%, 8%, 0.5), 0 0 0 1px hsla(42, 90%, 58%, 0.3);
}

.progetto-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.progetto-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--color-navy);
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--color-gold-glow);
}

.progetto-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.progetto-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-gold);
}

.progetto-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-white);
  line-height: 1.2;
}

.progetto-sub {
  font-size: 12px;
  color: var(--color-white-60);
}

.progetto-arrow {
  color: var(--color-gold);
  font-size: 14px;
  opacity: 0.7;
  transition: transform var(--transition);
}

.progetto-banner:hover .progetto-arrow {
  transform: translateX(4px);
  opacity: 1;
}

/* --- Card Footer --- */
.card-footer {
  padding: 20px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-footer p {
  font-size: 12px;
  color: var(--color-white-60);
}

.card-footer p:first-child {
  font-weight: 600;
  color: var(--color-white-80);
}

/* --- Responsive tweaks --- */
@media (max-width: 360px) {
  .card-header    { padding: 36px 20px 24px; }
  .contact-btn    { padding: 12px 14px; }
  .social-grid    { gap: 8px; }
  .social-btn     { padding: 14px 8px; font-size: 11px; }
  .section-title  { padding: 0 16px; }
  .contact-grid   { padding: 0 12px; }
  .progetto-section { padding: 16px 12px; }
  .cta-section    { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
