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

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--primary-light);
  background-color: var(--neutral-light);
  overflow-x: hidden;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1.25rem;
}

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

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

ul, ol {
  list-style: none;
}

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

.section-padding {
  padding: 5rem 0;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--primary);
}

.btn-accent:hover {
  background-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Header & Navigation */
.top-bar {
  background-color: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-info {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.top-bar-item a:hover {
  color: var(--accent);
}

.top-bar-socials {
  display: flex;
  gap: 1rem;
}

.top-bar-socials a {
  opacity: 0.8;
}

.top-bar-socials a:hover {
  opacity: 1;
  color: var(--accent);
}

header.main-header {
  position: sticky;
  top: 0;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

header.main-header.scrolled {
  box-shadow: var(--shadow-md);
  padding: 0.25rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  height: 55px;
}

.logo-wrapper img {
  height: 100%;
  width: auto;
}

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

.nav-link {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--primary-light);
  padding: 0.5rem 0;
  position: relative;
}

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

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

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary);
  margin: 5px 0;
  transition: var(--transition-fast);
}

/* Footer Section */
footer.main-footer {
  background-color: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 4rem;
  border-top: 4px solid var(--accent);
}

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

.footer-col h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent);
}

.footer-col.about-col .footer-logo {
  height: 60px;
  margin-bottom: 1.25rem;
  filter: brightness(0) invert(1);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-links a::before {
  content: '›';
  font-size: 1.2rem;
  color: var(--accent);
  line-height: 0;
}

.footer-links a:hover {
  color: white;
  padding-left: 0.3rem;
}

.footer-map-container {
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.footer-bottom {
  background-color: var(--neutral-dark);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-link {
  color: rgba(255, 255, 255, 0.4);
  transition: var(--transition-fast);
}

.footer-bottom-link:hover {
  color: var(--accent);
}

/* Chat de WhatsApp Flotante */
.whatsapp-chat-bubble {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: flex;
  align-items: center;
}

.whatsapp-bubble-btn {
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
}

.whatsapp-bubble-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-bubble-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.whatsapp-popup {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 320px;
  background-color: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-normal);
  border: 1px solid var(--neutral-border);
}

.whatsapp-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.whatsapp-popup-header {
  background-color: #075E54;
  color: white;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.whatsapp-avatar {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: var(--radius-full);
  background-color: #128C7E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid white;
}

.whatsapp-avatar::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background-color: #25D366;
  border: 2px solid white;
}

.whatsapp-popup-body {
  padding: 1.5rem;
  background-color: #E5DDD5;
  background-image: radial-gradient(rgba(0,0,0,0.08) 1px, transparent 0);
  background-size: 15px 15px;
  max-height: 250px;
  overflow-y: auto;
}

.whatsapp-message-bubble {
  background-color: white;
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  margin-bottom: 0.5rem;
}

.whatsapp-popup-footer {
  padding: 1rem;
  background-color: white;
  border-top: 1px solid var(--neutral-border);
}

.whatsapp-popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #25D366;
  color: white;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: var(--transition-fast);
}

.whatsapp-popup-btn:hover {
  background-color: #128C7E;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Responsiveness Base */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  header.main-header {
    height: 70px;
  }
  .nav-container {
    height: 70px;
  }
  .menu-toggle {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--primary);
    flex-direction: column;
    padding: 3rem 1.5rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: var(--transition-normal);
    z-index: 999;
  }
  .nav-menu.active {
    transform: translateX(0);
  }
  .nav-link {
    color: white;
    font-size: 1.25rem;
  }
  .nav-link:hover, .nav-link.active {
    color: var(--accent);
  }
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
