*{
    padding: 0;
    margin: 0;
}

:root {
    --primary: #19505D;
    --secondary: #54514a;
    --tertiary: #9B0000;
    --highlight: #FDEFC8;
}

/* ------  ALERT -------- */
.alert {
    padding: 20px;
    background-color: goldenrod;
    color: white;
    font-family: 'Lato', sans-serif;
    text-align: center;
  }

  .alert a {
    color: white;
  }
  .alert a:hover {
    color: var(--highlight);
  }
  
  .closebtn {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    float: right;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
  }
  
  .closebtn:hover {
    color: black;
  }


/* ----- HEADER ----- */
header {
    background-color: var(--primary);
    font-family: 'EB Garamond', serif;
}

header li{
    list-style: none;
}

header a{
    color: white;
    text-decoration: none;
}

.header-content {
    max-width: 1500px;
    padding: 0 2rem;
    margin: 0 auto;
}

/* ----- HEADER LANGUAGE ----- */

.lang-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 10px;
}

.lang {
    padding-left: 20px;
    font-family: 'Lato', sans-serif;
}

.lang-link {
    border: 3px solid transparent;
    transition: 0.3s ease-out;
}

.lang-link-active {
    color: var(--highlight);
}

/* ----- HEADER NAVIGATION ----- */

nav{
    min-height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

.nav-logo{
    font-size: 3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding-bottom: 10px;
}

.lacli-rays-nav {
    width: 25px;
    padding-right: 4px;
}

.nav-menu{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.nav-link{
    padding: 5px 0;
    border: 3px solid transparent;
    font-size: 1.2rem;
    transition: 0.3s ease-out;
}

.nav-link i {
    font-size: 1.6rem;
}

.nav-link:hover{
    border-bottom-color: white;
}

.hamburger{
    display: none;
    cursor: pointer;
}

.bar{
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    background-color: white;
}

@media(max-width:1200px){
    .hamburger{
      display: block;
    }
   .hamburger.active-hamburger .bar:nth-child(2){
      opacity: 0;
    }
   .hamburger.active-hamburger .bar:nth-child(1){
      transform: translateY(8px) rotate(45deg);
    }
   .hamburger.active-hamburger .bar:nth-child(3){
      transform: translateY(-8px) rotate(-45deg);
    }
   .nav-menu{
      position: fixed;
      left: -100%;
      top: 99px;
      gap: 0;
      flex-direction: column;
      background-color: var(--secondary);
      width: 100%;
      text-align: center;
      transition: 0.3s;
      padding: 20px 0 100vh 0;
      z-index: 100;
    }
   .nav-item{
      margin: 16px 0;
    }
   .nav-menu.active-hamburger{
      left: 0;
    }
}

/* ----- INDEX HERO ----- */
#index-searchfield .hero-img {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("media/mapa-metztitlan.png");
    position: relative;
    height: 70vh;
    overflow: hidden;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#index-searchfield .hero-content {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    text-align: center;
    width: 80vw;
    max-width: 800px;
}

.hero-award-wrapper {
    position: absolute;
    bottom: 0;
    left: 50%; 
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100px;
}

.hero-award-wrapper img {
    max-height: 100%;
    height: 50px;
    padding-bottom: 10px; 
}

#index-searchfield .hero-content p {
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 3rem auto;
    text-shadow: 0 0 10px black;
    max-width: 680px;
}

#index-searchfield .hero-search-wrapper {
    display: flex;
    justify-content: center;

}

#index-search {
    width: 100%;
    border: 1px solid var(--primary);
    border-radius: 0;
    border-right: none;
    padding: 15px 0 15px 15px;
    font-family: 'Lato', sans-serif;
    font-size: 20px;
}

textarea:focus, input:focus{
    outline: none;
}

#index-search-btn {
    width: 20%;
    border: none;
    color: white;
    background-color: var(--primary);
    font-size: 18px;
}

#index-search-btn i {
    font-size: 20px;
}

#index-search-btn:hover {
    background: var(--tertiary);
    cursor: pointer;
}

.credit {
    font-family: 'Lato', sans-serif;
    font-size: 9px;
    text-align: right;
    /* width: 40%; */
    max-width: 300px;
    padding: 0.3rem 1rem 0 0;
    position: absolute;
    right: 0;
    color: var(--secondary);
}

/* ----- INDEX CONTENT ----- */
#index-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1rem;
}

#index-content h3 {
    color: var(--primary);
    font-family: 'Lato', sans-serif;
    padding-bottom: 1rem;
    font-size: 1.2rem;
}

.index-item {
    margin-bottom: 7rem;
}

.populations {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 6rem;
}

.pop {
    text-align: center;
    flex: 0 0 25%;
    max-width: 300px;
}

.index-item h2 {
    font-size: 1.7rem;
    color: var(--primary);
    padding-bottom: 1rem;
}

.index-item p {
    font-family: 'Lato', sans-serif;
    padding: 0 10px;
}

@media(max-width: 980px){
    .populations {
        row-gap: 4rem;
        justify-content: space-around;
    }
    .pop {
        text-align: center;
        flex: 0 0 50%;
        max-width: 40%;
    }
}

@media(max-width: 690px){
    .pop {
        flex: 0 0 100%;
        max-width: 70%;
    }
}

.contributors {
    display: flex;
    justify-content: space-evenly;
    /* align-items: flex-start; */
    padding: 0;
}

.main-contributor {
    text-align: center;
    max-width: 150px;
}

.collaborating-contributors {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 2rem;
}

.main-contributor img {
    width: 100%;
    object-fit: cover;
}

.collaborating-contributors img {
    width: 250px;
    object-fit: cover;
} 

@media(max-width: 690px){
    .contributors {
        flex-direction: column;
        align-items: center;
    }
    .collaborating-contributors {
        padding: 5rem 0 3rem 0;
    }
    .main-contributor h3{
        text-align: center;
    }
    .main-contributor img {
        max-width: 120px;
    }
    .collaborating-contributors img {
        height: 60px;
    }

    .subpage .collaborating-contributors {
        padding: 0;
    }

    .subpage .main-contributor img {
        max-width: 100px;
    }
}


/* ----- FOOTERS ----- */

/* Secondary Footer: Only on library.html */
footer.footer-secondary {
    font-family: 'EB Garamond', serif;
    color: var(--secondary);
    text-align: center;
    font-size: 0.8rem;
    padding: 3rem 3rem 1rem 3rem;
}

.footer-main {
    background-color: var(--primary);
    width: 100%;
}

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

.footer-main a {
    color: white;
    text-decoration: none;
}

.footer-main a:hover {
    color: var(--highlight);
}

.footer-main-wrapper {
    padding: 3rem 4rem 2rem 4rem;
    font-family: 'EB Garamond', serif;
    color: white;
    font-size: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-identity {
    width: 300px;
    display: flex;
    align-items: center
}

.lacli-rays-footer {
    width: 20px;
    padding-right: 10px;
}

.footer-identity-h2 {
    font-size: 2.5rem;
    margin: 0;
    padding: 0;
}

.footer-main-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-identity-text {
    max-width: 300px;
}

.footer-socials {
    font-size: 2rem;
    display: flex;
    gap: 40px;
    padding-top: 0.5rem;
}

.footer-nav-links li {
    padding-bottom: 10px;
}

.footer-btns {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-btn {
    border: 2px solid white;
    font-family: 'Lato', sans-serif;
    padding: 5px 30px;
    text-align: center;
    font-size: 1.2rem;
    border-radius: 5px;
}

.footer-btn:hover {
    border-color: var(--highlight);
}

.footer-creative-commons {
    padding-top: 3rem;
    font-style: italic;
    max-width: 300px;
}

.footer-creative-commons img {
    height: 100%; /* Ensures the image fills the entire line height */
    vertical-align: middle;
}

.cc-license-img {
    padding: 0 5px;
}

@media(max-width: 810px){
    .footer-main-wrapper {
        padding: 3rem 1rem 2rem 1rem;
    }
    .footer-main-row {
        display: block;
    }
    .footer-main-box {
        padding-top: 2rem;
    }
    .footer-creative-commons {
        max-width: none;
        padding-top: 1rem;
    }
}



/* ----- LOADER ----- */
#loader {
    margin-top: 60px;
}
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--tertiary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: auto;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
  
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----- MAIN ----- */
main {
    margin: 0 auto 6rem auto;
    padding: 0 1rem;
    font-family: 'Lato', sans-serif;
}

/* ----- PAGES ----- */
main h1 {
    font-family: 'EB Garamond', serif;
    font-size: 2.5rem;
    margin: 3rem 0 2rem 0;
    text-align: center;
}

main a {
    color: var(--primary);
    text-decoration: underline;
}

main a:hover {
    color: var(--tertiary)
}

main h2 {
    margin-top: 2.5rem;
    padding-bottom: 1rem;
    font-family: 'EB Garamond', serif;
}

main ul {
    list-style-type: circle;
    padding-left: 2rem;
}

main li {
    padding-bottom: 1rem;
}


/* ----- ABOUT ----- */

.about-cards-wrapper {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.about-card {
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    border-radius: 10px;
    width: 450px;
    background-color: rgba(25, 80, 92, 0.1);
    display: flex;
    flex-direction: column;
    position: relative; 
}

.about-card-title { 
    margin: 0;
    padding: 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    background-color: rgba(25, 80, 92, 0.3);
}

.about-card-content {
    padding: 15px;
    font-weight: 100;
    line-height: 1.5;
    flex-grow: 1;
}

.about-card-links-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px;
    margin-top: auto; 
}

.about-card-link {
    margin-left: 15px;
    text-decoration: none;
}

.about-card-link i {
    margin-right: 5px;
}

.about-collaborators-logos-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    margin-top: 3rem;
}
@media (max-width: 1100px) {
    .about-cards-wrapper {
        flex-direction: column;
    }
    .about-card {
        margin: 0 auto;
        width: 100%;
        max-width: 800px;
    }
}
@media (max-width: 800px) {
    .about-collaborators-logos-wrapper {
        flex-direction: column;
        gap: 40px;
    }
}

.team {
    max-width: 800px;
    margin: 5rem auto;
}

.team h2 {
    text-align: center;
    border-bottom: 1px solid var(--secondary);
    margin-bottom: 1rem;
    padding: 5px;
}

.person {
    width: 200px;
    text-align: center;
}

.affiliation {
    font-weight: 200;
    font-style: italic;
}

#execTeam, #qcTeam, #collaborators {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}
@media (max-width: 500px) {
    #execTeam, #qcTeam, #collaborators{
        flex-wrap: none;
        flex-direction: column;
        align-items: center;
    }
}


/* ----- IMPACT ----- */

.impact-story-wrapper {
    display: flex;
    align-items: center; 
    justify-content: center; 
    margin-top: 3rem;
}
  
.impact-story-wrapper iframe {
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    height: 315px;
    width: 100%;
    max-width: 560px;
}
  
.impact-story-wrapper .impact-news-item {
    padding-left: 50px;
    width: 30%;
    max-width: 400px; 
    text-align: left;
}
.impact-news-item {
    font-weight: 100;
    line-height: 1.5;
}
@media (max-width: 900px) {
    .impact-story-wrapper {
        flex-direction: column;
    }
    .impact-story-wrapper .impact-news-item {
        padding-left: 0;
        width: 100%;
        text-align: center;
        max-width: 600px; 
    }
}

#awards-display {
    margin: 3rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
}

.award-item {
    width: 150px;
    padding: 20px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    border-radius: 5px;
    text-align: center;
}

.award-item a {
    text-decoration: none;
}
.award-item i {
    font-size: 2rem;
    padding-bottom: 1rem;
    color: var(--primary);
}
.features-display-heading {
    text-align: center;
    margin-top: 4rem;
}

#features-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.feature-item {
    width: 200px;
    padding: 20px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    border-radius: 5px;
}

.feature-item-img {
    width: 100%;
}

/* ----- HELP ----- */

.help-wrapper {
    max-width: 800px;
    margin: 0 auto;
}
.help-accordion-wrapper {
    padding-bottom: 150px;
}

.help-accordion-btn {
    background-color: #eee;
    font-family: 'Lato', sans-serif;
    font-size: 1rem ;
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    transition: 0.4s;
}
  
.help-accordion-active, .help-accordion-btn:hover {
    background-color: var(--highlight);
}

.help-accordion-btn:after {
    content: '\0002B'; /* Unicode character for "plus" sign (+) */
    font-size: 18px;
    font-weight: 600;
    color: #777;
    float: right;
    margin-left: 5px;
}
  
.help-accordion-active:after {
    content: "\02013"; /* Unicode character for "minus" sign (-) */
}

.help-accordion-btn:focus {
    outline: none;
    border: 1px solid blue;
}

.help-accordion-panel {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    line-height: 1.7;
}

.help-accordion-panel ul {
    padding: 1rem 2rem 2rem 2rem;
}
.help-accordion-panel p {
    padding: 1rem 2rem 2rem 0;
}

.sample-questions li {
    padding-bottom: 0;
}

.sample-question-suggestion {
    list-style: none;
    font-style: italic;
    padding-bottom: 2rem !important;
    color: var(--tertiary);
}

@media(max-width: 500px){
    .help-accordion-btn:after {
        content: none;
    }
    .help-accordion-active:after {
        content: none;
    }
}

/* ----- CONTACT ----- */
#contact {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.form-control {
    width: 500px;
    font-family: 'Lato', sans-serif;
    padding: 1rem 0.5rem;
    font-size: 1rem;
}
.contact-text {
    font-weight: 100;
    max-width: 400px;
}

.col {
    margin-bottom: 1rem;
}

.contact-btn {
    border: none;
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    margin-top: 1rem;
    width: 50%;
    cursor: pointer;
    border-radius: 3px;
    font-size: 1rem;
}

.contact-btn:hover {
    background-color: var(--tertiary);
}

.sent {
    text-align: center;
    padding-bottom: 500px;
}

@media(max-width: 750px){
    #contact {
        display: block;
        gap: 0;
    }
    .contact-form {
        margin-top: 4rem;
    }
    #contact form {
        width: 95%;
    }
    .form-control {
        width: 100%;
    }
}
