/* Base Styles */
:root {
  --primary-color: #2d79f3;
  --secondary-color: #063e9e;
  --accent-color: #ff7a01;
  --highlight-red: #ff0000;
  --text-color: #333;
  --light-text: #fff;
  --bg-color: #f8f9fa;
  --footer-bg: #a1afcb;
  --section-bg: #f0f4f8;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Navigation */
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand-logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger .line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: var(--transition);
}

.nav-links ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
  position: relative;
  padding: 5px 0;
}

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

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

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

.hamburger.active .line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.med-import-btn {
  border: none;
  display: block;
  position: relative;
  padding: 0.5em 1.4em;
  font-size: 15px;
  background-color: #00173c;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  color: rgb(255, 255, 255);
  z-index: 1;
  font-family: inherit;
  font-weight: 350;
  transition: all 0.4s ease;
  border-radius: 10px;
}

.med-import-btn span {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: -1;
  /* border: 1.5px solid rgb(255, 255, 255); */
  border-radius: 15px 15px;
  transition: all 0.3s ease;
}

/* Glow effect container */
.med-import-btn::before {
  content: "";
  position: absolute;
  top: -7px;
  left: -6px;
  right: -6px;
  bottom: -7px;
  border-radius: 2px;
  background: transparent;
  z-index: -2;
  opacity: 0;
  transition: all 0.3s ease;
}

.med-import-btn:hover {
  color: rgb(247, 247, 247);
  opacity: 2;
  box-shadow: 0 0 2px rgba(24, 40, 226, 0.8), 0 0 5px rgba(24, 40, 226, 0.6),
    0 0 10px rgba(24, 40, 226, 0.4);
}

.med-import-btn:hover span {
  border-color: rgb(24, 40, 226);
}

/* === HERO SECTION === */
.chile-hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("./../assets/chile2.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 75vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  width: 100%;
  padding: 0 20px;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.hero-divider {
  width: 80px;
  height: 4px;
  background: var(--accent-color);
  margin: 0 auto 25px;
  border-radius: 2px;
}

.hero-content p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.95;
  font-weight: 300;
  line-height: 1.6;
}

.highlight-red {
    color: var(--highlight-red);
}

/* === CHILE CONTENT === */
.chile-content-section {
    padding: 100px 0;
    background-color: #fff;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.text-content {
    padding-right: 20px;
}

.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: rgba(45, 121, 243, 0.1);
    color: var(--primary-color);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.text-content h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    line-height: 1.3;
    font-weight: 700;
}

.text-content p {
    font-size: 1.05rem;
    color: #556987;
    line-height: 1.7;
    margin-bottom: 20px;
}

.image-content {
    position: relative;
}

.image-frame {
    position: relative;
    z-index: 1;
}

.image-frame::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
    transition: var(--transition);
}

.image-frame:hover::before {
    top: -15px;
    left: -15px;
    opacity: 0.6;
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
    display: block;
}

.featured-image:hover {
    transform: translateY(-5px);
}


/* Map and Partners Section */
.map-partners-section {
  padding: 80px 0 100px;
  background-color: var(--section-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.subtitle {
  display: block;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-header h2 {
  color: var(--secondary-color);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0;
}

.map-container {
  max-width: 1000px;
  margin: 0 auto 80px;
  background: white;
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.map-container iframe {
  width: 100%;
  height: 450px;
  border: none;
  border-radius: 15px;
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}


/* Partners Marquee Section */
.partners-container {
  overflow: hidden;
  position: relative;
  padding: 50px 0;
}

.partners-container > h2 {
  justify-content: center;
  align-items: center;
  display: flex;
  margin-bottom: 27px;
  font-size: 33px;
  color: rgb(62, 62, 178);
}

.partners-marquee {
  display: flex;
  width: 100%;
  animation: scroll 20s linear infinite;
}

.partners-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 40px;
  padding: 0 20px;
}

.partner-item {
  flex: 0 0 auto;
  padding: 10px 20px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 120px;
}

.partner-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Footer */
.footer {
  background-color: var(--footer-bg);
  color: var(--text-color);
  padding: 50px 0 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand {
  flex: 1;
  min-width: 250px;
}

.footer-logo {
  height: 70px;
  width: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  mix-blend-mode: color-burn;
}

.footer-description {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
}

.social-links {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: white;
  color: var(--text-color);
  transition: var(--transition);
  font-size: 14px;
}

.social-links a:hover {
  transform: translateY(-3px);
  color: white;
}

.social-links a:hover.facebook {
  background-color: #1877f2;
}

.social-links a:hover.twitter {
  background-color: #1da1f2;
}

.social-links a:hover.instagram {
  background-color: #e4405f;
}

.social-links a:hover.whatsapp {
  background-color: #25d366;
  color: white;
}

.footer-links {
  flex: 1;
  display: flex;
  gap: 20px;
  min-width: 250px;
  justify-content: center;
}

.links-column {
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.links-column h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.links-column ul {
  list-style: none;
  padding: 0;
}

.links-column li {
  margin-bottom: 8px;
}

.links-column a {
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  font-size: 14px;
  display: inline-block;
}

.links-column a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-contact-form {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.footer-contact-form h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: "Poppins", sans-serif;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(45, 121, 243, 0.2);
}

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

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.submit-btn,
.reset-btn {
  padding: 12px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn {
  background-color: var(--accent-color);
  color: white;
  flex: 2;
}

.submit-btn:hover {
  background-color: #e06b00;
}

.reset-btn {
  background-color: #ddd;
  color: var(--text-color);
  flex: 1;
}

.reset-btn:hover {
  background-color: #ccc;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.copyright {
  font-size: 14px;
  color: var(--text-color);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  /* Small desktops */
  .hero-overlay h1 {
    font-size: 2.5rem;
  }

  .headquarters-content h2 {
    font-size: 2.2rem;
  }

  .headquarters-content h3 {
    font-size: 1.8rem;
  }
}

@media (max-width: 992px) {
  /* Tablets */
  .chile-hero {
    height: 45vh;
  }

  .hero-overlay h1 {
    font-size: 2.2rem;
  }

  .headquarters-content h2 {
    font-size: 2rem;
  }

  .headquarters-content h3 {
    font-size: 1.6rem;
  }

  .map-container iframe {
    height: 350px;
  }

  .partner-item {
    min-width: 160px;
    height: 110px;
  }

  /* Make content responsive on tablet */
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .text-content {
    padding-right: 0;
    text-align: center;
  }

  .image-frame::before {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Small tablets and large phones */
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 999;
    padding: 20px 0;
  }

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

  .nav-links ul {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .chile-hero {
    height: 40vh;
    margin-top: 80px;
  }

  .hero-overlay h1 {
    font-size: 2rem;
  }

  .headquarters-section,
  .map-partners-section {
    padding: 40px 20px;
  }

  .headquarters-content h2 {
    font-size: 1.8rem;
  }

  .headquarters-content h3 {
    font-size: 1.5rem;
  }

  .map-container iframe {
    height: 300px;
  }

  /* Footer Mobile Styles */
  .footer-main {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .footer-links {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    gap: 30px;
  }

  .links-column {
    margin-bottom: 20px;
  }

  .footer-brand,
  .footer-contact-form {
    width: 100%;
    max-width: 400px;
  }

  .partner-item {
    min-width: 140px;
    height: 100px;
  }
}

@media (max-width: 576px) {
  /* Phones */
  .chile-hero {
    height: 35vh;
  }

  .hero-overlay h1 {
    font-size: 1.8rem;
  }

  .headquarters-content h2 {
    font-size: 1.6rem;
  }

  .headquarters-content h3 {
    font-size: 1.3rem;
  }

  .flag-image {
    width: 120px;
  }

  .map-container iframe {
    height: 250px;
  }

  .partners-marquee {
    animation: scroll 8s linear infinite;
  }

  .partner-item {
    min-width: 120px;
    height: 80px;
    padding: 10px 15px;
  }

  /* Footer Mobile Styles */
  .footer-links {
    max-width: 250px;
  }

  .footer {
    padding: 40px 0 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .submit-btn,
  .reset-btn {
    width: 100%;
  }
}

@media (max-width: 400px) {
  /* Small phones */
  .brand-logo img {
    height: 50px;
  }

  .hero-overlay h1 {
    font-size: 1.6rem;
  }

  .headquarters-content h2 {
    font-size: 1.4rem;
  }

  .headquarters-content h3 {
    font-size: 1.2rem;
  }

  .flag-image {
    width: 100px;
  }

  .map-container h2,
  .partners-container h2 {
    font-size: 1.5rem;
  }

  .partner-item {
    min-width: 100px;
    height: 70px;
  }

  .footer-logo {
    height: 60px;
  }
}
/* scroll to up  */
.scroll-to-top {
  position: fixed;
  bottom: 35px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #1f5ec5, #ba7cd2);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  border: none;
  outline: none;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: linear-gradient(135deg, #ba7cd2, #1f5ec5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transform: scale(1.05) translateY(0);
}

.scroll-to-top:active {
  transform: scale(0.95) translateY(0);
}

.scroll-to-top::after {
  content: "↑";
  font-size: 28px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.scroll-to-top:hover::after {
  animation: bounce 0.8s infinite alternate;
}

.scroll-to-top .progress-circle {
  position: absolute;
  top: -5px;
  left: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: white;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

/* Pulse animation */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(157, 80, 187, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(157, 80, 187, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(157, 80, 187, 0);
  }
}

/* Bounce animation */
@keyframes bounce {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-5px);
  }
}

/* Tooltip */
.scroll-to-top .tooltip {
  position: absolute;
  top: -70px;
  background: white;
  color: #1f5ec5;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.scroll-to-top .tooltip::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: white transparent transparent;
}

.scroll-to-top:hover .tooltip {
  opacity: 1;
  visibility: visible;
  top: -60px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scroll-to-top {
    width: 50px;
    height: 50px;
    bottom: 90px;
    right: 20px;
  }

  .scroll-to-top::after {
    font-size: 24px;
  }

  .scroll-to-top .tooltip {
    font-size: 12px;
    padding: 6px 10px;
    top: -45px;
  }

  .scroll-to-top:hover .tooltip {
    top: -50px;
  }
}
