/* ============================================================
   LIQUID GLASS — Design System
   Apple-inspired glassmorphism theme for claudio.giotta.cloud
   ============================================================ */

/* ===================
   1. CSS CUSTOM PROPERTIES
   =================== */

/* Dark Mode (default) */
:root {
  /* Background */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-gradient: linear-gradient(145deg, #0a0a0f 0%, #151a15 40%, #0a0a0f 100%);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-bg-strong: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.4);
  --glass-blur: blur(20px) saturate(180%);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary: #f5f5f7;
  --text-secondary: rgba(245, 245, 247, 0.7);
  --text-tertiary: rgba(245, 245, 247, 0.5);

  /* Accent - Calming Green */
  --accent: #30d158;
  --accent-hover: #5ee07e;
  --accent-glow: rgba(48, 209, 88, 0.25);
  --accent-gradient: linear-gradient(135deg, #30d158, #28cd41);

  /* Status bar */
  --titlebar-bg: rgba(30, 30, 40, 0.85);
  --titlebar-text: rgba(255, 255, 255, 0.7);

  /* Forms */
  --input-bg: rgba(255, 255, 255, 0.04);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus: rgba(48, 209, 88, 0.5);
  --placeholder: rgba(255, 255, 255, 0.3);

  /* Misc */
  --divider: rgba(255, 255, 255, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 0px;
  /* Removed radius per request */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
}

/* Light Mode */
[data-theme="light"] {
  --bg-primary: #f5f5f7;
  --bg-secondary: #e8e8ed;
  --bg-gradient: linear-gradient(145deg, #f5f5f7 0%, #e8f5ec 40%, #f5f5f7 100%);

  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-strong: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-border-hover: rgba(0, 0, 0, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --glass-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.12);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.8);

  --text-primary: #1d1d1f;
  --text-secondary: rgba(29, 29, 31, 0.6);
  --text-tertiary: rgba(29, 29, 31, 0.4);

  --accent: #34c759;
  --accent-hover: #30b352;
  --accent-glow: rgba(52, 199, 89, 0.15);
  --accent-gradient: linear-gradient(135deg, #34c759, #30d158);

  --titlebar-bg: rgba(240, 240, 245, 0.85);
  --titlebar-text: rgba(0, 0, 0, 0.6);

  --input-bg: rgba(0, 0, 0, 0.03);
  --input-border: rgba(0, 0, 0, 0.1);
  --input-focus: rgba(52, 199, 89, 0.5);
  --placeholder: rgba(0, 0, 0, 0.3);

  --divider: rgba(0, 0, 0, 0.06);
}

/* ===================
   2. RESET & BASE
   =================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  /* Fallback */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* Ambient background glow optimized */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, var(--accent-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(48, 209, 88, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: ambientShift 20s ease-in-out infinite alternate;
}

@keyframes ambientShift {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(30px, -20px) scale(1.05);
  }
}

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

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

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

ul,
ol {
  list-style: none;
}

/* ===================
   3. TYPOGRAPHY
   =================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.1rem;
}

p {
  color: var(--text-secondary);
  margin: var(--space-md) 0;
  line-height: 1.7;
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ===================
   4. GLASS COMPONENTS
   =================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  transition: all var(--transition);
}

.glass-panel:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover), var(--glass-inset);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  transition: all var(--transition);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover), var(--glass-inset);
}

/* ===================
   5. macOS WINDOW FRAME (FULL SCREEN)
   ===================*/
/* Full-page frame */
.window-frame {
  position: relative;
  width: 100%;
  margin: 0;
  /* Remove top/bottom spacing */
  border-radius: 0;
  /* Remove radius */
  border: none;
  box-shadow: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
  background: var(--bg-gradient);
  /* Use gradient background directly */
  /* Note: backdrop-filter removed to allow position:fixed children (nav) to work relative to viewport */
}

/* Title Bar - Fixed at top */
.title-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 var(--space-md);
  background: var(--titlebar-bg);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  flex-shrink: 0;
  user-select: none;
  z-index: 200;
}

/* Traffic Lights */
.traffic-lights {
  position: absolute;
  left: var(--space-md);
  display: flex;
  gap: 8px;
  align-items: center;
}

.traffic-lights .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: opacity var(--transition);
}

.traffic-lights .dot.red {
  background: #ff5f57;
}

.traffic-lights .dot.yellow {
  background: #febc2e;
}

.traffic-lights .dot.green {
  background: #28c840;
}

.traffic-lights:hover .dot {
  opacity: 0.8;
}

/* Window Title */
.window-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--titlebar-text);
  letter-spacing: 0.01em;
}

/* Theme Toggle */
.theme-toggle {
  position: absolute;
  right: var(--space-md);
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--text-secondary);
  transition: all var(--transition);
  padding: 0;
}

.theme-toggle:hover {
  background: var(--glass-bg-strong);
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

@media (max-width: 480px) {
  .traffic-lights .dot {
    width: 10px;
    height: 10px;
  }

  .title-bar {
    height: 44px;
  }

  .window-title {
    font-size: 12px;
  }
}

/* ===================
   6. NAVIGATION (FLOATING)
   =================== */
.glass-nav {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.4s ease;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Floating effect enabled via JS class 'scrolled' */
.glass-nav.scrolled {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 900px;
  border-radius: 50px;
  background: rgba(20, 20, 30, 0.7);
  /* Dark semi-transparent */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 10px 30px;
}

[data-theme="light"] .glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  width: 100%;
  align-items: center;
  position: relative;
}

/* Center Menu Items */
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex: 1;
  /* Takes available space */
}

/* Links Style */
.nav-menu a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 20px;
  transition: all var(--transition);
  text-decoration: none;
}

.nav-menu a:hover {
  color: var(--text-primary);
  background: var(--glass-bg-strong);
}

.nav-menu a.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-menu a.nav-cta {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 600;
  padding: 8px 24px;
}

.nav-menu a.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* Language Switch - Pushed to right */
.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  position: absolute;
  right: 0;
}

.lang-switch .lang-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.lang-switch .lang-btn:hover {
  color: var(--text-primary);
}

.lang-switch .lang-btn.active {
  color: var(--accent);
}

.lang-switch .separator {
  color: var(--text-tertiary);
  font-size: 12px;
}

/* Mobile Menu Button */
.menu-btn {
  display: none;
  width: 28px;
  height: 20px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 101;
}

.menu-btn span,
.menu-btn::before,
.menu-btn::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-btn::before {
  top: 0;
}

.menu-btn span {
  top: 50%;
  transform: translateY(-50%);
}

.menu-btn::after {
  bottom: 0;
}

.menu-btn.active::before {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu-btn.active span {
  opacity: 0;
}

.menu-btn.active::after {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

@media (max-width: 768px) {
  .menu-btn {
    display: block;
    margin: 0 auto;
    /* Center the button */
  }

  /* Center the nav content on mobile */
  .glass-nav {
    justify-content: center;
  }

  /* Mobile Nav Dropdown */
  .nav-links {
    position: fixed;
    top: 30px;
    /* left: 0; */ /* CG change */
    width: 100vw;
    height: calc(100vh - 50px);
    background: var(--bg-primary);
    flex-direction: column;
    padding: var(--space-xl);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 90;
    justify-content: flex-start;
  }

  /* Mobile Nav Dropdown when scrolled */
  .glass-nav.scrolled .nav-links {
    top: -11px;
  }

  /* CG change
  .glass-nav.scrolled .nav-links {
    top: 80px;
  }
  */

  /* Ensure floating nav is visible on mobile */
  .glass-nav.scrolled {
    z-index: 9999;
    /* Ensure it's on top */
    background: rgba(20, 20, 30, 0.85);
    /* Slightly more opaque on mobile */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  /* Adjust for floating nav */

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    margin-top: var(--space-xl);
  }

  .nav-menu a {
    font-size: 18px;
    padding: 12px 24px;
  }

  .lang-switch {
    position: relative;
    right: auto;
    margin-top: var(--space-xl);
    border-top: 1px solid var(--divider);
    padding-top: var(--space-lg);
    width: 100%;
    justify-content: center;
  }
}

/* ===================
   7. CONTENT AREA
   =================== */
.content-area {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ===================
   8. HERO SECTION
   =================== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 100px);
  /* Full height minus nav */
  padding: var(--space-2xl) var(--space-lg);
  position: relative;
}

.hero-inner {
  max-width: 700px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  animation: fadeSlideUp 1s ease-out 0.2s both;
}

.hero-title .accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: subtleGlow 4s ease-in-out infinite;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  min-height: 24px;
  animation: fadeSlideUp 1s ease-out 0.6s both;
}

.typed-cursor {
  color: var(--accent) !important;
  font-weight: 200;
  animation: blink 1s ease-in-out infinite;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-tertiary);
  font-size: 12px;
  animation: fadeSlideUp 1s ease-out 1s both;
  cursor: pointer;
  transition: color var(--transition);
}

.scroll-indicator:hover {
  color: var(--accent);
}

.scroll-indicator .mouse-icon {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-tertiary);
  border-radius: 12px;
  position: relative;
  transition: border-color var(--transition);
}

.scroll-indicator:hover .mouse-icon {
  border-color: var(--accent);
}

.scroll-indicator .mouse-icon::after {
  content: '';
  width: 4px;
  height: 8px;
  background: var(--text-tertiary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouseScroll 1.5s ease-in-out infinite;
}

.scroll-indicator:hover .mouse-icon::after {
  background: var(--accent);
}

/* ===================
   9. SECTIONS
   =================== */
.section {
  padding: var(--space-2xl) var(--space-xl);
  /* Reduced top padding */
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-xl) var(--space-lg);
  }
}

.section-header {
  margin-bottom: 24px;
}

/* Reduced from var(--space-xl) */

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--accent-glow);
  margin-bottom: var(--space-sm);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================
   10. ABOUT SECTION
   =================== */
.about-content {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xl);
}

.about-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glass-border);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.about-text {
  flex: 1;
}

@media (max-width: 480px) {
  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.info-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.info-list li {
  font-size: 14px;
  color: var(--text-secondary);
}

.info-list li strong {
  color: var(--accent);
  font-weight: 500;
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

/* ===================
   11. RESUME SECTION
   =================== */
.resume-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 768px) {
  .resume-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}

.resume-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.resume-item {
  position: relative;
  padding-left: var(--space-lg);
}

.resume-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  border-radius: 2px;
}

.resume-item:last-child::before {
  display: none;
}

.resume-item .date {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  padding: 3px 10px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  margin-bottom: var(--space-sm);
}

.resume-item .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.resume-item p {
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

/* ===================
   12. SKILLS
   =================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.skill-item {
  padding: var(--space-md) 0;
}

.skill-item .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  display: flex;
  justify-content: space-between;
}

.skill-item .progress-bar {
  height: 4px;
  background: var(--divider);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-item .progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 4px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================
   13. SERVICES / CONTACT INFO
   =================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.service-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.service-card .icon {
  font-size: 28px;
  color: var(--accent);
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.service-card .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.service-card p {
  font-size: 14px;
  margin: 0;
}

/* ===================
   14. FORMS
   =================== */
.contact-form {
  margin-top: var(--space-xl);
  /* Matching services-grid width behavior */
  max-width: 100%;
}

.form-row {
  display: flex;
  gap: var(--space-lg);
}

.form-row .form-group {
  flex: 1;
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--placeholder);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--glass-bg-strong);
}

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

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent-gradient);
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.alert-success {
  display: none;
  padding: var(--space-lg);
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.3);
  border-radius: var(--radius-md);
  color: #30d158;
  margin-top: var(--space-lg);
}

.alert-success p {
  color: #30d158;
  margin: 0;
}

/* ===================
   15. FOOTER
   =================== */
.glass-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  flex-shrink: 0;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 16px;
  transition: all var(--transition);
}

.footer-social a:hover {
  color: var(--accent);
  border-color: var(--accent-glow);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .glass-footer {
    flex-direction: column-reverse;
    gap: var(--space-md);
    text-align: center;
  }
}

/* ===================
   16. PRELOADER
   =================== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-weight: 500;
}

.preloader-bar {
  width: 200px;
  height: 3px;
  background: var(--divider);
  border-radius: 3px;
  overflow: hidden;
}

.preloader-bar .fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 3px;
  animation: preloaderFill 1.5s ease-in-out forwards;
}

@keyframes preloaderFill {
  0% {
    width: 0%;
  }

  100% {
    width: 100%;
  }
}

/* ===================
   17. ANIMATIONS
   =================== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subtleGlow {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.15);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes mouseScroll {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

/* ===================
   18. BREADCRUMB-STYLE HERO (inner pages) - ALIGNED WITH HOME
   =================== */
.hero-inner-page {
  /* Aligned with home hero structure for consistent title height */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 100px);
  /* Matches home hero */
  padding: 0 var(--space-lg);
}

.hero-inner-page .hero-inner {
  margin-top: -60px;
  /* Slight visual offset to balance content below */
}

/* Make inner hero title same size as home? No, keep it slightly distinct but centralized */
.hero-inner-page .hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: var(--space-xs);
}

.hero-breadcrumb {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: var(--space-sm);
  animation: fadeSlideUp 1s ease-out 0.4s both;
}

.hero-breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

/* ===================
   19. RESPONSIVE UTILITIES / IONICONS
   =================== */
.ion {
  font-size: inherit;
  line-height: 1;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .window-frame,
  .glass-panel,
  .glass-card {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: none;
    backdrop-filter: none;
  }

  .title-bar,
  .glass-nav,
  .glass-footer {
    display: none;
  }
}

/* ===================
   FORCE OVERRIDES FOR MOBILE SCROLL & NAV
   =================== */
html,
body {
  overflow-y: auto !important;
  height: auto !important;
}

.window-frame {
  height: auto !important;
  overflow: visible !important;
}

.content-area {
  overflow: visible !important;
  height: auto !important;
}

.glass-nav.scrolled {
  background: rgba(10, 10, 15, 0.95) !important;
  border: 1px solid var(--accent) !important;
  box-shadow: 0 10px 40px rgba(48, 209, 88, 0.2) !important;
  z-index: 99999 !important;
}

@media (max-width: 768px) {
  .glass-nav.scrolled {
    width: 90% !important;
    left: 5% !important;
    transform: none !important;
    top: 10px !important;
    border-radius: 30px !important;
  }
}

/* FORCE LIGHT MODE NAV */
[data-theme="light"] .glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
  color: #1d1d1f !important;
}

/* Map */
.map-container {
  width: 100%;
  height: 400px; /* Regola come preferisci */
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden !important; /* Per bordi arrotondati */
  top: 50px;
  margin-bottom: 30px;
}
