/* Estilos generales para Barebide */
:root {
  --primary-color: #6a8d92;
  --secondary-color: #d6c9b6;
  --accent-color: #f5f0e4;
  --text-color: #333;
  --light-text: #666;
  --white: #fff;
  --max-width: 1200px;
  --border-radius: 5px;
  --font-family: 'Raleway', sans-serif;
}

* {
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--white);
  margin: 0px;
}

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

/* Encabezado */
header {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  position: relative;
  z-index: 1002;
}

.logo span {
  color: var(--secondary-color);
}

.logo img {
  width: 24px;
  margin-right: 5px;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a, nav ul li span {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
}

nav ul li a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

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

nav ul li a:hover:after, nav ul li a.active:after {
  width: 100%;
}

/* Dropdown menu styles */
nav ul li.has-dropdown {
  position: relative;
}
nav ul li .dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: var(--white);
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-radius: var(--border-radius);
  z-index: 1001;
  padding: 10px 0;
}
nav ul li.has-dropdown:hover > .dropdown {
  display: block;
}
nav ul li .dropdown li {
  margin: 0;
}
nav ul li .dropdown li a {
  padding: 10px 20px;
  color: var(--text-color);
  display: block;
  font-weight: 400;
  background: none;
}
nav ul li .dropdown li a:hover,
nav ul li .dropdown li a.active {
  background: var(--accent-color);
  color: var(--primary-color);
}

/* Secciones principales */
main {
  margin-top: 100px;
  min-height: calc(100vh - 100px - 80px);
}

section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  color: var(--primary-color);
  font-size: 36px;
  position: relative;
}

.section-title:after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.section-subtitle {
  text-align: center;
  margin-bottom: 40px;
  color: var(--light-text);
  font-size: 18px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero section */
.hero {
  background-color: var(--accent-color);
  background-size: cover;
  background-position: center;
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
}

.hero:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.hero h1:after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 12px 30px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn:hover {
  background-color: #547377;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: #bfae9e;
}

/* Cards */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  height: 100%;
  background-color: var(--white);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card .card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card .card-content {
  padding: 25px;
}

.card .card-title {
  font-size: 22px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.card .card-text {
  margin-bottom: 20px;
  color: var(--text-color);
}

/* About section */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-top: 30px;
}

.about-content .about-text {
  flex: 1;
}

.about-content .about-img {
  flex: 1;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.about-content .slider {
  flex: 1;
}

.about-content .about-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.about-content .about-img:hover img {
  transform: scale(1.03);
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.team-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.team-member {
  text-align: center;
  text-decoration: none;
}

.team-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 3px solid var(--accent-color);
}
.team-img-dentro {
  width: 550px;
  float: right;
  margin: 20px;
}
.team-name {
  font-size: 20px;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.team-role {
  color: var(--light-text);
  margin-bottom: 10px;
}

/* Treatment section */
.treatment-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
}

.treatment-type {
  flex: 1;
  min-width: 300px;
  background-color: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.treatment-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.treatment-list {
  margin-left: 20px;
  margin-bottom: 20px;
}

.treatment-list li {
  margin-bottom: 10px;
}

/* Contact section */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-icon {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 15px;
}

.contact-text h3 {
  margin-bottom: 5px;
}

.contact-form {
  flex: 1;
  min-width: 300px;
  background-color: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 16px;
}

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

/* Footer */
footer {
  background-color: #e3ecec; /* lighten de primary-color */
  padding: 60px 0 30px;
  position: relative;
}
footer:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}
footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
footer .footer-links a {
  margin: 0 15px;
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.3s ease;
}
footer .footer-links a:hover {
  color: var(--primary-color);
}
footer .social-icons {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}
footer .social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--white);
  margin: 0 10px;
  transition: all 0.3s ease;
  color: var(--primary-color);
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
footer .social-icons a:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}
footer p {
  text-align: center;
  color: var(--light-text);
  font-size: 14px;
}

body.no-scroll {
  overflow: hidden;
}

input, textarea, select, button {
  font-family: var(--font-family);
  font-size: 16px;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  width: 100%;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}
input:focus, textarea:focus, select:focus, button:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(106, 141, 146, 0.2);
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero h1 {
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
  opacity: 0;
}
.hero p {
  animation: fadeInUp 0.6s ease-out 0.4s forwards;
  opacity: 0;
}
.hero .btn {
  animation: fadeInUp 0.6s ease-out 0.6s forwards;
  opacity: 0;
}

.fases-intervencion {
  background: #f7f7fa;
  padding: 60px 0 40px 0;
}
.fases-intervencion .section-title {
  text-align: center;
  margin-bottom: 40px;
}
.fases-wrapper {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.fase {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 32px 24px;
  margin: 0 8px;
  min-width: 260px;
  max-width: 320px;
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}
.fase-num {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--primary-color, #4e6fae);
  margin-bottom: 10px;
}
.fase-content h3 {
  margin-top: 0;
  font-size: 1.2em;
  color: var(--primary-color, #4e6fae);
}
.arrow {
  display: flex;
  align-items: center;
  font-size: 2.5em;
  color: var(--primary-color, #4e6fae);
  margin: 0 8px;
  user-select: none;
}
@media (max-width: 900px) {
  .fases-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .arrow {
    transform: rotate(90deg);
    margin: 12px 0;
    font-size: 2em;
  }
  .fase {
    margin: 8px 0;
    max-width: 95vw;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }
  .about-content .about-img {
    order: -1;
    margin-bottom: 30px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero p {
    font-size: 18px;
  }
  .section-title {
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }
  .card-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  .mobile-menu {
    display: block;
  }
  nav {
    display: none;
  }
  nav.active {
    display: block;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 100px 0 80px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .section-title {
    font-size: 26px;
  }
  .card-container {
    grid-template-columns: 1fr;
  }
}

/* Fases intervención 2x2 con flechas curvas SVG */
.fases-grid {
  display: grid;
  position: relative;
  grid-gap: 40px;
  margin: 40px 0 0 0;
}
.fase {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 32px 24px;
  min-width: 220px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}
.fase-1 { grid-column: 1; grid-row: 1; }
.fase-2 { grid-column: 2; grid-row: 2; }
.fase-3 { grid-column: 1; grid-row: 3; }
.fase-4 { grid-column: 2; grid-row: 4; }

@media(min-width: 901px){
  .fases-grid .fase:nth-child(2n+1):after,
  .fases-grid .fase:nth-child(2n):after {
    content: "";
    display: inline-block;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 40px;
    background-repeat: no-repeat;
    background-size: 50%;
  }

  .fases-grid .fase:nth-child(2n+1):after {
    right: -100%;
    background-image: url(/assets/images/uploads/flecha-abajo.svg);
    background-position: bottom left;
  }

  .fases-grid .fase:nth-child(2n):after {
    left: -100%;
    background-image: url(/assets/images/uploads/flecha-abajo-izquierda.svg);
    background-position: bottom right;
  }

  .fases-grid .fase:nth-last-child(1):after {
    display: none;
  }
}

@media (max-width: 900px) {
  .fases-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
    gap: 24px;
  }
  .fase-1, .fase-2, .fase-3, .fase-4 {
    grid-column: 1;
  }
  .arrow-svg {
    display: none;
  }
}

/* Slider simple para index.html */
.slider {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}
.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--border-radius);
}
.slide.active {
  opacity: 1;
  z-index: 2;
}
@media (max-width: 600px) {
  .slider, .slide img {
    height: 180px;
    flex: auto !important;
  }
}

/* --- Menú móvil migrado de SCSS a CSS estándar --- */
.mobile-menu {
  display: block;
  z-index: 1002;
  cursor: pointer;
  width: 30px;
  height: 25px;
  position: relative;
  transition: all 0.3s ease;
}

.mobile-menu-icon {
  margin-top: 10px;
  width: 30px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s ease;
  left: 0;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
  left: 0;
}

.mobile-menu-icon::before {
  top: -10px;
}

.mobile-menu-icon::after {
  top: 10px;
}

.mobile-menu.active .mobile-menu-icon {
  background-color: transparent;
}

.mobile-menu.active .mobile-menu-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-menu.active .mobile-menu-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 0;
  background-color: rgba(255, 255, 255, 0.98);
  z-index: 1001;
  overflow: hidden;
  transition: height 0.4s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-nav-overlay.active {
  height: 100vh;
}

.mobile-nav-overlay ul {
  list-style: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  transition-delay: 0.2s;
  text-align: center;
}

.mobile-nav-overlay.active ul {
  opacity: 1;
}

.mobile-nav-overlay ul li {
  margin: 20px 0;
}


.mobile-nav-overlay ul li a, .mobile-nav-overlay ul li span {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-nav-overlay ul li a:hover,
.mobile-nav-overlay ul li a.active {
  color: var(--primary-color);
}

/* Mobile overlay dropdown */
.mobile-nav-overlay ul li.has-dropdown > .dropdown {
  display: none;
  position: static;
  background: none;
  box-shadow: none;
  padding: 0;
}
.mobile-nav-overlay ul li.has-dropdown.open > .dropdown {
  display: block;
}
.mobile-nav-overlay ul li.has-dropdown > span:after {
  content: '▼';
  font-size: 0.7em;
  margin-left: 8px;
}
.mobile-nav-overlay ul li.has-dropdown > a {
  cursor: pointer;
}
.mobile-nav-overlay ul li.has-dropdown > a {
  position: relative;
}

@media (min-width: 769px) {
  .mobile-menu,
  .mobile-nav-overlay {
    display: none !important;
  }
} 

