/* 
   Control Legal - CSS
   Colors:
   Azul Profundo: #0E2A47
   Verde Petróleo: #0F4A45
   Plata Ejecutivo: #B5BCC3
   Neutros: #CFCFCF, #FFFFFF, #1A1A1A
*/

:root {
  --color-primary: #0e2a47; /* Azul Profundo */
  --color-secondary: #0f4a45; /* Verde Petróleo */
  --color-accent: #b5bcc3; /* Plata Ejecutivo */
  --color-neutral-light: #f4f6f8;
  --color-neutral: #cfcfcf;
  --color-dark: #121a21;
  --color-white: #ffffff;

  --font-heading: "Cinzel", serif;
  --font-quote: "Playfair Display", serif;
  --font-body: "Montserrat", sans-serif;

  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-neutral-light);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================================
   Navbar
========================================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.nav-brand {
  display: flex !important;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
}

.brand-logo {
  height: 120px; /* Tripled from 40px/45px base */
  width: auto;
  transition: var(--transition);
}

.nav-brand-text {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-primary);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--color-secondary);
}

.btn-primary-outline {
  border: 2px solid var(--color-primary);
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  font-weight: 600 !important;
}

.btn-primary-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white) !important;
}

.menu-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: var(--color-primary);
  transition: var(--transition);
}

/* =========================================
   Hero Section Pattern F targeting
========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(
      135deg,
      rgba(14, 42, 71, 0.9) 0%,
      rgba(15, 74, 69, 0.95) 100%
    ),
    url("../assets/img/hero-bg.jpg") center/cover no-repeat;
  color: var(--color-white);
  padding-top: 180px; /* Increased from 80px to accommodate 120px logo + navbar padding */
}

.hero-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  max-width: 700px;
}

.hero-logo-large {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeInUp 1.2s ease 0.6s forwards;
}

.hero-logo-large img {
  max-width: 100%;
  height: auto;
  max-height: 500px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

.hero-subtitle {
  font-family: var(--font-quote);
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
  font-style: italic;
  opacity: 0;
  animation: fadeInUp 1s ease 0.2s forwards;
}

.hero-title {
  font-size: 4rem;
  color: var(--color-white);
  margin-bottom: 1.5rem;
  opacity: 0;
  line-height: 1.1;
  animation: fadeInUp 1s ease 0.4s forwards;
}

.brand-highlight {
  color: var(--color-accent);
  font-weight: 700;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  font-weight: 400;
  max-width: 650px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  opacity: 0;
  animation: fadeInUp 1s ease 0.8s forwards;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-primary);
  padding: 1rem 2.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-heading);
}

.btn-primary:hover {
  background-color: var(--color-white);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-whatsapp-link {
  color: var(--color-white);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: var(--transition);
}

.btn-whatsapp-link:hover {
  color: var(--color-accent);
}

/* =========================================
   Trust Badges (Hero) 
========================================= */
.trust-badges {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  animation: fadeInUp 1s ease 1s forwards;
}

.trust-badges p {
  font-size: 0.85rem;
  color: #ccc;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.trust-badges .flex {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0.85;
}

.trust-badge-item {
  color: var(--color-accent);
  font-size: 0.95rem;
  font-weight: 500;
}

.wow-effect {
  position: relative;
  overflow: hidden;
}

.wow-effect::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: 0.5s;
}

.wow-effect:hover::after {
  animation: ripple 1s ease-out;
}

/* =========================================
   Services Section
========================================= */
.services {
  padding: 6rem 0;
  background-color: var(--color-white);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 4rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background-color: var(--color-secondary);
  margin: 1rem auto 0;
}

/* =========================================
   Premium Practice Areas Section
========================================= */
.container-large {
  max-width: 1400px;
}

.services-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 3rem;
  margin-bottom: 5rem;
}

.service-card-premium {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.service-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(14, 42, 71, 0.95) 0%, rgba(14, 42, 71, 0.6) 40%, rgba(14, 42, 71, 0.2) 100%);
  z-index: 1;
  transition: opacity 0.5s ease;
}

.service-card-premium:hover::before {
  opacity: 0.85;
}

.service-card-premium:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon-premium,
.service-content-premium {
  position: relative;
  z-index: 2;
}

.service-icon-premium {
  position: absolute;
  top: 30px;
  left: 30px;
  opacity: 0.8;
  transition: var(--transition);
}

.service-card-premium:hover .service-icon-premium {
  transform: scale(1.1);
  opacity: 1;
}

.service-title-premium {
  color: var(--color-accent);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.service-subtitle-premium {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.service-details-expanded {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card-premium:hover .service-details-expanded {
  max-height: 500px;
  opacity: 1;
  margin-top: 1.5rem;
}

.service-details-expanded p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #e0e0e0;
}

.service-details-expanded ul {
  list-style: none;
  margin-bottom: 2rem;
}

.service-details-expanded li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  color: var(--color-white);
}

.service-details-expanded li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

.btn-service-action {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: var(--transition);
}

.btn-service-action:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

/* =========================================
   Features / Methodology Section
========================================= */
.features-section {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-neutral);
}

.section-title-small {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-item h4 {
  font-size: 1.1rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.feature-item p {
  color: #666;
  font-size: 0.9rem;
}

/* =========================================
   Authority Profiles
========================================= */
.authority {
  padding: 6rem 0;
  background-color: var(--color-primary);
  color: var(--color-white);
}

.authority .section-title {
  color: var(--color-white);
}

.authority .section-title::after {
  background-color: var(--color-accent);
}

.profiles-grid {
  display: grid;
  grid-template-columns: 1fr 250px 1fr;
  align-items: center;
  gap: 3rem;
  margin-top: 3rem;
}

.authority-logo-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.authority-logo-center img {
  width: 100%;
  max-width: 250px;
  height: auto;
  opacity: 0.8;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-image-full {
  width: 100%;
  max-width: 350px;
  height: auto;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Align to bottom for full portrait cutoffs */
}

.profile-image-full img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
  transition: var(--transition);
}

.profile-card:hover .profile-image-full img {
  transform: scale(1.03);
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
}

.profile-info h3 {
  color: var(--color-white);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.profile-role {
  color: var(--color-accent);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.profile-quote {
  font-family: var(--font-quote);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-neutral);
  position: relative;
  padding: 0 1rem;
}

.profile-quote::before {
  content: '"';
  font-size: 3rem;
  color: var(--color-secondary);
  position: absolute;
  top: -15px;
  left: -15px;
  opacity: 0.5;
}

/* =========================================
   Contact Form
========================================= */
.contact {
  padding: 6rem 0;
  background-color: var(--color-white);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-text .section-title {
  text-align: left;
}

.contact-text .section-title::after {
  margin: 1rem 0 0;
}

.contact-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #444;
}

.contact-direct {
  font-size: 1.2rem !important;
  color: var(--color-primary) !important;
  margin-top: 2rem;
  padding-left: 1.5rem;
  border-left: 4px solid var(--color-secondary);
}

.contact-link {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
}

.contact-link:hover {
  text-decoration: underline;
  color: var(--color-primary);
}

.contact-form-wrapper {
  background-color: var(--color-neutral-light);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--color-neutral);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(15, 74, 69, 0.1);
}

.btn-submit {
  width: 100%;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 1rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  font-family: var(--font-heading);
  text-transform: uppercase;
  transition: var(--transition);
}

.btn-submit:hover {
  background-color: var(--color-secondary);
}

.form-status {
  margin-top: 1rem;
  font-weight: 500;
  text-align: center;
}

/* =========================================
   Footer
========================================= */
.footer {
  background-color: var(--color-dark);
  color: var(--color-neutral);
  padding: 6rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.5fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-brand-logo {
  height: 80px;
  width: auto;
  margin-bottom: 1.5rem;
}

.footer-contact-text p {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.footer-legal-notice p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-bottom {
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom .brand-highlight {
  display: inline;
}

.ethics-note {
  font-family: var(--font-quote);
  font-style: italic;
  color: var(--color-accent);
  margin-top: 0.5rem;
}

/* =========================================
   Success Cases Section (Resultados)
========================================= */
.success-cases {
  padding: 6rem 0;
  background: linear-gradient(135deg, #0a1e35, var(--color-primary));
  color: var(--color-white);
  text-align: center;
}

.text-white { color: var(--color-white) !important; }
.text-white::after { background-color: var(--color-accent) !important; }

.section-subtitle.text-white-muted {
  color: var(--color-accent);
  font-size: 1.1rem;
  margin-bottom: 4rem;
  font-family: var(--font-quote);
  font-style: italic;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.interactive-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.interactive-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-secondary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-number {
  font-size: 3.5rem;
  font-family: var(--font-heading);
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.stat-icon-large {
  color: var(--color-accent);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.stat-label {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  z-index: 2;
}

.stat-hover-reveal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 74, 69, 0.95); /* Petroleum Green */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s ease;
  z-index: 3;
}

.interactive-card:hover .stat-hover-reveal {
  opacity: 1;
  transform: translateY(0);
}

.stat-hover-reveal p {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.learn-more {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* =========================================
   Custom Dynamic Modal
========================================= */
.custom-modal-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 42, 71, 0.8);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.custom-modal-content {
  background: var(--color-white);
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  padding: 3rem;
  position: relative;
  transform: scale(0.9);
  transition: all 0.3s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.custom-modal:not(.custom-modal-hidden) .custom-modal-content {
  transform: scale(1);
}

.custom-modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  transition: var(--transition);
}

.custom-modal-close:hover {
  color: var(--color-primary);
  transform: rotate(90deg);
}

.custom-modal-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.custom-modal-body {
  color: #444;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.custom-modal-body ul {
  list-style: none;
  margin-top: 1rem;
}

.custom-modal-body li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
}

.custom-modal-body li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: bold;
}

/* =========================================
   WhatsApp Float
========================================= */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px; /* Left side to balance chatbot */
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

/* =========================================
   Chatbot Widget
========================================= */
.chatbot-hidden {
  display: none !important;
}

#chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  height: 450px;
  background-color: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-neutral);
}

.chatbot-header {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-avatar {
  background-color: rgba(255,255,255,0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Ensure image stays circular */
}

.chatbot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chatbot-header-info h4 {
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 1rem;
  margin: 0;
}

.chatbot-status {
  font-size: 0.75rem;
  color: #a8df65; /* online green */
  display: flex;
  align-items: center;
  gap: 4px;
}

.chatbot-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #a8df65;
  border-radius: 50%;
}

.chatbot-header button {
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.chatbot-header button:hover {
  transform: scale(1.2);
}

.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #f0f4f8;
}

.chat-msg {
  max-width: 85%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  animation: slideIn 0.3s ease-out forwards;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-bot {
  background-color: var(--color-white);
  color: var(--color-dark);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-user {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  color: var(--color-white);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

/* Typing Indicator */
.chatbot-typing-hidden {
  display: none !important;
}

#chatbot-typing {
  display: flex;
  gap: 5px;
  padding: 0.5rem 1rem;
  align-items: center;
  background-color: var(--color-white);
  align-self: flex-start;
  border-radius: 12px;
  border-bottom-left-radius: 2px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin: 0 1rem 0.5rem 1rem;
  width: fit-content;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #fafafa;
}

.chat-msg {
  max-width: 80%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.chat-bot {
  background-color: var(--color-neutral-light);
  color: var(--color-dark);
  align-self: flex-start;
  border-bottom-left-radius: 0;
  border: 1px solid var(--color-neutral);
}

.chat-user {
  background-color: var(--color-secondary);
  color: var(--color-white);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chatbot-input {
  padding: 1rem;
  background-color: var(--color-white);
  border-top: 1px solid var(--color-neutral);
}

.chatbot-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-chat-option {
  background-color: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-chat-option:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.chatbot-toggle-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--color-primary);
  color: var(--color-white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.chatbot-toggle-btn:hover {
  transform: scale(1.1);
  background-color: var(--color-secondary);
}

/* =========================================
   Animations
========================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

/* =========================================
   Responsive Design
========================================= */
@media (max-width: 992px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    flex-direction: column;
    padding: 2rem 0;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .hero-logo-large {
    order: -1; /* Place logo on top for mobile */
    max-height: 300px;
  }

  .hero-logo-large img {
    max-height: 250px;
  }

  .profiles-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .authority-logo-center {
    order: -1; /* Place logo on top or hidden? Let's hide it on very small screens or keep it top */
    margin-bottom: 2rem;
  }

  .hero {
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
    justify-content: center;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .footer-legal {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .btn-primary {
    width: 100%;
  }

  #chatbot-container {
    width: calc(100% - 40px);
    right: 20px;
    bottom: 100px;
  }
}
