﻿:root {
  --hn-primary-color: #3c3c3b;
  --hn-secondary-color: #4d95cb;
  --hn-third-color: #008a87;
  --hn-four-color: #b3b3b3;
  --hn-fifth-color: #88cfe0;
  --hn-header-color: #1a318e;
  --hn-border-color: #3db4c5;
  --hn-body-font: 'Poppins';
}

@font-face {
  font-family: 'Poppins';
  font-style: medium;
  font-weight: 500;
  src: url(/fonts/Poppins-Medium.ttf);
}

@font-face {
  font-family: 'Poppins';
  font-style: lighter;
  font-weight: 300;
  src: url(/fonts/Poppins-Light.ttf);
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url(/fonts/Poppins-Regular.ttf);
}

body {
  font-family: 'Poppins', sans-serif;
}

.masthead {
  background: #fff;
  padding: 0;
}

.account-masthead {
  min-height: 0;
}

.account.not-authed {
  display: none;
}

.site-footer, .cc-footer {
    color: white;
    background: linear-gradient(135deg, rgba(0, 86, 163, 0.9) 0%, rgba(11, 180, 170, 0.9) 100%);
}



.site-footer a,
.site-footer strong,
.site-footer label
{
  color: white;
  text-decoration: none;
}

.site-footer .social-links a img {
  width: 40px;
  height: 40px;
}

.orgs-footer {
  background-color: #fff;
}

.orgs-footer .fit-content {
  width: fit-content;
}

.orgs-footer img {
  max-width: 150px;
  height: auto;
  margin: 0 10px;
  display: block;
  max-height: 50px;
}

.orgs-footer p {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

.orgs-footer .row {
  align-items: center;
}

@media (max-width: 768px) {
  .orgs-footer .col-12 {
    margin-bottom: 2rem;
  }
  
  .orgs-footer .col-12:last-child {
    margin-bottom: 0;
  }
}


.main-navbar .social-links {
  gap: 4px;
}

.main-navbar .contact-info a img  {
  width: 32px;
  height: 32px;
}

.site-footer .hn-logo img {
  max-width: 280px;
}

.red-footer {
  background-color: #fff;
  padding: 1rem;
}

.red-footer .red-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.red-footer .red-info p {
  margin: 6px 0 0;
  font-size: 1rem;
}

.logo-red {
  max-width: 220px;
}

.masthead .main-navbar ul li a {
  color: var(--hn-primary-color);
}

.masthead .main-navbar ul li:hover a,
.masthead .main-navbar ul li:focus a,
.masthead .main-navbar ul li.active a {
  border-radius: 0.3rem;
  background-color: transparent;
  color: var(--hn-secondary-color);
}

#flDebug .flDebugPanelContentParent {
  overflow: scroll;
}

.featured_data {
  margin-bottom: 4.5rem;
  margin-left: 0;
  margin-right: 0;
}

.featured_data>div {
  text-align: center;
}

.featured_data>div img {
  width: 100%;
  height: auto;
  max-width: 200px;
  margin-bottom: 1rem;
}

.featured_data>div h3 {
  color: var(--hn-header-color);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  text-transform: uppercase;
}

.featured_data>div p {
  color: var(--hn-header-color);
  font-weight: 300;
  font-size: 0.75rem;
  padding: 4px;
  background-color: white;
}

.featured_data>div a {
  color: var(--hn-header-color);
  border-color: var(--hn-third-color);
  border-width: 1px;
  border-style: solid;
  font-weight: 300;
  font-size: 1rem;
  min-width: 150px;
  width: min-content;
  display: block;
  margin: auto;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  background-color: white;
}

.homepage .hero {
  padding: 3.75rem 0;
  background: white;
}

.main-banner-promoted {
  position: relative;
}

.main-banner-promoted h1 {
  font-size: 4rem;
  color: var(--hn-four-color);
  font-weight: 900;
}

.main-banner-promoted h2 {
  font-size: 2.75rem;
  color: var(--hn-header-color);
  font-weight: lighter;
}

.main-banner-promoted p {
  font-size: 1rem;
  color: var(--hn-header-color);
  max-width: 500px;
}

.main-banner-promoted .image {
  user-select: none;
  position: absolute;
  bottom: 0;
  right: 0;
  width: auto;
  max-width: 60%;
  max-height: 100%;
  height: auto;
}

.main-banner-promoted .icon {
  user-select: none;
  position: absolute;
  bottom: -40px;
  right: 0;
  width: auto;
  max-width: 50%;
  max-height: 100%;
  height: auto;
}

.features.row {
  margin-top: 4rem;
  gap: 40px;
}

.features.row .col {
  text-align: left;
  flex: 0 0 auto;
  overflow: hidden;
}

.features.row .col .inner {
  position: relative;
  border: 4px solid var(--hn-border-color);
  padding: 20px;
  margin-bottom: 4px;
}

.features.row .col .inner .extra {
  pointer-events: none;
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 230px;
  max-width: 45%;
  height: 30px;
  clip-path: polygon(15px 0, 100% 0, calc(100%) 100%, 0% 100%);
  background-color: var(--hn-border-color);
}

.features.row .col .extra::before {
  content: '';
  display: block;
  width: 110%;
  height: 100%;
  position: absolute;
  top: 4px;
  left: 3px;
  clip-path: polygon(15px 0, 100% 0, calc(100%) 100%, 0% 100%);
  background-color: white;
}

.features.row .col .extra::after {
  content: '';
  display: block;
  width: 110%;
  height: 100%;
  position: absolute;
  top: 8px;
  left: 6px;
  clip-path: polygon(15px 0, calc(100% - 28px) 0, calc(100% - 48px) 100%, 0% 100%);
  background-color: var(--hn-four-color);
}

@media (min-width: 768px) {
  .features.row .col {
    flex: 0 0 calc(33% - 80px/3);
  }
}

.features.row .col h3 {
  font-size: 2rem;
  font-weight: normal;
  text-transform: uppercase;
  color: var(--hn-header-color);
}

.features.row .col p {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--hn-header-color);
}

.homepage .module-feeds {
  background: #fff;
}

.featured_organization {
  margin-bottom: 4.5rem;
  margin-left: 0;
  margin-right: 0;
  justify-content: center;
}

.featured_organization .col-12 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: space-around;
}

.featured_organization a {
  text-decoration: none;
}

.featured_organization img {
  width: 100%;
  height: auto;
  margin: auto;
}

.footer-rc {
  background-color: #033250;
  color: white;
  width: 100%;
  display: block;
  padding: 0.75rem 0;
}

.footer-rc img {
  max-height: 48px;
  max-width: 100%;
  width: auto;
  text-decoration: none;
}

.footer-rc p {
  color: white;
  margin: auto 0;
  font-size: 0.75rem;
}

.homepage .hero {
  background: linear-gradient(135deg, rgba(0, 86, 163, 0.6) 0%, rgba(11, 180, 170, 0.6) 50%), url('/img/hn-slider.png') center / cover;
  min-height: 600px;
}

.homepage .module-search {
  border: none;
  box-shadow: none;
  border: none;
  padding: 0;
  background: unset;
}

.homepage .module-search .search-form {
  background: none;
  border-radius: 0;
  padding: 0;
  border: none;
  margin-bottom: 40px ;
}

.homepage .module-search .search-form h3 {
  font-size: 2.75rem;
  line-height: 3.75rem;
  max-width: 600px;
  margin: 0 auto 36px;
  text-align: center;
}

.homepage .module-search .search-input {
  margin: 0 auto 0;
  max-width: 744px;
}

.homepage .module-search .search-form input {
  padding: 15px 45px;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #c1c9d4;
  margin: auto;
}

.homepage .module-search .tags {
  background: none;
  padding: 0;
  text-align: center;
  width: fit-content;
  margin: 0 auto 100px;
} 

.homepage .module-search .tags .tag {
  background: none;
  border-radius: 0;
  border: 0;
  color: #fff;
  box-shadow: none;
  margin: 0;
  padding: 0 8px;
  border-right: 1px solid #fff;
  font-size: 1rem;
}

.homepage .module-search .tags .tag:hover {
  color: var(--hn-secondary-color);
}

.homepage .module-search .tags .tag:last-child {
  border: 0 !important;
}

.homepage .module-search .tags h3 {
  margin: auto 0 auto 0;
  padding: 0;
  font-size: 1rem;
  font-weight: normal;
}

.main.hero {
  display: flex;
  padding-bottom: 0;
  margin-bottom: 100px;
}

.main.hero .container {
  position: relative;
  flex: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.main.hero .floating-banner {
  position: relative;
  margin: 24px;
  width: auto;
  bottom: 0;
  right: 0;
  left: 0;
  color: var(--hn-primary-color);
  background-color: #fff;
  z-index: 10;
  border-radius: 4px;
}

@media (min-width: 768px) {
  .main.hero .floating-banner {
    position: absolute;
    margin: initial;
    transform: translateY(50%);
    width: 100%;
  }
}

.main.hero .floating-banner .row {
  margin: 0;
  padding: 0 16px;
}

.main.hero .floating-banner .row .col-12 {
  padding: 32px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  border-right: 1px solid #edf2f9;
  border-left: 1px solid #edf2f9;
  justify-content: center;
}

@media (min-width: 768px) {
  .main.hero .floating-banner .row .col-12 {
    flex-wrap: nowrap;
  }
}

.main.hero .floating-banner .row .col-12:first-child {
  border-left: 0;
}

.main.hero .floating-banner .row .col-12:last-child {
  border-right: 0;
}

.main.hero .floating-banner .row .col-12 img {
  min-width: 80px;
  height: auto;
  object-fit: contain;
}

.main.hero .floating-banner .row .col-12 a {
  text-decoration: none;
}

.main.hero .floating-banner .row .col-12 h2 {
  font-size: 1rem;
  color: var(--hn-primary-color);
  text-decoration: none !important;
}

.main.hero .floating-banner .row .col-12 p {
  font-size: 0.75rem;
  margin: 0;
}

.featured_groups {
  color: #494949;
  gap: 16px;
}

.featured_groups-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* Usa el gap que ya definiste */
    margin-top: 1.5rem;
}

    .featured_groups-grid > a {
        flex: 1 1 calc(20% - 13px); /* 5 columnas: 100%/5 = 20%, menos gap */
        min-width: 180px; /* Evita que se encojan demasiado en pantallas grandes */
    }

@media (max-width: 768px) {
    .featured_groups-grid > a {
        flex: 1 1 calc(50% - 8px); /* 2 por fila en tablet */
    }
}

@media (max-width: 576px) {
    .featured_groups-grid > a {
        flex: 1 1 100%; /* 1 por fila en móvil */
    }
}

.home-group-item {
    background: linear-gradient(135deg, rgba(0, 86, 163, 0.9) -29%, rgba(11, 180, 170, 0.9) 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

    .home-group-item .img {
        flex-shrink: 0; 
    }

    .home-group-item img {
        width: 70px;
        height: auto;
        display: block;
    }

    .home-group-item .text {
        flex: 1;
        min-width: 0; 
    }

    .home-group-item h3 {
        font-size: 1rem;
        line-height: 1.3;
        margin: 0 0 6px;
        color: inherit;
        font-weight: 600;
    }

    .home-group-item .count {
        font-size: 0.75rem;
        line-height: 1.4;
        margin: 0;
        color: rgba(255, 255, 255, 0.9);
    }

    
    .home-group-item:hover {
        background-color: #fff;
        color: #000;
    }

        .home-group-item:hover h3,
        .home-group-item:hover .count {
            color: inherit;
        }

        .home-group-item:hover .count {
            color: rgba(0, 0, 0, 0.7);
        }

.homepage [role=main],
.homepage .main,
.homepage .module-feeds,
.homepage .hero {
  background-color: #edf2f9;
}

@media (min-width: 768px) {
  .featured_groups {
    display: flex;
    gap: 24px;
  }

  .home-group-item {
    flex: 0 0 auto;
    width: calc(25% - (24px * 3 / 4));
  }
}

/* Custom Dataset Card Styles */
.custom-dataset-card {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.custom-dataset-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  border-color: var(--hn-secondary-color);
}

.custom-dataset-card .dataset-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-dataset-card .dataset-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.custom-dataset-card .dataset-heading a {
  color: var(--hn-header-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.custom-dataset-card .dataset-heading a:hover {
  color: var(--hn-secondary-color);
  text-decoration: none;
}

.custom-dataset-card .dataset-description {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.custom-dataset-card .dataset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #666;
}

.custom-dataset-card .dataset-organization,
.custom-dataset-card .dataset-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.custom-dataset-card .dataset-organization i,
.custom-dataset-card .dataset-date i {
  color: var(--hn-secondary-color);
  font-size: 0.9rem;
}

.custom-dataset-card .dataset-resources {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.custom-dataset-card .resources-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-dataset-card .resource-formats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.custom-dataset-card .resource-formats li {
  display: inline;
}

.custom-dataset-card .resource-formats .badge {
  background-color: var(--hn-third-color);
  color: white;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.custom-dataset-card .resource-formats .badge:hover {
  background-color: var(--hn-secondary-color);
  transform: scale(1.05);
}

.custom-dataset-card .dataset-private {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 12px;
}

.custom-dataset-card .badge.bg-info,
.custom-dataset-card .badge.bg-danger {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 12px;
}

.custom-dataset-card .empty {
  color: #999;
  font-style: italic;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .custom-dataset-card {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .custom-dataset-card .dataset-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .custom-dataset-card .dataset-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .custom-dataset-card .dataset-resources {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* Enhanced format badge colors */
.custom-dataset-card .badge[data-format=html],
.custom-dataset-card .badge[data-format*=html] {
  background-color: #2E759E;
}

.custom-dataset-card .badge[data-format=json],
.custom-dataset-card .badge[data-format*=json] {
  background-color: #D63B00;
}

.custom-dataset-card .badge[data-format=xml],
.custom-dataset-card .badge[data-format*=xml] {
  background-color: #D63B00;
}

.custom-dataset-card .badge[data-format=text],
.custom-dataset-card .badge[data-format*=text] {
  background-color: #1A7EA3;
}

.custom-dataset-card .badge[data-format=csv],
.custom-dataset-card .badge[data-format*=csv] {
  background-color: #856A00;
}

.custom-dataset-card .badge[data-format=xls],
.custom-dataset-card .badge[data-format*=xls] {
  background-color: #207E42;
}

.custom-dataset-card .badge[data-format=zip],
.custom-dataset-card .badge[data-format*=zip] {
  background-color: #6c757d;
}

.custom-dataset-card .badge[data-format=api],
.custom-dataset-card .badge[data-format*=api] {
  background-color: #fd7e14;
}

.custom-dataset-card .badge[data-format=pdf],
.custom-dataset-card .badge[data-format*=pdf] {
  background-color: #dc3545;
}

.custom-dataset-card .badge[data-format=rdf],
.custom-dataset-card .badge[data-format*=rdf] {
  background-color: #6f42c1;
}

/* facets*/

.custom-facets .facet-section {
  background: #fff;
  border-radius: 8px;
  padding: 0;
}

.custom-facets .facet-header {
  background-color: #f4f4f4;
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
}

.custom-facets .facet-list li {
  padding: 4px 8px;
}

.custom-facets .facet-link {
  text-decoration: none;
}

.custom-facets .facet-link.active {
  color: #0056b3;
}


.resource-item {
    position: relative;
    padding: 10px 10px 10px 60px;
    margin-bottom: 0px;
    border-radius: none !important; 
    height: 50px;
    border-left: 2px solid #eee;
}

.custom-additional-info.table .dataset-label{
  width: 33%;
}
/* nuevo estilo */
/* Estilo para el logo */
.org-logo img.org-avatar {
    width: 60%;
    object-fit: cover;
    /*border-radius: 8px;*/
    margin-bottom: 12px;
    /*border: 2px solid #eee;*/
}

/* Título centrado */
    .org-title {
    font-size: 1.25rem;
    margin: 10px 0;
}

/* Contenedor de estadísticas */
.org-stats {
    display: flex;
    justify-content: space-between;
    margin: 16px 0;
    gap: 8px;
}

.stat-card {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 10px 8px;
    text-align: center;
    flex: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botón de seguir centrado */
.follow-button-container .btn {
    width: 100%;
    font-size: 0.8

}


/*Estilos para carrusel en index*/
  .htmx-indicator{opacity:0}
  .htmx-request .htmx-indicator{opacity:1; transition: opacity 200ms ease-in;}
  .htmx-request.htmx-indicator{opacity:1; transition: opacity 200ms ease-in;}
  
  /* Estilos para el carrusel */
  .carousel-container {
    position: relative;
    overflow: hidden;
    margin: 20px 0;
  }
  
  .carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
  }
  
  .carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
  }
  
  .carousel-btn {
    background: #4994cd;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .carousel-btn:hover {
    background: #3a7ab0;
    transform: scale(1.1);
  }
  
  .carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: scale(1);
  }
  
  .carousel-indicators {
    display: flex;
    gap: 10px;
  }
  
  .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
  }
  
  .indicator.active {
    background: #4994cd;
    width: 30px;
    border-radius: 6px;
  }
  
  @media (min-width: 768px) {
    .carousel-slide {
      flex-direction: row;
      flex-wrap: wrap;
    }
    
    .carousel-slide .home-group-item {
      flex: 0 0 calc(50% - 10px);
    }
  }
  
  @media (min-width: 1024px) {
    .carousel-slide .home-group-item {
      flex: 0 0 calc(25% - 13.33px);
    }
  }