/* Google Fonts */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f8f9fa;
}

/* Navbar */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.nav-link {
  color: white !important;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--bs-warning) !important;
  font-weight: 500;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* Footer */
footer a:hover {
    color: var(--bs-warning) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.card-header {
    background-color: var(--bs-secondary);
    color: white;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: #05053a;
    border-color: #05053a;
}

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

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

/* Carousel */
.carousel-caption {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: .5rem;
  bottom: 1.25rem;
  left: 15%;
  padding-bottom: 1.25rem;
  padding-top: 1.25rem;
  right: 15%;
}

.carousel-caption h5 {
  color: #E7E78A;
}

/* General */
.carousel-caption h5, .carousel-caption p {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* General */
h1, h2, h3, h4, h5, h6 {
    color: var(--bs-primary);
}

/* Lazy load fade-in */
img[data-src] {
  opacity: 0;
}

img.fade-in {
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Horarios por curso */
section h2 {
  color: var(--bs-primary);
  font-weight: 600;
}

button[data-bs-target="#modalHorario"] {
  min-width: 150px;
}

#modalHorario img {
  max-height: 600px;
  object-fit: contain;
}


/* Modal Contacto */
#contactModal .modal-body iframe {
  border-radius: 5px;
}

#contactModal .modal-body p {
  margin-bottom: 1rem;
}

#contactModal .contact-info {
  margin-bottom: 1.5rem;
}

/* Historia - Timeline */
.history-timeline {
  position: relative;
  padding-left: 30px;
  border-left: 3px solid var(--bs-primary);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline-year {
  position: relative;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.timeline-year::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bs-primary);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--bs-primary);
}

.timeline-item p {
  text-align: justify;
  line-height: 1.7;
  margin-bottom: 0;
}

/* Misión y Visión */
.mission-vision-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  padding: 30px;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mission-vision-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.mission-card {
  border-top: 4px solid var(--bs-primary);
}

.vision-card {
  border-top: 4px solid var(--bs-secondary);
}

.card-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2.5rem;
  opacity: 0.1;
  color: var(--bs-primary);
}

.vision-card .card-icon {
  color: var(--bs-secondary);
}

.mission-vision-card h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--bs-primary);
}

.vision-card h3 {
  color: var(--bs-secondary);
}

.divider {
  height: 3px;
  width: 80px;
  background: var(--bs-primary);
  margin-bottom: 20px;
}

.vision-card .divider {
  background: var(--bs-secondary);
}

.mission-vision-card p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 0;
}

/* Logo y nombre del establecimiento */
.navbar-brand img {
  transition: transform 0.3s ease;
}

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

.school-name {
  font-family: 'Raleway', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  display: block;
  line-height: 1.2;
}

.school-subtitle {
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
}

/* Tamaño aumentado de los enlaces del navbar */
.navbar .nav-link {
  font-size: 1.05rem;
  padding: 0.5rem 1rem;
  position: relative;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--bs-warning);
  transition: width 0.3s ease;
}

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

/* Dropdown menu más grande */
.navbar .dropdown-menu {
  font-size: 1rem;
}

/* Para pantallas pequeñas */
@media (max-width: 576px) {
  .navbar-brand img {
    width: 75px;
    height: 75px;
  }
  
  .navbar .nav-link {
    font-size: 1rem;
    padding: 0.5rem 0.8rem;
  }

  .school-name {
    font-size: 1rem;
  }

  .school-subtitle {
    font-size: 0.75rem;
  }
}

#facebook-fallback-container .card {
    max-width: 500px;
    margin: 0 auto;
}


/* Avisos HTML */
.aviso-item {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  padding: 1.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.aviso-title {
  font-size: 1.5rem;
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
}

.aviso-date {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1rem;
}

.aviso-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.aviso-item:hover .aviso-img {
  transform: scale(1.03);
}

.aviso-content {
  font-size: 1rem;
  color: #444;
}

.ver-mas-btn {
  padding: 0;
  color: var(--bs-primary);
  font-weight: 500;
  cursor: pointer;
}

.ver-mas-btn:hover {
  text-decoration: underline;
}

.aviso-full-content {
  margin-top: 1rem;
}



@media (min-width: 768px) {
  .aviso-img {
    object-fit: contain;
    width: 100%;
  }

  .aviso-item .row {
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .aviso-img {
    margin-bottom: 1rem;
  }
}


/* Lirmi */
.lirmi-card {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  padding: 2rem;
}

.lirmi-card h2 {
  color: var(--bs-primary);
}

.store-buttons .btn {
  font-size: 1.2rem;
  padding: .8rem 1.5rem;
}

/* PIE - Team */

.team-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: none;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: visible;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.team-card:hover::before {
  transform: scaleX(1);
}

.pre-basica-card {
  background: linear-gradient(135deg, #fffaf0 0%, #fef7e0 100%); 
}

.pre-basica-card .team-card-img {
  border-color: var(--bs-warning);
}

.team-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
}

.team-card:hover .team-card-img {
  border-color: #E7E78A;
  box-shadow: 0 0 20px rgba(231, 231, 138, 0.6);
  transform: scale(1.05);
}

.team-card-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 1.5rem auto 1rem;
  border: 5px solid var(--bs-primary);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.team-card .img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--bs-primary), var(--bs-secondary));
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.team-card:hover .img-overlay {
  opacity: 0.1;
}

.team-card .card-title {
  font-weight: 700;
  color: var(--bs-primary);
  font-family: 'Raleway', sans-serif;
  font-size: 1.2rem;
}

.team-card .card-text {
  font-size: 0.9rem;
  color: var(--bs-secondary);
  font-weight: 500;
}

.team-card .teacher-contact {
  font-size: 0.9rem;
  color: #495057;
  font-weight: 500;
  word-break: break-word;
  margin-bottom: 1rem;
  padding: 0.8rem 0.5rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  text-align: center;
}

.team-card .teacher-contact:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.team-card .teacher-contact i {
  color: var(--bs-primary);
  margin-right: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  display: block;
}

.team-card .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bs-primary), #0056b3);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  text-decoration: none;
  display: inline-block;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}

.team-card .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.team-card .btn:hover::before {
  left: 100%;
}

.team-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
  background: linear-gradient(135deg, #0056b3, var(--bs-primary));
  color: white;
  text-decoration: none;
}

.team-card .btn:active {
  transform: translateY(0);
}

/* Estilos para team-member-card */
.team-member-card .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bs-primary), #0056b3);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  text-decoration: none;
  display: inline-block;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}

.team-member-card .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.team-member-card .btn:hover::before {
  left: 100%;
}

.team-member-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
  background: linear-gradient(135deg, #0056b3, var(--bs-primary));
  color: white;
  text-decoration: none;
}

.team-member-card .btn:active {
  transform: translateY(0);
}

/* Equipo Directivo */
.directivo-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.directivo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.directivo-card:hover::before {
  transform: scaleX(1);
}

.directivo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
}

.directivo-card img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
}

.directivo-card:hover img {
  transform: scale(1.02);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.directivo-card h2 {
  color: var(--bs-primary);
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
}

.directivo-card .lead {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.7;
}

.directivo-info {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.directivo-info h5 {
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--bs-primary);
}

.directivo-info p {
  margin-bottom: 0;
}

.directivo-info .teacher-contact {
  font-size: 0.95rem;
  color: #495057;
  font-weight: 500;
  word-break: break-word;
  margin-bottom: 1rem;
  padding: 0.8rem 0.5rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  text-align: center;
}

.directivo-info .teacher-contact:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.directivo-info .teacher-contact i {
  color: var(--bs-primary);
  margin-right: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  display: block;
}

.directivo-info .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bs-primary), #0056b3);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.directivo-info .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.directivo-info .btn:hover::before {
  left: 100%;
}

.directivo-info .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
  background: linear-gradient(135deg, #0056b3, var(--bs-primary));
}

.directivo-info .btn:active {
  transform: translateY(0);
}

/* Convivencia e Inspectoría */
.encargado-section {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.encargado-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bs-success), #28a745);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.encargado-section:hover::before {
  transform: scaleX(1);
}

.encargado-section:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
}

.encargado-section img {
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
}

.encargado-section:hover img {
  transform: scale(1.02);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.encargado-section h3 {
  color: var(--bs-success);
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
}

.encargado-section .lead {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.7;
}

.encargado-section .directivo-info {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.encargado-section .directivo-info h5 {
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--bs-success);
}

.encargado-section .directivo-info p {
  margin-bottom: 0;
}

.encargado-section .directivo-info .teacher-contact {
  font-size: 0.95rem;
  color: #495057;
  font-weight: 500;
  word-break: break-word;
  margin-bottom: 1rem;
  padding: 0.8rem 0.5rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  text-align: center;
}

.encargado-section .directivo-info .teacher-contact:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.encargado-section .directivo-info .teacher-contact i {
  color: var(--bs-success);
  margin-right: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  display: block;
}

.encargado-section .directivo-info .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bs-success), #28a745);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
  text-decoration: none;
  display: inline-block;
}

.encargado-section .directivo-info .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.encargado-section .directivo-info .btn:hover::before {
  left: 100%;
}

.encargado-section .directivo-info .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
  background: linear-gradient(135deg, #28a745, var(--bs-success));
  color: white;
  text-decoration: none;
}

.encargado-section .directivo-info .btn:active {
  transform: translateY(0);
}

/* Briefing Section */
#briefing {
  border-bottom: 1px solid #e0e0e0;
}

#briefing h2 {
  font-family: 'Raleway', sans-serif;
  color: var(--bs-primary);
}

#briefing .lead {
  font-size: 1.15rem;
  color: #555;
}

#briefing p {
  line-height: 1.7;
}

#briefingCarousel .carousel-item {
  transition: opacity 1s ease-in-out;
}

#briefingCarousel .carousel-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.briefing-text-column {
  position: relative;
  z-index: 1;
}

.briefing-text-column::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/Logo.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.05;
  z-index: -1;
}

.team-member-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 0;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  position: relative;
  overflow: visible;
}

.team-member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.team-member-card:hover::before {
    transform: scaleX(1);
}

.team-member-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
}

.team-member-card img {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    object-fit: cover;
    height: 220px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

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

.team-member-card .img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--bs-primary), var(--bs-secondary));
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.team-member-card:hover .img-overlay {
    opacity: 0.1;
}

.team-member-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 5;
}

.team-member-card .card-title {
    font-weight: 700;
    color: var(--bs-primary);
    font-family: 'Raleway', sans-serif;
    font-size: 1.2rem;
}

.team-member-card .card-subtitle {
    color: var(--bs-secondary);
    flex-grow: 1;
    font-weight: 500;
    margin-bottom: 1rem;
}

.team-member-card .teacher-contact {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
    word-break: break-word;
    margin-bottom: 1rem;
    padding: 0.8rem 0.5rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    text-align: center;
}

.team-member-card .teacher-contact:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.team-member-card .teacher-contact i {
    color: var(--bs-primary);
    margin-right: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    display: block;
}

.team-member-card .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bs-primary), #0056b3);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.team-member-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.team-member-card .btn:hover::before {
    left: 100%;
}

.team-member-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3, var(--bs-primary));
}

.team-member-card .btn:active {
    transform: translateY(0);
}

/* Profesores de Asignatura - Rediseño Moderno */
.teacher-card-asignatura {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: stretch;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.teacher-card-asignatura::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.teacher-card-asignatura:hover::before {
    transform: scaleX(1);
}

.teacher-card-asignatura:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
}

.teacher-card-asignatura .teacher-img-wrapper {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    margin-right: 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.teacher-card-asignatura .teacher-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.teacher-card-asignatura:hover .teacher-img {
    border-color: var(--bs-primary);
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.teacher-card-asignatura .img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--bs-primary), var(--bs-secondary));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.teacher-card-asignatura:hover .img-overlay {
    opacity: 0.1;
}

.teacher-card-asignatura .card-body {
    padding: 0;
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.teacher-card-asignatura .card-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    line-height: 1.2;
    position: relative;
}

.teacher-card-asignatura .card-subtitle {
    font-weight: 600;
    color: var(--bs-secondary);
    margin-bottom: 1rem;
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1.2;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.1), rgba(108, 117, 125, 0.05));
    border-radius: 20px;
    border: 1px solid rgba(108, 117, 125, 0.1);
}

.teacher-card-asignatura .card-text {
    color: #495057;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
    font-weight: 400;
    position: relative;
    padding-left: 1rem;
}

.teacher-card-asignatura .card-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 3px;
    background: linear-gradient(to bottom, var(--bs-primary), var(--bs-secondary));
    border-radius: 2px;
}

.teacher-card-asignatura .teacher-contact,
.team-card .teacher-contact,
.team-member-card .teacher-contact,
.directivo-info .teacher-contact,
.encargado-section .directivo-info .teacher-contact {
    font-size: 0.95rem;
    color: #495057;
    font-weight: 500;
    word-break: break-word;
    margin-bottom: 1rem;
    padding: 0.8rem 0.5rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer !important;
    position: relative;
    user-select: none;
    z-index: 999 !important;
    pointer-events: auto !important;
    text-align: center;
}

.teacher-card-asignatura .teacher-contact:hover,
.team-card .teacher-contact:hover,
.team-member-card .teacher-contact:hover,
.directivo-info .teacher-contact:hover,
.encargado-section .directivo-info .teacher-contact:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.teacher-card-asignatura .teacher-contact i,
.team-card .teacher-contact i,
.team-member-card .teacher-contact i,
.directivo-info .teacher-contact i {
    color: var(--bs-primary);
    margin-right: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    display: block;
}

.encargado-section .directivo-info .teacher-contact i {
    color: var(--bs-success);
    margin-right: 0.5rem;
    font-size: 1rem;
}

.teacher-card-asignatura .btn {
    align-self: flex-start;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bs-primary), #0056b3);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.teacher-card-asignatura .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.teacher-card-asignatura .btn:hover::before {
    left: 100%;
}

.teacher-card-asignatura .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3, var(--bs-primary));
}

.teacher-card-asignatura .btn:active {
    transform: translateY(0);
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .teacher-card-asignatura {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        min-height: auto;
    }
    
    .teacher-card-asignatura .teacher-img-wrapper {
        margin-right: 0;
        margin-bottom: 1.5rem;
        width: 120px;
        height: 120px;
    }
    
    .teacher-card-asignatura .card-body {
        align-items: center;
    }
    
    .teacher-card-asignatura .card-text {
        padding-left: 0;
        text-align: center;
    }
    
    .teacher-card-asignatura .card-text::before {
        display: none;
    }
    
    .teacher-card-asignatura .teacher-contact {
        text-align: center;
        width: 100%;
    }
    
    .teacher-card-asignatura .btn {
        align-self: center;
        width: 100%;
        max-width: 200px;
    }
}

/* Animación de entrada para las cards */
.teacher-card-asignatura {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.teacher-card-asignatura:nth-child(1) { animation-delay: 0.1s; }
.teacher-card-asignatura:nth-child(2) { animation-delay: 0.2s; }
.teacher-card-asignatura:nth-child(3) { animation-delay: 0.3s; }
.teacher-card-asignatura:nth-child(4) { animation-delay: 0.4s; }
.teacher-card-asignatura:nth-child(5) { animation-delay: 0.5s; }
.teacher-card-asignatura:nth-child(6) { animation-delay: 0.6s; }
.teacher-card-asignatura:nth-child(7) { animation-delay: 0.7s; }

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

/* Notificación de email copiado */
.email-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    max-width: 350px;
}

/* Estilos de depuración para elementos clickeables */
.teacher-contact {
    position: relative !important;
    z-index: 100 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.team-card .btn,
.team-member-card .btn,
.directivo-info .btn,
.encargado-section .directivo-info .btn {
    position: relative !important;
    z-index: 100 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Asegurar que las cards no interfieran con los clicks */
.team-card,
.team-member-card {
    overflow: visible !important;
}

.team-card .card-body,
.team-member-card .card-body {
    position: relative !important;
    z-index: 50 !important;
}

.email-notification.show {
    transform: translateX(0);
}

.email-notification i {
    font-size: 1.2rem;
    color: #ffffff;
}

.email-notification span {
    font-size: 0.9rem;
    word-break: break-all;
}

/* Responsive para notificación */
@media (max-width: 768px) {
    .email-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .email-notification.show {
        transform: translateY(0);
    }
}

