@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Source Sans 3", sans-serif;
}

.centered-box {
    justify-content: center;
    align-items: center;    
    text-align: center;
    margin-top: 50px;
}

.centered-box h1{
    font-size: 45px;
}

#open-search-modal{
    background-color: #00000000;
    color: white;
}

button {
    padding: 10px 20px;
    font-size: 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Navbar */
.navbarInicio {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    filter: brightness(100%);
    z-index: 1000;
}

.navbarindex {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 15px 40px;
    display: flex;
    /* justify-content: space-between; */
    justify-content: flex-end;
    align-items: center;
    z-index: 1000;
}

/* Logo */
.logoIndex img {
    width: 130px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 10px 20px;
}

.bi-search:hover{

    color: #FFA832;
}

.logout-btn{
    background-color: #00000000;
    color: white;
}

.bi-power:hover{

    color: red;
}

.bi-power{
    transform: scale(1.3);
    color: white;
    outline: none;
}

@media (min-width: 240px) and (max-width: 649px) {
    .logoIndex img {
        position: relative;
        left: 20px;
        width: 70px;
    }

    .search-btn {
        position: relative;
        left: 30px;
    }

    .logout-btn {
        position: relative;
        left: 25px;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 5px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000;
    z-index: 1000;
}

.navbar.scrolled {
    background: #3d6791; 
}

/* Logo */
.logoVideo img {
    width: 80px;
}

.logoSaludPalmieri img {
    width: 70px;
}

@media (min-width: 240px) and (max-width: 649px) {
    .logoSaludPalmieri img {
        position: relative;
        right: 20px;
        width: 40px;
    }

}

.search-container {
    display: flex;
    align-items: center;
    gap: 15px; 
}

.search-btnVideo{
    font-size: 1.3rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
}

@media (min-width: 240px) and (max-width: 649px) {
    .logoVideo img {
        position: relative;
        right: 30px;
    }

    #open-search-modal {
        position: relative;
        left: 25px;
    }
}

.search-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.search-modal-content {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 15px;
    width: 95%;
    max-width: 1200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.search-modal input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    outline-color: orange;
    background-color: #f5f5f5;
    box-sizing: border-box;
    margin-top: 60px;
}

.video-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    justify-content: center;
    max-height: 70vh;
    overflow-y: auto;
    padding-top: 10px;
}

.video-results div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #000;
    text-align: center;
    background: white;
    padding: 12px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.video-results img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.video-results p {
    margin-top: 8px;
    font-size: 16px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .video-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .video-results img {
        aspect-ratio: 4/3;
    }
    .video-results p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .video-results {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    .video-results img {
        aspect-ratio: 4/3;
        width: 90%;
        max-width: 140px;
    }
    .video-results p {
        font-size: 12px;
        text-align: center;
    }
}

.close {
    position: absolute;
    top: 19px;
    right: 23px;
    background: #ff5d5d;
    border: none;
    cursor: pointer;
    color: #f5f5f5;
}

.close:hover {
    background-color: rgb(231, 93, 93);
}

.header {
    height: 80vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    z-index: 0;
    filter: brightness(50%);
    transition: filter 0.3s ease-in-out;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.header * {
    position: relative;
    z-index: 2;
}

.header-content {
    color: white;
    max-width: 80%;
    text-align: left;
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
}

.header-content h1 {
    font-size: clamp(2rem, 6vw, 6rem);
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.1;
}

.header-content p {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-top: 11px;
}

@media (max-width: 991px) {
    .header-content h1 {
        top: 40px;
        font-size: 3.5rem;
    }
    
    .header-content p {
        top: 40px;
        font-size: 1.3rem;
    }
}

@media (max-width: 767px) {
    .header-content h1 {
        font-size: 2.5rem;
    }
    
    .header-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .header-content p {
        font-size: 0.9rem;
    }
}

.logoInicio {
    position: absolute;
    top: 20px;
    left: 70px;
    width: 130px;
}

@media (max-width: 991px) {
    .logo {
        top: 30px;
        left: 50px;
        width: 110px;
    }
}

@media (max-width: 767px) {
    .logo {
        top: 40px;
        left: 40px;
        width: 90px;
    }
}

@media (max-width: 480px) {
    .logo {
        top: 45px;
        left: 20px;
        width: 80px;
    }
}

h2 {
    margin: 20px 0;
    padding-left: 40px;
    font-size: 35px;
}

.carrusel-videos {
    background: white;
    color: black;
    padding: 15px 20px;
}

.carrusel-videos h1 {
    font-size: 40px;
    margin-bottom: 10px;
    padding-left: 10px;
}

/* Carrusel */
.carousel {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    gap: 10px;
    overflow-x: hidden;
    padding: 10px;
    white-space: nowrap;
    cursor: grab;
    user-select: none;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.hidden {
    display: none;
}

.carousel-container a {
    display: inline-block;
    cursor: grab;
}

.carousel-container a:active {
    cursor: grabbing;
}

.carousel-container a img {
    width: 300px;
    height: 180px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.3s;
    pointer-events: none;
}

.carousel-container a img:hover {
    transform: scale(1.1);
}

.prev, .next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    position: absolute;
    padding: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.prev { left: 10px; }
.next { right: 10px; }

.prev:hover, .next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 100%;
    max-width: 300px;
}

.carousel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

.video-title {
    display: block;
    width: 100%;
    max-width: 100%; /* Asegura que no crezca más allá de su contenedor */
    text-align: start;
    color: black;
    padding: 8px 5px;
    font-size: 1.2rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.video-container {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    padding: 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 640px;
    overflow: hidden;
}

/* Video responsive */
video {
    width: 100%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 1024px) {
    video {
        width: 80vw;
        height: 50vh;
    }
}

@media (max-width: 768px) {
    video {
        width: 90vw;
        height: 40vh;
    }
}

@media (max-width: 480px) {
    video {
        width: 95vw;
        height: 35vh;
    }
}

.video-container{
    background-color: black;
}

.video-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    gap: 20px;
    position: relative;
    flex-wrap: wrap;
}

.text-content {
    width: 60%;
    max-height: 50vh;
    overflow-y: auto;
}

.video-titleVideo {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    margin-left: 40px;
    text-align: start;
    color: #000;
}

.video-description {
    font-size: 16px;
    color: #131313;
    margin-bottom: 10px;
    margin-left: 40px;
    margin-right: 40px;
    text-align: justify;
}

@media (max-width: 1088px) {
    .video-description {
        display: block;
        margin-left: 20px;
        margin-right: 20px;
    }
}

@media (max-width: 480px) {
    .video-description {
        margin-left: 10px;
        margin-right: 10px;
    }
}

.btn-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 30%;
    margin-left: 20px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #FFF;
    font-size: 18px;
    float: left;
    width: 80%;
    margin: 1%;
    padding: 0 20px;

}

.btn-gradient {
    background: rgba(0, 0, 0, 0.15);
    box-shadow: 2px 0 0 0 rgba(78, 72, 72, 0.4);
    border-top-right-radius: 0px;
    position: relative;
    left: -20px;
    width: 40%;
    padding: 30px;
}

i {
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-green {
    background-color: #42a5cc;
}

.btn-pink {
    background-color: #f11350;
}

.btn-text {
    width: 60%;
    font-size: 20px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .video-info {
        flex-direction: column;
        align-items: center;
    }

    .text-content {
        width: 100%;
    }

    .btn-section {
        width: 100%;
        margin-left: 0;
        align-items: center;

    }

    .btn-gradient {
        background: rgba(0, 0, 0, 0.15);
        box-shadow: 2px 0 0 0 rgba(78, 72, 72, 0.4);
        border-top-right-radius: 0px;
        position: relative;
        left: -20px;
        width: 40%;
        padding: 30px;
    }
}

@media (max-width: 1089px) {
    .video-info {
        flex-direction: column;
        align-items: center;
    }

    .text-content {
        width: 100%;
    }

    .btn-section {
        width: 100%;
        margin-left: 0;
        align-items: center;
    }
}

@media (max-width: 100px) and (min-width: 480px) {
    
    .btn {
        padding: 15px;
        font-size: 16px;
    }

    .btn-gradient {
        background: rgba(0, 0, 0, 0.15);
        box-shadow: 2px 0 0 0 rgba(78, 72, 72, 0.4);
        border-top-right-radius: 0px;
        position: relative;
        left: -15px;
        width: 40%;
        padding: 40px;
    }
}


.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 30px;
    width: 100%;
}

#loadMoreBtn {
    width: 95vw;
    height: 60px;
    background-color: #5195bf;
    color: white;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.reload-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
  z-index: 20;
}

.reload-icon:hover {
  transform: translate(-50%, -50%) scale(1.2);
  color: #ffae00;
}

.suggested-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

.video-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 15px;
  justify-content: center;
}

.video-thumb {
  cursor: pointer;
  width: 120px;
}

.video-thumb img {
  width: 100%;
  border-radius: 6px;
  transition: transform 0.3s;
}

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

.video-thumb p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  font-size: 14px;
}

@media (max-width: 767px) {
  .video-thumb {
    width: 70px;
  }

  .video-thumb p {
    font-size: 12px;
  }

  .video-options {
    gap: 46px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .suggested-overlay {
    padding: 10px;
  }
  
.reload-icon {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
  z-index: 20;
}
}


.heartbeat-container {
  width: 100%;
  max-width: 500px;
  height: 600px;
  margin: 50px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  position: relative;
}

.heartbeat-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  animation: moveLine 2s linear infinite;
}

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