@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&display=swap');

:root {
  --primary: #0077b6;
  --primary-light: #ade8f4;
  --primary-glow: rgba(0, 119, 182, 0.4);
  --accent: #03045e;
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-light: #666666;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 30px 60px rgba(0, 119, 182, 0.15);
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  background: var(--white);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  background: #fdfdfd;
}

/* Custom Selection */
::selection {
  background: var(--primary);
  color: white;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 2rem 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

nav.scrolled {
  padding: 1.2rem 10%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  cursor: pointer;
}

.logo-svg {
  filter: drop-shadow(0 0 10px var(--primary-glow));
  transition: var(--transition);
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
}

.logo-text span {
  color: var(--primary);
  font-weight: 800;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--accent);
  cursor: pointer;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 3rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  height: 100vh;
  width: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url('./hero.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding-top: 0;
  margin-top: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: -2px;
  animation: slideDown 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  font-weight: 300;
  letter-spacing: 1px;
  max-width: 600px;
  margin-inline: auto;
  opacity: 0;
  animation: fadeIn 1s 0.5s forwards;
}

.btn {
  display: inline-block;
  padding: 1.1rem 2.8rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: 700;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: var(--transition);
  position: relative;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 119, 182, 0.2);
}

.btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 119, 182, 0.3);
}

.btn:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 2px 10px rgba(0, 119, 182, 0.2);
  transition: all 0.1s ease;
}

/* Glass Cards Layout */
section {
  padding: 150px 10%;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 6rem;
}

.section-title h2 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: -1px;
}

.underline {
  width: 60px;
  height: 6px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  margin: 1.5rem auto;
  border-radius: 10px;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
  gap: 3rem;
}

.service-card {
  background: var(--white);
  padding: 4rem 3rem;
  border-radius: 40px;
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.03);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-light), transparent);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

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

.service-card i {
  font-size: 4rem;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
  display: inline-block;
  transition: var(--transition);
}

.service-card:hover i {
  transform: scale(1.1) rotate(5deg);
}

/* Location Section */
.location {
  border-radius: 100px 100px 0 0;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.location-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 3rem 2rem;
  border-radius: 30px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.location-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 119, 182, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.card-icon-small {
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
}

.location-card:hover .card-icon-small {
  background: var(--primary);
  color: white;
  transform: scale(1.1) rotate(5deg);
}

.location-card h3 {
  font-size: 1.4rem;
  color: white;
  margin-bottom: 1rem;
}

.location-card p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.outside-box {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
}

.outside-info {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem 3rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  max-width: 700px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.outside-info:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.outside-info i {
  font-size: 1.8rem;
  color: white;
}

.outside-text h4 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.outside-text p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Contact Cards */
/* Contact Section Upgrade */
.contact-methods {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 3rem auto 0;
}

.contact-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: 4rem 3rem;
  border-radius: 50px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
  flex: 1;
  min-width: 320px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-card:hover {
  transform: translateY(-15px);
  background: white;
  box-shadow: 0 30px 60px -15px rgba(0, 119, 182, 0.2);
}

.card-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 20px rgba(0, 119, 182, 0.3);
  transition: var(--transition);
}

.contact-card:hover .card-icon {
  transform: rotateY(180deg);
}

.contact-card h3 {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.card-desc {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.contact-btn {
  width: 100%;
  padding: 1.2rem;
  background: var(--accent);
  border-radius: 20px;
  font-size: 1rem;
  box-shadow: none;
}

.contact-btn:hover {
  background: var(--primary);
  transform: scale(1.02);
}

/* Footer */
footer {
  background: var(--accent);
  color: white;
  padding: 6rem 10%;
  text-align: center;
  border-radius: 80px 80px 0 0;
}

/* Keyframes */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive */
@media (max-width: 968px) {
  .hero {
    background-attachment: scroll; /* Fix for mobile hero image */
    background-size: cover;
  }
  
  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 80%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: center;
    box-shadow: -15px 0 35px rgba(0,0,0,0.15);
    transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    padding: 2rem;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 1.2rem 0;
  }

  .nav-links a {
    font-size: 1.5rem;
  }

  .call-btn {
    display: none;
  }

  .hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .services {
    padding: 60px 5% !important;
  }

  .services-grid {
    gap: 1.2rem;
  }

  .service-card {
    padding: 2rem 1.5rem !important;
    border-radius: 30px;
  }

  .service-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
  }

  .service-card p {
    font-size: 0.9rem;
  }
  
  .location {
    padding: 80px 5% !important;
  }

  .location-grid {
    gap: 1.5rem;
  }
  
  .location-card.wide-card,
  .more-services {
    grid-column: span 1 !important;
    flex-direction: column !important;
    text-align: center !important;
    padding: 2rem 1.5rem !important;
  }

  .location-card {
    padding: 2rem 1.5rem;
  }

  .outside-info {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .contact-methods {
    flex-direction: column;
    gap: 1rem;
  }

  .contact-card {
    min-width: 100%;
    padding: 1.5rem;
    border-radius: 30px;
  }

  .card-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 20px;
  }

  .contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .contact-value {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .card-desc {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }

  .contact-btn {
    padding: 0.8rem;
    border-radius: 15px;
  }

  .slider-container {
    height: 250px !important;
    border-width: 4px;
    border-radius: 25px;
    margin-top: 1rem;
  }

  .slider::-webkit-slider-thumb {
    height: 250px !important;
  }

  .before-after {
    padding: 40px 5% !important;
  }

  .before-after h2 {
    font-size: 1.8rem;
  }

  .reviews {
    padding: 60px 5% !important;
  }

  .reviews-grid {
    gap: 1.2rem;
  }

  .review-card {
    padding: 1.5rem;
    border-radius: 25px;
  }

  .review-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .review-card h4 {
    font-size: 1.1rem;
  }
  
  .guarantees {
    gap: 1rem;
    padding-top: 2rem;
  }

  .guarantee-item {
    min-width: 45%;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  section {
    padding: 60px 5%;
  }

  .logo-text {
    font-size: 1.2rem;
  }
}

/* Partners */
.partners-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
  transition: var(--transition);
}

.partners-grid:hover {
  opacity: 1;
  filter: grayscale(0);
}

.partner-img {
  height: 60px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: var(--transition);
}

.partner-img:hover {
  transform: scale(1.1);
}

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.review-card {
  background: white;
  padding: 3rem;
  border-radius: 40px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.02);
}

.review-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
}

.stars {
  color: #ffc107;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.review-card p {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.review-card h4 {
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.review-card span {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

/* Floating Button */
.floating-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 65px;
  height: 65px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 119, 182, 0.4);
  z-index: 999;
  text-decoration: none;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 119, 182, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(0, 119, 182, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 119, 182, 0); }
}

.floating-btn:hover {
  background: var(--accent);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .floating-btn {
    width: 55px;
    height: 55px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* Before & After Slider */
.slider-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 500px;
  margin: 0 auto;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 10px solid white;
}

.slider-container .img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.slider-container .foreground-img {
  width: 50%;
  z-index: 2;
}

.slider {
  position: absolute;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 100%;
  background: transparent;
  outline: none;
  margin: 0;
  transition: all 0.2s;
  z-index: 10;
  cursor: ew-resize;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 5px;
  height: 500px;
  background: white;
  cursor: ew-resize;
}

.slider-button {
  pointer-events: none;
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  left: calc(50% - 25px);
  top: calc(50% - 25px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 11;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.slider-button::after {
  content: '↔';
  color: var(--primary);
  font-weight: bold;
  font-size: 20px;
}

/* Guarantees */
.guarantees {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(0, 119, 182, 0.1);
}

.guarantee-item {
  text-align: center;
  flex: 1;
  min-width: 150px;
}

.guarantee-item i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.guarantee-item p {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .floating-btn {
    width: 55px;
    height: 55px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* Move Iubenda to the Left - Forced & Mobile */
#iubenda-cs-banner, 
.iubenda-cs-container, 
.iubenda-cs-default, 
.iubenda-cs-bottom,
.iubenda-banner,
#iubenda-cs-banner.iubenda-cs-default {
    left: 0 !important;
    right: auto !important;
    margin-left: 0px !important;
    margin-right: auto !important;
    width: auto !important;
}

#iubenda-cs-banner .iubenda-cs-content {
    margin-left: 0 !important;
    margin-right: auto !important;
}

@media (max-width: 768px) {
    #iubenda-cs-banner, .iubenda-cs-container {
        left: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        max-width: 80% !important;
    }
}

/* ==========================================================================
   AI CHATBOT WIDGET STYLES (Ultra Premium Redesign)
   ========================================================================== */
.ai-widget-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  font-family: 'Outfit', sans-serif;
}

.ai-hidden {
  display: none !important;
}

/* Floating Trigger Button */
.ai-chat-trigger {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: white;
  color: var(--primary);
  border: 1px solid rgba(0, 119, 182, 0.1);
  cursor: pointer;
  box-shadow: 0 15px 35px rgba(0, 119, 182, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-chat-trigger:hover {
  transform: scale(1.08) translateY(-5px);
  box-shadow: 0 25px 45px rgba(0, 119, 182, 0.25);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
}

.ai-chat-trigger i {
  transition: transform 0.4s ease;
}

.ai-chat-trigger.active i {
  transform: rotate(90deg) scale(1.1);
}

/* Pulse Ring around Trigger */
.ai-pulse-ring {
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 50%;
  border: 2px solid var(--primary-light);
  animation: ai-pulse 2s infinite;
  pointer-events: none;
}

@keyframes ai-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* Chat Window */
.ai-chat-window {
  position: absolute;
  bottom: 90px;
  right: 0;
  width: 420px;
  height: 650px;
  max-height: calc(100vh - 130px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 40px;
  box-shadow: 0 35px 60px -15px rgba(0, 119, 182, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(30px) scale(0.9);
  opacity: 0;
  pointer-events: none;
}

.ai-chat-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.ai-chat-header {
  background: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 119, 182, 0.05);
  z-index: 10;
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ai-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  background: white;
  color: var(--primary);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 10px 20px rgba(0, 119, 182, 0.1);
}

.ai-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  background: #10b981;
}

.ai-chat-header h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0;
  letter-spacing: -0.5px;
}

.ai-chat-header p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
  font-weight: 500;
}

.ai-chat-header-actions {
  display: flex;
}

.ai-chat-header-actions button {
  background: #f8fbff;
  border: 1px solid rgba(0, 119, 182, 0.05);
  color: var(--primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: var(--transition);
  margin-left: 0.5rem;
}

.ai-chat-header-actions button:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

/* Chat Messages */
.ai-chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: #fdfdfd;
  scroll-behavior: smooth;
}

.ai-chat-messages::-webkit-scrollbar { width: 6px; }
.ai-chat-messages::-webkit-scrollbar-track { background: transparent; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 10px; }

.ai-message {
  display: flex;
  gap: 1rem;
  max-width: 88%;
  animation: ai-message-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ai-message-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-message.model {
  align-self: flex-start;
}

.ai-message.system {
  align-self: center;
  max-width: 95%;
  text-align: center;
  font-size: 0.85rem;
  animation: none;
}

.ai-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: white;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.ai-message.user .ai-msg-avatar {
  background: var(--accent);
  color: white;
}

.ai-message-content {
  padding: 1rem 1.2rem;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.ai-message.model .ai-message-content {
  background: white;
  color: var(--text);
  border-top-left-radius: 4px;
  border: 1px solid rgba(0, 119, 182, 0.05);
}

.ai-message.user .ai-message-content {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-top-right-radius: 4px;
}

.ai-message.system .ai-message-content {
  background: rgba(254, 243, 199, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #b45309;
  border-radius: 15px;
  padding: 0.6rem 1rem;
}

.ai-message-content p { margin: 0 0 0.5rem 0; }
.ai-message-content p:last-child { margin-bottom: 0; }
.ai-message-content ul, .ai-message-content ol { margin: 0.5rem 0; padding-left: 1.2rem; }
.ai-message-content li { margin-bottom: 0.3rem; }

/* Typing Indicator */
.ai-typing-indicator {
  display: flex;
  gap: 5px;
  padding: 8px 4px;
}

.ai-typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: ai-bounce 1.4s infinite ease-in-out both;
}

.ai-typing-indicator span:nth-child(1) { animation-delay: -0.32s; background: var(--primary); }
.ai-typing-indicator span:nth-child(2) { animation-delay: -0.16s; background: var(--primary); }

@keyframes ai-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Suggestions Tags */
.ai-chat-suggestions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.5rem 1rem;
  overflow-x: auto;
  background: white;
}

.ai-chat-suggestions::-webkit-scrollbar { display: none; }

.ai-suggestion-btn {
  background: white;
  border: 1px solid var(--primary-light);
  color: var(--primary);
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.ai-suggestion-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 119, 182, 0.2);
}

/* Input Area */
.ai-chat-input-area {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  background: white;
  border-top: 1px solid rgba(0, 119, 182, 0.05);
}

.ai-chat-input-area textarea {
  flex: 1;
  border: 1px solid rgba(0, 119, 182, 0.1);
  background: #f8fbff;
  border-radius: 24px;
  padding: 0.9rem 1.2rem;
  font-size: 0.95rem;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 120px;
  min-height: 50px;
  line-height: 1.4;
  transition: all 0.3s;
}

.ai-chat-input-area textarea:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 5px 15px rgba(0, 119, 182, 0.05);
}

.ai-send-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 20px rgba(0, 119, 182, 0.2);
}

.ai-send-btn:hover:not(:disabled) {
  background: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(0, 119, 182, 0.3);
}

.ai-send-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

/* Settings Panel */
.ai-settings-panel {
  position: absolute;
  top: 85px;
  left: 0;
  width: 100%;
  height: calc(100% - 85px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(100%);
  border-radius: 0 0 40px 40px;
}

.ai-settings-panel.open {
  transform: translateX(0);
}

.ai-settings-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 119, 182, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-settings-header h5 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
  color: var(--accent);
}

.ai-settings-back {
  background: #f8fbff;
  border: 1px solid rgba(0, 119, 182, 0.05);
  color: var(--primary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.ai-settings-back:hover {
  background: var(--primary);
  color: white;
  transform: translateX(-4px);
}

.ai-settings-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light);
}

.ai-settings-body p { margin-bottom: 1.5rem; }

.ai-form-group { margin-bottom: 1.5rem; }
.ai-form-group label {
  display: block;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.ai-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.ai-input-wrapper input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.2rem;
  border: 1px solid rgba(0, 119, 182, 0.15);
  border-radius: 16px;
  font-size: 0.9rem;
  outline: none;
  font-family: monospace;
  background: #f8fbff;
  transition: all 0.3s;
}

.ai-input-wrapper input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 5px 15px rgba(0, 119, 182, 0.05);
}

.ai-toggle-visibility {
  position: absolute;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 1rem;
}

.ai-toggle-visibility:hover { color: var(--accent); }

.ai-save-key-btn {
  width: 100%;
  padding: 1.1rem;
  border-radius: 16px;
  font-size: 1rem;
  margin-bottom: 2rem;
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 20px rgba(0, 119, 182, 0.2);
}
.ai-save-key-btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(0, 119, 182, 0.3);
}

.ai-key-instructions {
  background: white;
  border: 1px solid rgba(0, 119, 182, 0.1);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.ai-key-instructions h6 {
  font-weight: 800;
  color: var(--accent);
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
}

.ai-key-instructions ol { margin: 0; padding-left: 1.2rem; }
.ai-key-instructions li { margin-bottom: 0.6rem; font-size: 0.85rem; }

.ai-key-instructions a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.ai-key-instructions a:hover { text-decoration: underline; }

.ai-note {
  font-size: 0.8rem;
  color: #64748b;
  margin: 1rem 0 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}




/* Hide scrollbar and resize arrows in the textarea */
.ai-chat-input-area textarea::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}
.ai-chat-input-area textarea {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;  /* Firefox */
  resize: none !important;
}

/* Floating Tooltip */
.ai-chat-tooltip {
  position: absolute;
  right: 85px;
  bottom: 10px;
  background: white;
  color: var(--text);
  padding: 1rem 1.2rem;
  border-radius: 20px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 15px 35px rgba(0, 119, 182, 0.15);
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(20px) scale(0.9);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 119, 182, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 10000;
}

.ai-chat-tooltip.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.ai-chat-tooltip strong {
  color: var(--primary);
}

.ai-tooltip-close {
  cursor: pointer;
  color: #94a3b8;
  font-size: 1rem;
  padding: 5px;
  transition: color 0.3s;
}

.ai-tooltip-close:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .ai-widget-container { 
    bottom: 15px; 
    right: 15px; 
  }
  
  /* Chat Window takes full safe area on mobile */
  .ai-chat-window {
    position: fixed;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 90px; /* leaves room for the trigger button */
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 25px;
  }
  
  .ai-chat-trigger {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .ai-chat-header {
    padding: 1rem;
    border-radius: 25px 25px 0 0;
  }
  
  .ai-chat-messages {
    padding: 1rem;
  }
  
  .ai-chat-input-area {
    padding: 0.8rem 1rem 1rem;
    border-radius: 0 0 25px 25px;
  }
  
  .ai-chat-input-area textarea {
    padding: 0.8rem 1rem;
    font-size: 1rem; /* Prevents iOS auto-zoom */
  }

  /* Tooltip mobile adjustment */
  .ai-chat-tooltip {
    right: 75px;
    bottom: 10px;
    padding: 0.8rem;
    font-size: 0.8rem;
    white-space: normal;
    min-width: 250px;
  }
  
  .ai-message {
    max-width: 92%; /* Give more space to text on small screens */
  }
}
/* Hide Iubenda Floating Badge */
#iubenda-cs-badge,
#iubenda-badge,
.iubenda-badge {
  display: none !important;
}

/* Premium Slider Improvements */
.premium-slider {
    border: 8px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    margin-top: 3rem;
}

.before-label, .after-label {
    position: absolute;
    top: 25px;
    padding: 8px 20px;
    background: rgba(0,0,0,0.5);
    color: white;
    font-weight: 700;
    border-radius: 50px;
    z-index: 10;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    letter-spacing: 2px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.2);
    pointer-events: none;
}
.before-label { left: 25px; }
.after-label { right: 25px; }

.premium-slider-btn {
    box-shadow: 0 0 25px rgba(0, 119, 182, 0.6) !important;
    border: 3px solid var(--primary);
    width: 60px !important;
    height: 60px !important;
    left: calc(50% - 30px) !important;
    top: calc(50% - 30px) !important;
}

.premium-slider-btn::after {
    font-size: 24px !important;
}
