:root {
    --orange-light: #ff9f43;
    --orange-dark: #e67e22;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --gray-dark: #343a40;
    --gray-title: #6b6b6b;
    --gray-subtitle: #8f8f8f;
    --white: #ffffff;
    --shadow-color: 220, 3%, 75%;

    --primary-gradient: linear-gradient(135deg, var(--orange-light), var(--orange-dark));
    --font-primary: 'Raleway', sans-serif;
}

/* Dark Mode Styles */
body.dark-mode {
    --gray-light: #1a1a1a;
    --gray-medium: #2c2c2c;
    --gray-dark: #e0e0e0;
    --gray-title: #f5f5f5;
    --gray-subtitle: #cccccc;
    --white: #242424;
    --shadow-color: 0, 0%, 5%;
}

/* Toggle Button Styles */
.theme-toggle-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 15px; /* Espacio entre el menú y el botón */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-dark);
    transition: opacity 0.3s ease;
}

.theme-toggle-button:hover {
    opacity: 0.7;
}

.theme-toggle-button .icon-lamp {
    stroke: var(--gray-title);
}

/* Specific Dark Mode Overrides */
body.dark-mode .navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(var(--shadow-color), 0.5);
}

body.dark-mode .service-card,
body.dark-mode .enfermedad-card,
body.dark-mode .especialista-card,
body.dark-mode .news-card,
body.dark-mode .seguro-card,
body.dark-mode .card,
body.dark-mode .flip-card-front,
body.dark-mode .flip-card-back {
    background-color: var(--white);
    border: 1px solid var(--gray-medium);
}

body.dark-mode .logo-header .logo-text {
    color: var(--gray-title);
}

body.dark-mode .nav-links a {
    color: var(--gray-dark);
}

body.dark-mode .nav-links a.active,
body.dark-mode .nav-links a:hover {
    color: var(--orange-light);
}

body.dark-mode .hamburger span {
    background: var(--gray-title);
}

body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode textarea {
    background-color: var(--gray-medium);
    color: var(--gray-dark);
    border-color: var(--gray-medium);
}

body.dark-mode input[type="text"]::placeholder,
body.dark-mode input[type="email"]::placeholder,
body.dark-mode textarea::placeholder {
    color: var(--gray-subtitle);
}

body.dark-mode .footer {
    background-color: var(--white);
    border-top: 1px solid var(--gray-medium);
}

body.dark-mode .enfermedades {
    background-color: var(--gray-light);
}

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

body {
    font-family: 'Raleway', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    color: var(--gray-title);
    line-height: 1.7;
    background-color: var(--gray-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 98%;
    left: 1%;
    top: 0;
    z-index: 1000;
    border-radius: 20px;
    margin-top: 10px;
    transition: background 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.navbar:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 32px 0 rgba(52,58,64,0.18), 0 3px 12px 0 rgba(52,58,64,0.22);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
}



.colaboradores-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.logo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.logo-img {
    height: 68px;
    width: auto;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transition: none;
} 
/* Efecto flotante eliminado del logo */

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    display: block;
    text-align: center;
    width: 100%;
    line-height: 1.0; /* Reduced line height */
}

.logo-procto {
    color: var(--gray-dark);
    display: block;
    width: 100%;
    margin-bottom: -5px; /* Adjust as needed to reduce space */
}
.logo-clinic {
    color: var(--orange-dark);
    display: block;
    width: 100%;
}



.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-links li {
    margin: 0 3px;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-links li a:hover {
    color: var(--orange-dark);
    background-color: rgba(230, 126, 34, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: 10px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.05);
}

/* Dark mode hover effect */
.dark-mode .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Theme icon styles */
.theme-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    opacity: 0.9;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Light bulb ON - visible in light mode */
body:not(.dark-mode) .dark-icon,
body.dark-mode .light-icon {
    display: none;
}

/* Light bulb OFF - visible in dark mode */
.dark-icon {
    display: block;
}

/* Hover effect */
.floating-theme-toggle:hover .theme-icon {
    transform: scale(1.1);
    opacity: 1;
}

/* Dark mode specific styles */
body.dark-mode .theme-toggle .dark-icon {
    opacity: 0.9;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Ensure no background on the SVG elements */
.theme-icon path {
    background: transparent !important;
    box-shadow: none !important;
}

/* Light mode specific styles */
body:not(.dark-mode) .floating-theme-toggle .light-icon {
    opacity: 0.9;
}

/* Dark mode styles for the floating toggle */
body.dark-mode .floating-theme-toggle {
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .floating-theme-toggle:hover {
    background: rgba(50, 50, 50, 0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-theme-toggle {
        top: 20px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
    
    .theme-icon {
        width: 18px;
        height: 18px;
    }
}

/* Hide the original theme toggle button */
.theme-toggle-button {
    display: none;
}

/* Navigation links container */
.nav-links-container {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 5px 0;
}

/* Hero Section */

.noticias-hero, .noticias-contenido, .noticia-detalle, .noticia-main-content, .navnoticias-bar {
  margin-top: 80px;
}

.container.noticias-layout {
  max-width: 1600px;
}

.noticias-layout {
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: flex-start;
}

.noticia-main-content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
  gap: 48px;
  flex: 1 1 0%;
}

.navnoticias-bar {
  flex: 0 0 280px;
  width: 280px;
  min-width: 240px;
  max-width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  padding: 24px 18px 18px 18px;
  min-width: 220px;
  max-width: 330px;
  font-size: 0.98rem;
}
.navnoticias-title {
  font-size: 1.12rem;
  color: #e67e22;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: left;
}
.navnoticias-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.navnoticias-list li {
  margin-bottom: 0;
}

.navnoticias-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.07);
  padding: 52px 32px 22px 32px;
  font-size: 0.6rem;
  transition: box-shadow 0.28s cubic-bezier(.4,0,.2,1), transform 0.22s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}

.navnoticias-card:hover {
box-shadow: 0 18px 40px rgba(230,126,34,0.09);
transform: translateY(-6px) scale(1.025);
z-index: 2;
}

.navnoticias-date-ribbon {
  position: absolute;
  top: 14px;
  left: -26px;
  width: 95px;
  text-align: center;
  transform: rotate(-45deg);
  transform-origin: center;
  background: linear-gradient(135deg, #f8b133, #f57418 85%);
  color: #ffffff;
  padding: 4px 0;
  font-size: 0.42rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  z-index: 3;
  pointer-events: none;
}

.navnoticias-card:hover .navnoticias-date-ribbon {
  opacity: 0.35;
}

.navnoticias-date-ribbon::before,
.navnoticias-date-ribbon::after {
  content: '';
  position: absolute;
  border: 5px solid transparent;
  opacity: 0.55;
}

.navnoticias-date-ribbon::before {
  bottom: -5px;
  left: 0;
  border-top-color: rgba(0,0,0,0.15);
  border-right-color: rgba(0,0,0,0.15);
}

.navnoticias-date-ribbon::after {
  top: -5px;
  right: 0;
  border-bottom-color: rgba(255,255,255,0.35);
  border-left-color: rgba(255,255,255,0.35);
}

.navnoticias-card a,
.navnoticias-card a:visited,
.navnoticias-card a:hover,
.navnoticias-card a:focus {
  text-decoration: none !important;
  color: var(--gray-dark, #222);
  font-weight: 600;
  transition: color 0.2s;
  display: block;
  margin-top: 18px;
  padding-left: 6px;
}

.navnoticias-author {
  display: block;
  text-align: right;
  font-size: 0.65em;
  color: #999;
  margin-top: 10px;
  padding-right: 4px;
}

.navnoticias-list a {
  color: var(--gray-dark, #222);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.navnoticias-list a:hover {
  color: #e67e22;
}

.navnoticias-author {
    display: block;
    text-align: right;
    font-size: 0.65em;
    color: #999;
    margin-top: 10px;
}
@media (max-width: 1100px) {
  .noticias-layout {
    flex-direction: column;
    gap: 18px;
  }
  .noticias-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .navnoticias-bar {
    margin: 32px 0 0 0;
    max-width: 100%;
    width: 100%;
  }
  .navnoticias-list {
    gap: 18px;
  }
}


.noticia-titulo-naranja {
  color: #e67e22 !important;
}
.noticia-autor-naranja {
  color: #e67e22 !important;
  font-weight: 600;
}


.logo-header .logo-procto {
  letter-spacing: .5px;
}
.logo-header .logo-clinic {
  letter-spacing: 4.5px;
}
.logo-header .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.13;
  gap: 1px;
}


.hero {
    position: relative;
    background: var(--primary-gradient);
    color: var(--white);
    padding: 120px 0 80px;
    text-align: left;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 420px;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
}

#inicio.hero::before {
    background-image: url('img/consultorio.png');
}

#seguros-hero.hero::before {
    background-image: url('img/aseguradoras.png');
}

#noticias-hero.hero::before {
    background-image: url('img/noticias_salud_digestiva.jpg');
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
    opacity: 0.85;
    z-index: 1;
    clip-path: polygon(60% 0, 100% 0, 100% 100%, 30% 100%);
    pointer-events: none;
    transition: background-image 1.5s ease-in-out;
}

.hero .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 320px;
    width: 45%;
    margin-left: 6vw;
    text-align: left;
}

@media (max-width: 900px) {
    .hero {
        padding: 100px 0 60px;
        min-height: 350px;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    .hero .container {
        width: 95%;
        margin-left: 0;
        align-items: center;
        text-align: center;
    }
    .hero::before {
        background-size: cover;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        filter: blur(5px) brightness(0.7);
    }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.subtitle-hero {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 18px;
    color: #d0d0d0;
    letter-spacing: 0.5px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--white);
    color: var(--orange-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--gray-light);
}

.services h2,
.especialistas h2,
.contact h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--gray-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
    align-items: center;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    border: 1px solid var(--gray-medium);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
}
.service-card:hover {
    transform: translateY(-18px) scale(1.08);
    box-shadow: 0 18px 40px 0 rgba(230,126,34,0.30), 0 4px 20px 0 rgba(52,58,64,0.16);
    z-index: 2;
} 

.service-card i {
    font-size: 3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    margin-bottom: 20px;
}

.service-card p {
    font-size: 0.95rem; /* Reduced font size */
}

/* Especialistas Section */
.especialistas {
    padding: 100px 0;
    background-color: var(--white);
}

.especialistas-grid, .equipo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    justify-content: center;
    justify-items: center;
}

.equipo-grid {
    justify-items: center;
}

.equipo-grid .especialista-card {
    min-width: 115px; /* 280px * 0.4 */
    max-width: 175px; /* 420px * 0.4 */
    width: 100%;
    margin: 0 auto;
    height: 220px; /* Reduced height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.equipo-grid .especialista-card h3 {
    font-size: 0.65rem; /* Drastically reduced font size for name */
    margin-bottom: 2px;
    line-height: 1.1;
    font-weight: 600;
    color: var(--orange-dark); /* Nombre del especialista en naranja */
}

.equipo-grid .especialista-card p {
    font-size: 0.55rem; /* Drastically reduced font size for title */
    line-height: 1.0;
    margin-bottom: 0;
    color: var(--gray-dark); /* Subtítulo en gris oscuro */
}

.equipo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

/* Centrar cards sobrantes cuando no completan una fila de 3 */
.equipo-grid .especialista-card:nth-last-child(2):nth-child(3n-1) {
    grid-column-end: -2;
}

.equipo-grid .especialista-card:nth-last-child(1):nth-child(3n-1) {
    grid-column-start: 2;
}

/* Centrar todos los cards */
.equipo-grid .especialista-card {
    justify-self: center;
    align-self: start;
}

/* Texto especial en memoria */
.memorial-text {
    font-style: italic;
    color: #666;
    font-size: 0.55rem !important;
    line-height: 1.0;
    margin-bottom: 0;
    text-align: center;
}

@media (min-width: 1001px) {
    .equipo-grid {
        grid-template-columns: repeat(3, 1fr);
        justify-content: center;
        gap: 20px;
        max-width: 900px;
    }
}

@media (max-width: 1000px) {
    .especialistas-grid, .equipo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .equipo-grid .especialista-card:nth-child(4) {
        grid-column: 1 / 2;
    }
    .equipo-grid .especialista-card:nth-child(5) {
        grid-column: 2 / 3;
    }
}
@media (max-width: 700px) {
    .especialistas-grid, .equipo-grid {
        grid-template-columns: 1fr;
    }
    .equipo-grid .especialista-card {
        grid-column: auto !important;
    }
}

/* Enfermedades Colo-Rectales Frecuentes */
.enfermedades {
    background: #f8f9fa;
    padding: 60px 0 60px;
    overflow: hidden;
}
.enfermedades h2 {
    text-align: center;
    color: var(--gray-dark);
    margin-bottom: 28px;
    font-size: 2.2rem;
}
.enfermedades-descripcion {
    max-width: 700px;
    margin: 0 auto 32px auto;
    text-align: center;
    color: #757575;
    font-size: 1.1rem;
}

.enfermedades-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
    align-items: start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
}

@media (max-width: 600px) {
  .enfermedades-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 10px;
  }
  .enfermedad-card {
    flex: 0 0 250px;
    margin-right: 8px;
  }
}
.enfermedades-flip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 250px);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 35px auto;
    justify-content: center;
    overflow: hidden;
    padding-bottom: 30px;
}

@media (max-width: 600px) {
  .enfermedades-flip-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center;
    overflow-x: visible;
    padding-bottom: 10px;
  }
}

.flip-card {
    background: transparent;
    width: 250px;
    height: 250px;
    min-width: 250px;
    min-height: 250px;
    max-width: 250px;
    max-height: 250px;
    perspective: 900px;
    margin: 0 auto;
    cursor: pointer;
    z-index: 1;
    flex: 0 0 250px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
    transform-style: preserve-3d;
    z-index: 2;
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 14px;
    box-shadow: 0 4px 18px 0 rgba(52,58,64,0.09);
    padding: 32px 18px 22px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    z-index: 3;
}


.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 14px;
    box-shadow: 0 4px 18px 0 rgba(52,58,64,0.09);
    padding: 32px 18px 22px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.flip-card-front i {
    font-size: 2.6rem;
    margin-bottom: 18px;
    color: var(--orange-dark);
}

.flip-card-front h4 {
    font-size: 1.12rem;
    color: var(--gray-dark);
    font-weight: 600;
    margin-bottom: 0;
}

.flip-card-back {
    transform: rotateY(180deg);
    color: #444;
    font-size: 1.01rem;
}

.flip-card-back h4 {
    color: var(--orange-dark);
    font-size: 1.07rem;
    margin-bottom: 6px;
}

/* Oculta la antigua grid de cards */
.enfermedades-grid { 
    display: none !important; 
}

.enfermedad-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px 0 rgba(52,58,64,0.09);
    width: 250px;
    height: 250px;
    min-width: 250px;
    min-height: 250px;
    max-width: 250px;
    max-height: 250px;
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.3s, transform 0.3s;
    overflow: hidden;
    text-align: center;
    word-break: break-word;
}

@media (max-width: 600px) {
  .enfermedad-card {
    flex: 0 0 250px;
    margin-right: 8px;
  }
}
.enfermedad-card:hover {
    box-shadow: 0 10px 32px 0 rgba(52,58,64,0.16);
    transform: translateY(-7px) scale(1.025);
}
.enfermedad-card h3 {
    color: var(--orange-dark);
    font-size: 1.22rem;
    margin-bottom: 15px;
    font-weight: 600;
}
.enfermedad-card ul {
    padding-left: 18px;
    color: #444;
    font-size: 1.02rem;
    margin-bottom: 0;
}

/* Colaboradores / Aliados */
.colaboradores {
    background: #f3f4f6;
    padding: 50px 0 40px;
    border-top: 1px solid #e9ecef;
}
.colaboradores-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #7a7a7a;
    margin-bottom: 35px;
    letter-spacing: 1px;
}
.colaboradores-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
    gap: 32px;
    align-items: center;
    justify-items: center;
    justify-content: center; /* Added for centering the grid tracks */
    max-width: 1100px;
    margin: 0 auto;
}
.colaboradores-logos img {
    max-width: 120px;
    max-height: 60px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(0.7);
    opacity: 0.7;
    transition: transform 0.3s ease; /* Only transition transform */
}

.colaboradores-logos img:hover {
    transform: scale(1.1); /* Only scale on hover */
}

.especialista-card {
    background: var(--gray-light);
    border-radius: 16px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.especialista-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
} 

.especialista-card .card-content {
    padding: 15px 20px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: -10px;
}

.especialista-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    margin-bottom: 5px;
}

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

/* Google Reviews Card */
.google-reviews-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    max-height: 350px; /* Estimated height to match contact-info */
    display: flex;
    flex-direction: column;
}

.reviews-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px; /* To prevent scrollbar from overlapping content */
    /* Hide scrollbar for Chrome, Safari and Opera */
    &::-webkit-scrollbar {
        display: none;
    }
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.review-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-light);
}

.review-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.google-reviews-card h3 {
    color: var(--orange-dark);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.review-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-light);
}

.review-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.stars {
    color: #FFD700; /* Gold color for stars */
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.review-text {
    font-size: 1rem;
    color: var(--gray-dark);
    margin-bottom: 10px;
    font-style: italic;
}

.reviewer-name {
    font-size: 0.9rem;
    color: var(--gray-medium);
    font-weight: bold;
}

.view-all-reviews {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--orange-dark);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.view-all-reviews:hover {
    background-color: var(--orange-light);
}

/* Insurance Links Section */
.insurance-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.insurance-links ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.insurance-links ul li {
    margin-bottom: 20px; /* Add vertical spacing between list items */
}

.insurance-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background-color: var(--orange-dark); /* Orange background */
    color: var(--white); /* White text */
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--orange-dark);
}

.insurance-button:hover {
    background-color: var(--orange-light);
    transform: translateY(-3px);
}

/* Contact Section - Info Cards */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.info-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 20px;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid var(--gray-medium);
}

.info-item i {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-item p {
    font-size: 1.1rem;
    color: var(--gray-dark);
    margin: 0;
}

.info-item a {
    color: var(--gray-dark); /* Keep text color consistent */
    text-decoration: none; /* Remove underline */
    transition: color 0.3s ease;
}

.info-item a:hover {
    color: var(--orange-dark); /* Orange on hover */
}

.info-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.insurance-icon {
    font-size: 24px;
    margin-right: 15px;
    color: #fff;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--gray-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-item {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--gray-medium);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
}
.info-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.info-item i {
    font-size: 1.8rem;
    color: var(--orange-dark);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--gray-medium);
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.submit-button {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 18px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.5);
}

/* Footer */
.footer {
    background: var(--gray-dark);
    color: #d9d9d9; /* Color más claro para el texto básico */
    padding: 60px 0 30px;
    margin-top: 60px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-col {
    margin-bottom: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo-procto {
    color: var(--orange-light);
}

.footer-logo-clinic {
    color: var(--white);
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-links, .footer-contact, .social-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 600;
}

.footer p {
    color: #d9d9d9;
}

.footer a {
    color: #f8f9fa; /* Color más claro para los enlaces */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--orange-light);
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.5rem;
    color: #f8f9fa;
    transition: color 0.3s ease, transform 0.3s ease;
}

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

/* Copyright */
.copyright {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #d9d9d9;
    position: relative;
}

.admin-login-link {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    opacity: 0.35;
}

.admin-login-link:hover {
    opacity: 0.85;
}

/* Estilos para acordeones */
.acordeon-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 800px;
    margin: 40px auto;
}

.acordeon-item {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    border: 1px solid var(--gray-medium);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden; /* Asegura que el contenido no se salga de los bordes redondeados */
    position: relative;
    padding: 0;
}

.acordeon-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 40px 0 rgba(230,126,34,0.30), 0 4px 20px 0 rgba(52,58,64,0.16);
    z-index: 2;
}

.acordeon-titulo {
    background-color: #f8f9fa;
    padding: 22px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.acordeon-titulo:hover {
    background-color: #f1f3f5;
}

.acordeon-titulo h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.acordeon-icono {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e67e22;
    transition: transform 0.3s ease;
}

.acordeon-item.activo .acordeon-icono {
    transform: rotate(45deg);
}

.acordeon-item.activo .acordeon-titulo {
    border-bottom: 1px solid var(--gray-medium);
    background-color: #f1f3f5;
}

.acordeon-contenido {
    height: 0;
    overflow: hidden;
    transition: height 0.4s ease-out;
    background-color: white;
}

.acordeon-item.activo .acordeon-contenido {
    height: auto;
}

.acordeon-contenido-interno {
    padding: 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease, padding 0.4s ease;
}

.acordeon-item.activo .acordeon-contenido-interno {
    padding: 20px 25px;
    opacity: 1;
    transform: translateY(0);
}

.acordeon-contenido ul {
    margin: 0;
    padding-left: 20px;
}

.acordeon-contenido li {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.5;
}

.acordeon-contenido li:last-child {
    margin-bottom: 0;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .acordeon-titulo {
        padding: 15px 20px;
    }
    
    .acordeon-titulo h3 {
        font-size: 1rem;
    }
    
    .acordeon-contenido {
        font-size: 0.95rem;
    }
    
    .acordeon-item.activo .acordeon-contenido {
        padding: 15px 20px;
    }
}

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

    .hamburger span {
        width: 100%;
        height: 3px;
        background-color: var(--orange-dark);
        border-radius: 5px;
        transition: all 0.3s ease-in-out;
    }

    /* Animación para la 'X' */
    .hamburger.active span:nth-child(1) {
        transform: translateY(10.5px) rotate(45deg);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: translateY(-10.5px) rotate(-45deg);
    }

/* Responsive Design */
@media (max-width: 850px) {
    .navbar .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.99);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
        opacity: 0;
    }

    .navbar .nav-links.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }

    body.dark-mode .navbar .nav-links {
        background: rgba(36, 36, 36, 0.99); /* Equivalente oscuro de --white con transparencia */
    }

    .nav-links li {
        margin: 20px 0;
    }

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

    .hamburger {
        display: flex; /* Mostrar en móvil */
    }

    body.menu-open {
        overflow: hidden;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .services-grid, .equipo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .flip-card {
        width: calc(50% - 20px);
    }

    .review-item {
        width: 100%;
    }

    .acordeon-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .especialistas-grid, .colaboradores-logos {
        grid-template-columns: repeat(2, 1fr);
    }

    .noticias-grid {
        grid-template-columns: 1fr;
    }

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

    .suscripcion-form input {
        border-radius: 5px;
        margin-bottom: 10px;
    }

    .suscripcion-form button {
        border-radius: 5px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    .services-grid, .equipo-grid {
        grid-template-columns: 1fr;
    }
    .flip-card {
        width: 100%;
        margin: 10px 0;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .especialistas-grid, .colaboradores-logos {
        grid-template-columns: 1fr;
    }
    .noticias-hero h1 {
        font-size: 2.2rem;
    }
    .noticias-suscripcion {
        padding: 30px 15px;
    }
}

/* Animations */

/* ==== MENÚ HAMBURGUESA RESPONSIVO - BLOQUE SEGURO ==== */


.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    margin-left: 15px;
    background: transparent;
    border: none;
    position: relative;
}
.hamburger span {
    width: 100%;
    height: 3px;
    background-color: #e67e22;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
  width: 100%;
  height: 3px;
  background-color: #e67e22;
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}
@media (max-width: 1100px) {
  .navbar .nav-links {
    display: none;
    position: fixed;
    top: 60px; /* debajo del header */
    left: 50%;
    transform: translate(-50%, -100%);
    width: 90vw;
    max-width: 340px;
    height: auto;
    background: rgba(255,255,255,0.95); /* Menos transparente, más sólido */
    backdrop-filter: blur(7px) saturate(180%);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    padding: 22px 0 10px 0;
  }
  .navbar .nav-links.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, 0);
  }
  .nav-links li {
    margin: 7px 0;
    text-align: center;
    line-height: 1.1;
  }
  .nav-links a {
    font-size: 1.2rem;
    padding: 10px 0;
    width: 100%;
    display: block;
  }
  .hamburger { 
    display: flex; 
  }
  .theme-toggle {
    display: flex !important;
  }
  .nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
  }
}

/* Mejorar responsividad del header en desktop/tablet */
@media (max-width: 1050px) {
  .navbar .nav-links {
    gap: 0.5rem;
  }
  .nav-links li a {
    padding: 8px 10px;
    font-size: 1rem;
  }
}
@media (max-width: 950px) {
  .navbar .nav-links {
    gap: 0.2rem;
  }
  .nav-links li a {
    padding: 6px 4px;
    font-size: 0.95rem;
  }
}
@media (max-width: 900px) {
  .navbar .nav-links {
    gap: 0;
  }
  .nav-links li a {
    padding: 4px 2px;
    font-size: 0.9rem;
  }
}

/* ==== FIN BLOQUE MENÚ HAMBURGUESA ==== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.especialista-card,
.info-item {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Estilos Sección de Noticias */
.noticias-hero {
    background: var(--primary-gradient);
    color: var(--white);
    text-align: center;
    padding: 150px 0 80px;
    margin-bottom: 60px;
}

.noticias-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

.noticias-contenido {
    padding: 50px 0;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.noticia-item {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(var(--shadow-color), 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.noticia-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(var(--shadow-color), 0.15);
}

.noticia-imagen {
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.noticia-imagen img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.noticia-item:hover .noticia-imagen img {
    transform: scale(1.05);
}

.noticia-imagen::after {
    content: attr(data-fecha);
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--orange-dark);
    color: var(--white);
    padding: 5px 35px;
    font-size: 0.7rem;
    font-weight: 600;
    transform: rotate(45deg);
    transform-origin: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.noticia-contenido {
    padding: 20px;
}

.noticia-fecha {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-subtitle);
    margin-bottom: 10px;
}

.noticia-item h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.noticia-item h2 a {
    color: var(--gray-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.noticia-item h2 a:hover {
    color: var(--orange-dark);
}

.noticia-item p {
    margin-bottom: 20px;
    color: var(--gray-subtitle);
    line-height: 1.6;
    font-size: 0.9rem;
}

.noticia-leer-mas {
    color: var(--orange-dark);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.noticia-leer-mas:hover {
    color: var(--orange-light);
}

.noticia-leer-mas::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.noticia-leer-mas:hover::after {
    transform: translateX(5px);
}

.noticias-paginacion {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.pagina {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagina:hover {
    background-color: var(--orange-light);
    color: var(--white);
}

.pagina.actual {
    background-color: var(--orange-dark);
    color: var(--white);
}

.pagina.siguiente {
    width: auto;
    padding: 0 20px;
    border-radius: 20px;
}

.noticias-suscripcion {
    background: linear-gradient(45deg, rgba(255,159,67,0.05), rgba(230,126,34,0.1));
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin-top: 60px;
}

.noticias-suscripcion h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--gray-dark);
}

.noticias-suscripcion p {
    margin-bottom: 25px;
    color: var(--gray-subtitle);
}

.suscripcion-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.suscripcion-form input {
    flex-grow: 1;
    padding: 15px 20px;
    border: 1px solid var(--gray-medium);
    border-radius: 5px 0 0 5px;
    font-family: var(--font-primary);
}

.suscripcion-form button {
    padding: 15px 25px;
    background: var(--orange-dark);
    color: var(--white);
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-primary);
    transition: background-color 0.3s ease;
}

.suscripcion-form button:hover {
    background-color: var(--orange-light);
}

.rss-link {
    display: inline-flex;
    align-items: center;
    color: var(--gray-subtitle);
    text-decoration: none;
    margin-top: 15px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.rss-link i {
    margin-right: 5px;
    color: #f26522;
}

.rss-link:hover {
    color: var(--orange-dark);
}

/* Media Queries */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    .hero p {
        font-size: 1.2rem;
    }
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    .flip-card {
        width: calc(33.333% - 20px);
    }
    .review-item {
        width: 45%;
    }
    .logo-img {
        width: 40px;
        height: 40px;
    }
    .especialistas-grid, .colaboradores-logos {
        grid-template-columns: repeat(3, 1fr);
    }
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 850px) { /* Ajustado el breakpoint para que el menú no se desborde */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        z-index: 1000;
        transition: all 0.3s ease-in-out;
        opacity: 0;
        transform: translateY(-10px);
    }
    .nav-links.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }
    .nav-links li {
        margin: 15px 0;
        font-size: 1.2rem;
    }

    .hamburger {
        display: flex; /* Mostrar el hamburger en pantallas pequeñas */
    }
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
        position: relative;
        z-index: 1001;
        transition: all 0.3s ease;
    }
    
    .hamburger span {
        height: 3px;
        width: 100%;
        background-color: var(--orange-dark);
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    body.menu-open {
        overflow: hidden;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .services-grid, .equipo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .flip-card {
        width: calc(50% - 20px);
    }
    .review-item {
        width: 100%;
    }
    .acordeon-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    .especialistas-grid, .colaboradores-logos {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Centrar el card sobrante cuando queda solo en fila de 2 */
    .equipo-grid .especialista-card:nth-last-child(1):nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
    }
    
    .noticias-grid {
        grid-template-columns: 1fr;
    }
    .suscripcion-form {
        flex-direction: column;
    }
    .suscripcion-form input {
        border-radius: 5px;
        margin-bottom: 10px;
    }
    .suscripcion-form button {
        border-radius: 5px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    .services-grid, .equipo-grid {
        grid-template-columns: 1fr;
    }
    .flip-card {
        width: 100%;
        margin: 10px 0;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .especialistas-grid, .colaboradores-logos {
        grid-template-columns: 1fr;
    }
    .noticias-hero h1 {
        font-size: 2.2rem;
    }
    .noticias-suscripcion {
        padding: 30px 15px;
    }
}
