:root {
    --font-heading: 'Lustria', serif;
    --font-body: 'Mulish', sans-serif;
}

body {
  font-family: 'Mulish', sans-serif; /* Replaced Roboto Serif with Mulish */
  background-color: #ffffff;
  color: #0B2C4A;
  scroll-behavior: smooth;
}

.hero {
  height: 100vh;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.hero .carousel,
.hero .carousel-inner,
.hero .carousel-item {
  height: 100%;
}

.hero .carousel-item {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.6s ease-in-out;
  position: relative;
}

.hero .carousel-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: rgba(11, 44, 74, 0.75);
  pointer-events: none;
}

.hero .carousel-item.slide-1 {
  background: /*linear-gradient(rgba(11, 44, 74, 0.6), rgba(11, 44, 74, 0.6)), */url('../img/main-title-slider.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.slide-1 h5 {
  font-size: 4rem;
}

.slide-1 p {
  font-size: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.hero .carousel-item.slide-2 {
  background: /*linear-gradient(rgba(11, 44, 74, 0.6), rgba(11, 44, 74, 0.6)), */url('../img/slider-00b.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero .carousel-item.slide-3 {
  background: /*linear-gradient(rgba(11, 44, 74, 0.6), rgba(11, 44, 74, 0.6)), */url('../img/slider-01.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero .carousel-indicators button {
  background-color: rgba(255, 255, 255, 0.6);
  border: 2px solid white;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.hero .carousel-indicators button.active {
  background-color: white;
}

.hero .carousel-control-prev,
.hero .carousel-control-next {
  width: 5%;
}

.hero .carousel-control-prev-icon,
.hero .carousel-control-next-icon {
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.navbar {
  transition: background-color 0.3s ease-in-out;
}

.navbar.bg-opacity-75 {
  background-color: rgba(0, 48, 136, 1) !important;
}

/* Center the navbar items and add spacing */
.navbar-nav {
  justify-content: center;
  gap: 0 10rem;
  margin: 0 auto;
}

h1, h2, h3, h4, h5 {
  font-family: 'Roboto Serif', serif; /* Set headers to use Roboto Serif font */
  color: #0B2C4A;
}

#areas-practica .card {
    min-height: 284px;
}

#areas-practica .row>div {
  padding: 0;
  margin: 0;
}

.card {
  border: none;
  border-radius: 0;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.card h1, h2, h3, h4, h5 {
    color: white; 
}

.carousel-caption {
    color: #c8e4ff;
}

.btn-outline-primary {
  color: #0B2C4A;
  border-color: #0B2C4A;
}

.btn-outline-primary:hover {
  background-color: #0B2C4A;
  color: white;
}

footer {
  background-color: #0B2C4A;
}

footer h5 {
  font-size: 1.5rem;
}

footer a {
  color: white !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #c8e4ff !important;
}

#card-penaleconomico {
  background-image: url('../img/slider-02.jpg');
}

#areas-practica .card {
  background-size: cover;
  background-position: center;
  color: white;
  border: none;
  position: relative;
}

#card-penaleconomico {
  background-image: url('../img/card-penaleconom.png');
}

#card-sucesorio {
  background-image: url('../img/slider-01.jpg');
}

#card-danios {
  background-image: url('../img/card-danios.png');
}

#card-laboral {
  background-image: url('../img/slider-02.jpg');
}

#card-comercial {
  background-image: url('../img/card-comercial.png');
}

#card-sociedades {
  background-image: url('../img/card-sociedades.png');
}

#card-fondoscomerciales {
  background-image: url('../img/card-transferencias.png');
}

#card-concursosquiebras {
  background-image: url('../img/card-concursos.png');
}

#card-areaspractica {
  background-image: url('../img/slider-03.jpg');
}

#areas-practica .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 44, 74, 0.75); /* Blue semi-transparent overlay */
  z-index: 1;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

#areas-practica .card:hover::before {
  transform: translateY(0); /* Animate the blue background overlay from bottom to top */
}

#areas-practica .card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Style for #areas-practica cards */
#areas-practica .card-body .card-title {
    transition: opacity 0.3s ease-in-out, display 0s linear 0.3s; /* Delay the hiding of the title */
  opacity: 1;
  text-shadow: #0B2C4A 1px 1px 6px rgba(0, 0, 0, 1); /* Add a subtle text shadow for better visibility */
}

#areas-practica .card-body .card-text {
  display: none;
  opacity: 0;
  transform: translateY(100%);
}

#areas-practica .card:hover .card-title {
  display: none;
  opacity: 0; /* Fade out the h5 title with a small transition */
  visibility: hidden; /* Hide the element after fading out */
}

#nosotros h2, #areas-practica h2 {
  color: #0B2C4A;
  font-size: 4rem;
  position: relative;
  display: inline-block;
}

#nosotros h2:after, #areas-practica h2:after {
  content: ''; /* Ensure the pseudo-element is visible */
  display: block; /* Make it a block element */
  height: 0.25rem; /* Set the height of the line */
  background-color: #0B2C4A; /* Set the line color */
  width: 0; /* Start with no width */
  transition: width 1s ease-out; /* Smooth animation */
}

#nosotros h2.in-view:after, #areas-practica h2.in-view:after {
  width: 25%; /* Animate to full width when in view */
}

@keyframes drawLine {
  from {
    width: 0;
  }
  to {
    width: 25%; /* Match the final width */
  }
}

#areas-practica, #areas-de-practica {
  background-color: #0B2C4A;
}

#areas-practica h2, #areas-de-practica h2 {
  color: white;
}

#areas-practica h2:after, #areas-de-practica h2:after {
  background-color: white;
}

#areas-de-practica ul, #areas-de-practica p {
  color: white;
  font-size: 1.5rem;
}

#nosotros-image {
  background-image: url('../img/nosotros-img.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#nosotros p {
  font-size: 1.4rem;
  color: #0B2C4A;
  margin-top: 1rem;
  max-width: 800px;
}

/* Updated hover behavior for #areas-practica cards using CSS animations */
@keyframes fadeInText {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(50%);
    opacity: 1;
  }
}

#areas-practica .card:hover .card-text {
  display: block;
  animation: fadeInText 0.5s ease-in-out 0.1s forwards; /* Apply fade-in animation with delay */
}

@media (min-width: 992px) {
      .navbar .dropdown:hover .dropdown-menu {
        display: block;
      }
      .navbar .dropdown:hover .dropdown-toggle {
        color: #fff;
      }
    }

@media (min-width: 769px) {
  .card h1, h2, h3, h4, h5 {
    font-size: 2.5rem;
  }
}

@keyframes slideBackground {
  from {
    height: 0;
  }
  to {
    height: 35%;
  }
}

@keyframes slideBackgroundMain {
  from {
    height: 0;
  }
  to {
    height: 35%;
  }
}

@keyframes fadeInCaption {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero .carousel-item::before {
  animation: slideBackground 0.5s ease-in-out;
  animation-delay: 0.3s;
  animation-fill-mode: forwards;
}

.hero .carousel-item.slide-1::before {
  animation: slideBackgroundMain 0.5s ease-in-out forwards !important; /* Ensure the background stays after animation */
}

.carousel-caption {
    opacity: 0;
  animation: fadeInCaption 0.5s ease-in-out;
  animation-delay: 0.7s;
  animation-fill-mode: forwards;
}


@media (max-width: 768px) {
  .card h1, h2, h3, h4, h5 {
    font-size: 2rem;
  }

  .hero .carousel-item::before {
  animation: slideBackground 0.5s ease-in-out;
  animation-delay: 0.3s;
  animation-fill-mode: forwards;
  }

  .slide-1 h5 {
    font-size: 2.5rem;
  }

  .slide-1 p {
    font-size: 1rem;
    max-width: 90%;
    margin: 0 auto;
  }

  #homeMainCarousel .carousel-inner p {
    display: none;
  }

  .carousel-caption {
    bottom: 3rem;
  }
}



@media (min-width: 768px) {
  .carousel-caption {
    bottom: 3rem !important;
  }
}

/* Ensure hidden overflow for #areas-practica cards */
#areas-practica .card {
  overflow: hidden; /* Prevent the transparent background from showing outside the card */
}

/* Navbar dropdown menu styling */
.navbar .dropdown-menu {
  background-color: rgba(0, 48, 136, 0.75); /* Match the navbar color */
  border: none; /* Remove border */
  animation: slideDown 0.3s ease-out; /* Add slide down animation */
  border-radius: 0;
}

.navbar .dropdown-menu a {
  padding: 0.5rem 0.5rem;
}

/* Animation for dropdown */
@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Ensure dropdown items have proper spacing and color */
.navbar .dropdown-item {
  color: white; /* Text color */
}

.navbar .dropdown-item:hover {
  background-color: rgba(0, 48, 136, 0.75);
}

#nosotros {
  min-height: 100vh; /* Ensure the section takes up at least the full viewport height */
}

#nosotros .row {
  min-height: 100vh; /* Ensure the row takes up at least the full viewport height */
}

#nosotros .col-md-6 {
  min-height: 100vh; /* Ensure each column takes up at least the full viewport height */
}

#contacto h2 {
  color: #0B2C4A;
  font-size: 4rem;
  position: relative;
  display: inline-block;
}

#contacto h2:after {
  content: ''; /* Ensure the pseudo-element is visible */
  display: block; /* Make it a block element */
  height: 0.25rem; /* Set the height of the line */
  background-color: #0B2C4A; /* Set the line color */
  width: 0; /* Start with no width */
  transition: width 1s ease-out; /* Smooth animation */
}

#contacto h2.in-view:after {
  width: 25%; /* Animate to full width when in view */
}

.bg-darkblue {
  background-color: #0B2C4A; /* Dark blue background for footer */
}

/* Styling for the contact links */
.list-unstyled.text-small li a {
  text-decoration: none; /* Remove underline */
  color: #003366; /* Dark blue color */
  transition: color 0.3s ease; /* Smooth transition for hover effect */
}

.list-unstyled.text-small li a:hover {
  color: #6699cc; /* Lighter blue on hover */
}

.list-unstyled.text-small li {
  margin-bottom: 10px; /* Add space between items */
}

.breadcrumb-item a {
    color: #CCC;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #FFF;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: #AAA;
}

.breadcrumb-item.active {
    color: white !important;
}

footer .dropdown-divider {
  border: 0.025rem solid #818181;
  width: 50%;
  margin: 1rem 0;
}

.vb-lightgrey {
    background-color: #f0f0f0;
    padding: 50px 0;
}

footer h5 {
  color: white !important;
}