/* ==========================================================================
   Studio Oculistico Dr. Della Valle Vincenzo - Modern Design System CSS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --primary: #0a2540;
  --primary-light: #1e3a8a;
  --accent: #0077b6;
  --accent-hover: #0096c7;
  --cyan: #00b4d8;
  --cyan-light: #e0f2fe;
  --success: #10b981;
  
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  --border-color: #e2e8f0;
  --border-focus: #0077b6;
  
  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Elevation & Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.1);
  --shadow-hover: 0 20px 40px rgba(0, 119, 182, 0.15);
  
  /* Layout & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1240px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.2rem; }

.section-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: var(--cyan-light);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem auto;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.75rem;
}

/* Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.05);
}

.footer-brand .brand-logo-img {
  filter: brightness(0) invert(1);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-link {
  font-weight: 600;
  color: var(--text-main);
  font-size: 1rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #005691);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(0, 119, 182, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 119, 182, 0.45);
  color: var(--text-white);
}

.btn-secondary {
  background: var(--cyan-light);
  color: var(--accent);
}

.btn-secondary:hover {
  background: #bae6fd;
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-body);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--primary);
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 5rem 0 6rem 0;
  background: radial-gradient(circle at 80% 20%, rgba(0, 180, 216, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 10% 80%, rgba(10, 37, 64, 0.05) 0%, transparent 40%),
              var(--bg-body);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content h1 {
  margin: 1rem 0 1.25rem 0;
  letter-spacing: -0.5px;
}

.hero-content h1 span {
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.hero-badge-item {
  display: flex;
  flex-direction: column;
}

.hero-badge-number {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-badge-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-media {
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image-wrapper img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-image-wrapper:hover img {
  transform: scale(1.03);
}

.hero-floating-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 280px;
}

.hero-floating-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cyan-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Feature & Service Cards */
.services-section {
  padding: 6rem 0;
  background: var(--bg-card);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-body);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
  background: var(--bg-card);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--cyan-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--accent);
  color: var(--text-white);
  transform: scale(1.08);
}

.service-card h3 {
  margin-bottom: 0.85rem;
  font-size: 1.35rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-link {
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
}

.service-card:hover .service-link {
  color: var(--accent-hover);
}

/* Doctor Profile / About Section */
.about-section {
  padding: 6rem 0;
  background: var(--bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 4rem;
  align-items: center;
}

.about-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image-card img {
  width: 100%;
  height: 540px;
  object-fit: cover;
}

.about-badge {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(10, 37, 64, 0.92);
  backdrop-filter: blur(10px);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

.about-content h2 {
  margin: 1rem 0 1.5rem 0;
}

.about-highlight {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.about-bio-text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 2rem 0;
}

.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.about-feature-item i {
  color: var(--success);
  font-size: 1.2rem;
  margin-top: 0.2rem;
}

.about-feature-item span {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Locations / Studio Sedi Section */
.locations-section {
  padding: 6rem 0;
  background: var(--bg-card);
}

.locations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.location-card {
  background: var(--bg-body);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.location-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.location-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.location-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--cyan-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.location-title h3 {
  font-size: 1.35rem;

}

.location-title span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.location-details {
  list-style: none;
  margin-bottom: 2rem;
}

.location-details li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border-color);
  color: var(--text-muted);
  font-size: 0.98rem;
}

.location-details li:last-child {
  border-bottom: none;
}

.location-details li i {
  color: var(--accent);
  font-size: 1.1rem;
  margin-top: 0.2rem;
}

.location-details strong {
  color: var(--text-main);
}

/* Call to Action Banner */
.cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--primary), #004080);
  color: var(--text-white);
  position: relative;
  overflow: hidden;
}

.cta-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-content h2 {
  color: var(--text-white);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.2rem;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* FAQ Accordion */
.faq-section {
  padding: 6rem 0;
  background: var(--bg-alt);
}

.faq-accordion {
  max-width: 840px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.active {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.faq-header {
  padding: 1.4rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  user-select: none;
}

.faq-toggle {
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
  transform: rotate(180deg);
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.75rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.faq-item.active .faq-body {
  padding: 0 1.75rem 1.4rem 1.75rem;
  max-height: 400px;
}

/* Contact Form & Page Styles */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
}

.contact-card-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  font-size: 0.98rem;
  font-family: var(--font-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-main);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

/* Modal Booking Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  padding: 2.5rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-body);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--border-color);
  color: var(--text-main);
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: var(--text-white);
  padding: 4.5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin: 1rem 0;
}

.footer-column h4 {
  color: var(--text-white);
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  position: relative;
}

.footer-column h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  background: var(--cyan);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--cyan);
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid,
  .about-grid,
  .locations-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    clip-path: circle(0% at 100% 0);
    transition: clip-path 0.4s ease-in-out;
  }

  .nav-menu.active {
    clip-path: circle(140% at 100% 0);
  }

  .mobile-toggle {
    display: block;
  }

  .nav-actions {
    display: none;
  }

  .about-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .brand-subtitle {
    display: none;
  }

  .hero-badges {
    grid-template-columns: 1fr;
  }

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