body {
    font-family: "Montserrat", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff; /* Light purple */
    font-optical-sizing: auto;
    font-style: normal;
}

header {
    background: #6a1b9a;
    color: #ffffff;
    padding: 0;
    text-align: center;
    height: 64px; /* Use a fixed pixel height */
    min-height: 64px;
    z-index: 2000;
    position: relative;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    margin: 0;
    background-color: #6a1b9a;
    height: 100%;
    min-height: 64px;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1px; /* Space between nav-links and language-switcher */
    height: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1px;
}

.language-switcher {
    display: flex;
    align-items: center;
    margin: 0px 5px 0px 15px; /* Add margin for spacing */
}

.language-switcher select {
  font-size: 1.5em;
  padding: 2px 10px;
  background: #6a1b9a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  outline: 2px solid #8e24aa;
  border-color: #8e24aa;
}

header .logo img {
    height: 40px; /* or a value that fits well in 64px header */
    display: block;
    align-self: center;
}

header .logo a:hover {
    background-color: "transparent"; /* No background on hover */
}

header .nav-links {
    display: flex;
    height: 100%;
    align-items: stretch;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

header .nav-links li {
    display: flex;
    height: 100%;
    align-items: stretch;
}

header .nav-links a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    padding: 3px 6px; /* wider padding for easier hover */
    box-sizing: border-box;
}

/* Move hover effect to li:hover a for full height */
header .nav-links li:hover a {
    background-color: #d1c4e9;
    color: #6a1b9a;
    height: 100%;
}

nav {
    margin: 0;
}

nav a {
    color: #ffffff;
    text-decoration: none;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

footer {
    background: #35424a;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

h1 {
    color: #6a1b9a; /* Purple */
    text-align: center;
    margin-top: 20px;
}

slider {
    position: relative;
    max-width: 100%;
    margin: 20px auto;
}

slider img {
    width: 100%;
    height: auto;
}

faq {
    margin: 20px 0;
}

faq h2 {
    padding: 25px;
    margin: 25px;
}

faq h3 {
    cursor: pointer;
    background: #35424a;
    color: #ffffff;
    padding: 10px;
    margin: 5px 0;
}

faq-content {
    display: none;
    padding: 10px;
    background: #e4e4e4;
}

.faq-answer {
    display: none; /* Hide answers by default */
    padding: 10px;
    background-color: #ffffff; /* Light purple background for answers */
    border-left: 3px solid #6a1b9a; /* Purple border for emphasis */
    margin: 5px 0;
}

.faq-question {
    cursor: pointer;
    padding: 10px;
    background-color: #6a1b9a; /* Purple background for questions */
    color: #ffffff; /* White text for contrast */
    border-radius: 5px;
    margin: 5px 0;
}

.faq-question:hover {
    background-color: #d1c4e9; /* Light purple hover effect */
}

.faq-item {
    width: 100%;
    margin: 0 auto; /* Centers the div horizontally */
    padding: 10px; /* Optional: Add some padding for better spacing */
    box-sizing: border-box; /* Ensures padding is included in the width */
}

.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: auto; 
    overflow: hidden;
    aspect-ratio: 22 / 9; 
    height: auto;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%; /* Ensure the image takes the full width of the container */
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio and crop excess parts */
    border-radius: 10px; /* Optional: Add rounded corners */
    align-self: center;
}

.slide-overlay {
    position: absolute;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 16px 24px;
    border-radius: 8px;
    max-width: 40%;
}

.overlay-top-left {
    top: 10%;
    left: 10%;
}

.overlay-bottom-right {
    bottom: 10%;
    right: 10%;
}

.overlay-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.slide-title {
    margin: 0 0 8px 0;
    font-size: 1.5em;
    font-weight: bold;
}

.slide-text {
    margin: 0;
    font-size: 1em;
}

button.prev,
button.next {
    position: absolute;
    top: 0;
    width: 60px;        /* Wider clickable area */
    height: 100%;       /* Full height of the slideshow */
    background: rgba(0,0,0,0.2);
    color: #fff;
    border: none;
    font-size: 2em;
    cursor: pointer;
    z-index: 2;
    transition: ease-out 0.3s;
    outline: none;
}

button.prev:hover,
button.next:hover {
    background: rgba(0,0,0,0.4);
}

button.prev {
    left: 0;
    border-radius: 10px 0 0 10px;
}

button.next {
    right: 0;
    border-radius: 0 10px 10px 0;
}

button.prev:hover, button.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80vw;
    height: 80vh;
    max-width: 900px;
    max-height: 90vh;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ccc;
    z-index: 1001;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(106,27,154,0.12);
    flex-direction: column;
    overflow: hidden;
    padding: 0;    /* Remove padding for precise height control */
}

#popup-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

#popup-content img {
    display: inline-block;
}

.popup-close {
    display: block;
    margin-top: 10px;
    cursor: pointer;
    bottom: 30px;
    right: 30px;
    position: absolute;
    background-color: #6a1b9a; 
    color: #ffffff; /* White text for contrast */
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.popup-close:hover,
.popup-close:focus {
    background-color: #6a1b9a; 
    transform: translateY(-2px) scale(1.03);
}

.popup-image-slider {
    flex: 0 0 70%;
    overflow-x: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    box-sizing: border-box;
    border-bottom: 1px solid #eee;
}

.popup-papers-section {
    flex: 0 0 25%;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    box-sizing: border-box;
}

.popup-slider-img {
  height: 120px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.popup-paper-card {
  background: #faf7fd;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(106,27,154,0.08);
  padding: 16px 18px;
  min-width: 180px;
  max-width: 220px;
  text-decoration: none;
  color: #333;
  transition: box-shadow 0.2s, transform 0.1s;
  display: block;
}

.popup-paper-card:hover {
  box-shadow: 0 4px 16px rgba(106,27,154,0.16);
  transform: translateY(-2px) scale(1.03);
}

.popup-paper-title {
  font-weight: 600;
  color: #6a1b9a;
  margin-bottom: 6px;
}

.popup-paper-desc {
  font-size: 0.95em;
  color: #555;
}

.popup-pdf-viewer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    width: 100%;
}

.popup-back-btn {
    align-self: flex-start;
    background: linear-gradient(90deg, #8e24aa 0%, #6a1b9a 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 1rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: 0.2s, transform 0.1s;
}
.popup-back-btn:hover {
    background: linear-gradient(90deg, #6a1b9a 0%, #8e24aa 100%);
    transform: translateY(-2px) scale(1.03);
}

.popup-send-btn {
    align-self: flex-end;
    background: linear-gradient(90deg, #8e24aa 0%, #6a1b9a 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 1rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: 0.2s, transform 0.1s;
}
.popup-send-btn:hover {
    background: linear-gradient(90deg, #6a1b9a 0%, #8e24aa 100%);
    transform: translateY(-2px) scale(1.03);
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent gray */
    z-index: 1000;
}

.section-mision{
    padding-left: 5vw;
    padding-right: 5vw;
}

.section-vision{
    padding-left: 5vw;
    padding-right: 5vw;
}

/* Questionnaire */
.progress-bar {
  width: 100%;
  background: #eee;
  height: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
}
.progress {
  height: 100%;
  background: #4caf50;
  border-radius: 5px;
  transition: width 0.3s;
}

.question-option {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 12px 20px;
  margin: 8px 0;
  cursor: pointer;
  border: 1px solid #e0e0e0;
}

.question-option:hover {
  background: #e0f7fa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

#popup-questionnaire{
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ccc;
    padding: 20px;
    z-index: 1001;
    border-radius: 10px;
}

.questionnaire-intro {
    text-align: justify;
    margin-left: 10vw;
    margin-right: 10vw;
}

.questionnaire-btn {
    width: 20vw; /* Set a fixed width for all buttons */
    padding: 14px 0;
    margin: 10px 0;
    background: linear-gradient(90deg, #6a1b9a 0%, #8e24aa 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(106,27,154,0.08);
    display: block;
    text-align: center;
    align-self: flex-start;
}

.questionnaire-btn:hover, .questionnaire-btn:focus {
    background: linear-gradient(90deg, #8e24aa 0%, #6a1b9a 100%);
    transform: translateY(-2px) scale(1.03);
    outline: none;
}

.questionnaire-back-btn {
    background-color: #6a1b9a; /* Purple */
    color: #fff;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    display: block;
    bottom: 30px;
    left: 30px;
    position: absolute;
    text-align: center;
    margin-top: 10px;
}

.questionnaire-back-btn:hover,
.questionnaire-back-btn:focus {
    background-color: #6a1b9a; /* Purple */
    transform: translateY(-2px) scale(1.03);
}

.questionnaire-result-card {
    background: #faf7fd;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(106,27,154,0.08);
    padding: 32px 24px 24px 24px;
    max-width: 60vw;
    margin: 40px auto 0 auto;
    text-align: left;
}

.result-section {
    margin-top: 18px;
}

.result-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
}

.result-label {
    min-width: 15vw;
    max-width: 15vw;
    font-weight: 600;
    color: #6a1b9a;
    margin-right: 10px;
    word-break: break-word;
}

.result-value {
    min-width: 45vw;
    max-width: 45vw;
    font-weight: 500;
    color: #333;
    flex: 1;
    word-break: break-word;
}

.result-level {
    color: #43a047;
}

.result-emotion {
    color: #039be5;
}

.result-action {
    color: #fbc02d;
}

.score-progress-bar {
    width: 100%;
    height: 18px;
    background: #eee;
    border-radius: 9px;
    margin: 18px 0 8px 0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(106,27,154,0.07);
}
.score-progress {
    height: 100%;
    background: linear-gradient(90deg, #43a047 0%, #8e24aa 100%);
    border-radius: 9px 0 0 9px;
    transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.score-label {
    font-size: 1rem;
    color: #6a1b9a;
    font-weight: 600;
    margin-bottom: 12px;
}



/* Mobile styles */
@media (max-width: 700px) {
    .slide {
        position: static !important;
        top: unset !important;
        left: unset !important;
        width: 100vw !important;
        height: auto !important;
        min-height: unset !important;
        margin: 0 !important;
        padding: 0 !important;
        display: none;
        flex-direction: column;
        align-items: stretch;
        opacity: 1 !important;
        z-index: 1 !important;
        box-sizing: border-box;
    }
    .slide.active {
        display: flex !important;
    }
    .slideshow-container {
        aspect-ratio: unset;
        height: auto;
        min-height: unset;
        max-width: 100vw;
        overflow: visible;
    }
    .slide img {
        width: 100vw;
        max-width: 100vw;
        height: auto;
        border-radius: 0;
        margin: 0;
        object-fit: cover;
        display: block;
    }
    .slide-overlay {
        position: static !important;
        background: #fff;
        color: #222;
        width: 100vw;
        max-width: 100vw;
        padding: 18px 8vw 24px 8vw;
        box-sizing: border-box;
        border-radius: 0;
        margin: 0;
        text-align: left;
        font-size: 1.1em;
        z-index: 1;
        display: block;
    }
    .slide-title {
        font-size: 1.4em;
    }
    .slide-text {
        font-size: 1.1em;
        line-height: 1.5;
    }
    button.prev,
    button.next {
        position: fixed !important;
        top: 50%;
        transform: translateY(-50%);
        left: 0;
        right: auto;
        width: 5vw;
        min-width: 5vw;
        height: 100%;
        border-radius: 0 4px 4px 0;
        z-index: 1002;
        background: rgba(106,27,154,0.7);
        color: #fff;
        font-size: 2.2em;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    }
    button.next {
        left: auto;
        right: 0;
        border-radius: 24px 0 0 24px;
        justify-content: flex-end;
        box-shadow: -2px 0 8px rgba(0,0,0,0.08);
    }
    .slide-overlay.overlay-center {
        transform: none !important;
    }
}

.language-switcher select {
  background: #6a1b9a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
  align-self: center;
}
.language-switcher select:focus {
  outline: 2px solid #8e24aa;
}