/* styles.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    /* The background is removed from the body and moved to the particles container */
}
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    /* The gradient background is now here */
    background: linear-gradient(to bottom, #01203D,  #27c3ff);
}
.title-panel {
    background-color: rgba(239, 239, 240, 0);
    margin: 0 auto;
    width: 90vw;
    /*height: 23vh;*/
}
.logo {
    background-image: url("logo_long.png");
    background-color: (239, 239, 240, 0);
    height: 200px;
    background-size: 90% 100%;
    background-position: left;
    background-repeat: no-repeat; 
    background-size: contain;
    position: center;
    margin-left: 10%;
    margin-right: 10%;
}
.intro-text {
    text-align: center;
    color: #f0ecf0;
    font-size: clamp(1.2rem, 1rem + 1.5vw, 2.0rem);
    font-family: 'Times New Roman', Times, serif;
    margin-top: 0px;
    margin-bottom: 0px;
    font-style: italic;
    /*padding-top: 180px;*/
    max-width: 100%;
}
.reference {
    margin-top: 20px;
    margin-bottom: 20px;
    max-width: 100%;
}
.reference-text {
    text-align: center;
    color: #f0ecf0;
    font-size: clamp(1.2rem, 1rem + 1.5vw, 2.0rem);
    font-family: 'Times New Roman', Times, serif;
    font-style: normal;
}
.top-panel {
    background-color: rgb(255, 255, 255);
    color:  #333;
    width: 70vw;
    margin: 2vh auto 0 auto;
    height: fit-content;
    padding: 30px;
    /*padding-bottom: 3vh;*/
    border-radius: 0px;
    border-color: #01203D;
    border-width: 1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 150px auto 0px auto;
    display: block; /* Changed from none to block to make it always visible */
    justify-content: center;
    align-items: center;
    border-radius: 35px;
}
/*
.main-container {
    width: 70vw;
    margin: 2vh auto 0 auto;
    height: fit-content;
    padding: 0rem;
    position: relative;
    z-index: 1;
    border-radius: 35px;
    background-color: rgba(239, 239, 240, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 0vh;
}*/
.about-button-class {
    text-align: center;
    background-color: rgba(239, 239, 240, 0);
    color:  #ffffff;
    padding: 10px 20px;
    border: 3px solid rgba(163, 204, 242, 0.624);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    max-width: 450px;
    font-size: 1.8em;
}
.about-button-class:hover {
    background-color: white;
    color:  #333;
    padding: 10px 20px;
    border: 2px solid #fdfdfd;
}
.about-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    margin-bottom: 0px;
    margin-top: 20px;
}
.thermodynamic-variables-text {
    color: #333;
    font-size: 1.4em;
    margin: 5px 5px;
}
.isotherm-example-container {   
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    height: fit-content;
    background-color:  rgba(253, 253, 253, 0);
    opacity: 0.8;
    padding: 20px;
    border-radius: 5px;
    margin: 0px 0px 0px 0px;
    box-shadow: 0 2px 2px rgba(0,0,0,0);
}
.isotherm-example {
    flex: 1;
    /*width: 30%;
    height: 30%;
    margin: 20px 0px 0px 0px;*/
}
.explanation-phases {
    color:   #333;
    font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1.2rem);
    margin: 5px 15px 15px 5px;
    text-align: justify;
}
.annotations {
    color:   #333;
    font-size: 1.2rem;
    margin: 15px 15px;
    text-align: justify;
}
.annotations2 {
    color:   #333;
    font-size: 1.0rem;
    text-align: justify;
    font-style: italic;
}
.explanation-isotherm-example-container {
    flex: 1.7;
    background-color:  rgba(239, 239, 240, 0);
    border-radius: 10px;
    border: 1px solid  rgba(0, 0, 0, 0);
    box-shadow: 0 2px 4px  rgba(6, 6, 6, 0);
    padding: 10px;
    margin: 0px 15px 15px 5px;
    width: 100%;
    height: 100%;
}
.main-container {
    width: 70vw;
    margin: 2vh auto 0 auto;
    height: fit-content;
    padding: 0rem;
    position: relative;
    z-index: 1;
    border-radius: 35px;
    background-color: rgba(239, 239, 240, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 0vh;
}
.left-panel {
    flex: 1;
    max-width: 60vw;
    margin: 0vh auto 0vh auto;
    background-color: rgba(239, 239, 240, 0);
    padding: clamp(1rem, 5vw, 2rem);
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0);
    height: fit-content;
}
.grid-input-entries {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 100%;
    justify-items: center;
    align-items: end;
}
.right-panel {
    margin: 0px 0px 0px 0px;
    width: 100%;
    padding: 0px 10px 0px 0px;
    overflow: hidden;
    height: fit-content;
}
h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}
h3 {
    color: #333;
    margin: 0px 0px 0px 0px;
    text-align: center;
    font-weight: normal;
    font-size: 1.0em;
    font-style: italic;
}
h4 {
    color: #333;
    text-align: center;
    font-weight: normal;
    font-size: 1.3em;
    font-style: italic;
}
h5 {
    color: #000000;
    text-align: center;
    font-weight: bold;
    font-size: 1.9em;
    margin: 0px 0px 0px 0px;
}
h6 {
    color: #333;
    font-size: 1.5em;
    text-align: left;
    margin-bottom: 0px 0px 0px 0px;
}
.form-group {
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    text-align: center;
    width: 100%;
}
.form-group input {
    width: 100%;
    max-width: 250px;
    text-align: center;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}
input[type="text"],
input[type="number"],
input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.file-upload-btn {
    display: inline-block;
    background-color: #1673c8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
}
.file-upload-btn:hover {
    background-color: #105392; /* A slightly darker blue for hover */
}
/* Styles the text that displays the selected filename */
.file-name-display {
    margin-left: 10px;
    color: #666;
    font-style: italic;
}
button {
    background-color:  #02519b;
    color:  #eee;
    padding: 2px 2px;
    border-radius: 5px;
    border-color: #01203D;
    box-shadow: 2px 4px 6px  #a9d0f7;
    cursor: pointer;
    font-size: 2em;
    width: 100%;
}
.analyze-button {
    background-color: #02519b;
    color: #eee;
    padding: 2px 2px;
    border-radius: 5px;
    border-color: #01203D;
    box-shadow: 2px 4px 6px #a9d0f7;
    cursor: pointer;
    font-size: 2em;
    width: fit-content;
    margin: 15px auto;
    display: block;
    text-align: center;
}
.analyze-button:hover {
    background-color: white;
    color: #02519b;
    border: 3px solid #02519b;
}
.download-button {
    background-color: #02519b;
    color: #eee;
    padding: 10px 20px;
    border-radius: 5px;
    border-color: #01203D;
    box-shadow: 2px 4px 6px #a9d0f7;
    cursor: pointer;
    font-size: 1.5em;
    width: fit-content;
    margin: 10px auto;
    display: block;
    text-align: center;
    min-width: 200px;
}

.download-button:hover {
    background-color: white;
    opacity: 0.2;
    color: #02519b;
    border: 4px solid #02519b;
}
.reference-theory-paper {
    color: #333;
    font-size: 1.4em;
    font-style: italic;
    text-align: center;
}
#output {
    margin-top: 5px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 10px;
    line-height: 1.4;
}
#outputContent {
    white-space: pre-wrap;
    word-wrap: break-word;
}
.hidden {
    display: none;
}
#hidden {
    display: none;
}
#downloadSection {
    margin-top: 20px;
    text-align: center;
}

#shareSectionTypeII {
    margin-top: 15px;
    text-align: center;
}
#downloadLink {
    display: inline-block;
    background-color:  #1673c8;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}
#downloadLink:hover {
    background-color:  #1673c8;
}

#results-display-area-i, results-display-area-ii {
    margin: 0 0 0 0;
}
 /* Responsive auth links */
        .auth-links {
            position: fixed;
            top: 15px;
            right: 15px;
            z-index: 1000;
            display: flex;
            gap: 10px;
        }
        
        .auth-btn {
            background: rgba(255, 255, 255, 0.9);
            color: #333;
            padding: 8px 16px;
            text-decoration: none;
            border-radius: 5px;
            font-size: 14px;
            transition: background 0.3s;
            border: 1px solid #ddd;
            white-space: nowrap;
        }
        
        .auth-btn:hover {
            background: white;
            color: #007bff;
        }
        
        .auth-btn.primary {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }
        
        .auth-btn.primary:hover {
            background: #0056b3;
            border-color: #0056b3;
        }
        
        .user-info {
            background: rgba(255, 255, 255, 0.95);
            padding: 10px 15px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .user-welcome {
            color: #333;
            font-weight: 500;
        }
        
        .user-menu {
            position: relative;
        }
        
        .user-dropdown {
            position: absolute;
            top: 100%;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-radius: 5px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            min-width: 180px;
            display: none;
            z-index: 1001;
        }
        
        .user-dropdown.active {
            display: block;
        }
        
        .user-dropdown a {
            display: block;
            padding: 10px 15px;
            color: #333;
            text-decoration: none;
            border-bottom: 1px solid #eee;
        }
        
        .user-dropdown a:last-child {
            border-bottom: none;
        }
        
        .user-dropdown a:hover {
            background: #f8f9fa;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .auth-links {
                position: static;
                justify-content: center;
                margin-bottom: 20px;
                padding: 0 15px;
            }
            
            .user-info {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }

            .user-welcome {
                font-size: 14px;
            }
        }

        @media (max-width: 576px) {
            .auth-btn {
                font-size: 12px;
                padding: 6px 12px;
            }
        }

#summaryTableContainer,
#summaryTableContainerII {
    background-color: #fafafa;
    padding: 20px 25px 25px 25px;
    border-radius: 12px;
    margin: 20px 0px 20px 0px;
}

.summary-table td, .summary-table th {
    flex: 1;
    position: center;
    padding-left: 20px;
    padding-right: 20px;
    text-align: left;
}
.thermodynamic-variables-table {
    flex: 1;
    font-size: 1.3em;
    overflow-y: auto;
    color:  #01203D;
    overflow-x: auto;
    /*margin: 0px 15px 5px 15px;*/
}
.summary-table tr, .summary-table td {
    padding-top: 1px;
    padding-bottom: 1px;
    overflow-y: auto;
    text-align: center;
    border-bottom: 0px solid #333;
    border-left: 0px;
    border-right: 0px;
  }
tr:hover {
    background-color: #01203D;
    color: #ffffff;
}
.thumbnail {
    cursor: pointer;
    transition: transform 0.2s;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.thumbnail:hover {
    transform: scale(1.05);
}
.thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
.thumbnail-caption {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}
/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.modal-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}
.modal-caption {
    color: white;
    margin-top: 10px;
    font-size: 1.1em;
}
.close-button {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}
.close-button:hover {
    color: #ddd;
}
#timer {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}
.figure-controls {
    text-align: center;
    margin-bottom: 10px;
}
.nav-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 5px 10px;
    cursor: pointer;
}
.nav-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.nav-button:hover:not(:disabled) {
    background-color: #e0e0e0;
}
.image-counter {
    margin: 0 10px;
    font-size: 0.9em;
}
#typeIImageContainer {
    text-align: center;
}
.section-title {
    font-size: 1.5em;
    color: #333;
    margin: 5px auto 5px auto;
    border-bottom: 1px solid #eee;
    padding-bottom: 2px;
}
.section-title-ii {
    font-size: 1.5em;
    color:  #333;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
    text-align: right;
    margin: 15px 15px 15px 15px;
}
.app-title {
    text-align: center;
    color: #d7d8df;
    font-size: 2.5em;
    margin-bottom: 10px;
}
input[type="file"]::file-selector-button {
    border-radius: 4px;
    padding: 8px 16px;
    border: 1px solid #1673c8;
    background-color: #1673c8;
    color: white;
    transition: background-color 0.2s;
    cursor: pointer;
}
input[type="file"]::file-selector-button:hover {
    background-color: #105392;
    border-color: #105392;
}

.file-name-display,
.file-upload-btn {
    display: inline-block;
    vertical-align: middle;
}
.file-name-display {
    margin-left: 10px;
    background-color: #f0f0f0;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}
input[type="file"] {
    /* Hiding the original input but making it accessible */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.file-name-display {
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-style: italic;
    color: #6c757d;
}
.file-upload-btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    background-color: #1673c8;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.file-upload-btn:hover {
    color: #fff;
    background-color: #105392;
    border-color: #0e4b85;
}
input[type="file"]:focus + .file-upload-btn {
    box-shadow: 0 0 0 0.2rem rgba(52, 143, 226, 0.5);
}


#results-i-content,#results-ii-content{
    width: 100%;
}

#typeISection,
#typeIISection {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

#typeISection > #summaryTableContainer,
#typeIISection > #summaryTableContainerII {
    width: 100%;
}

#typeISection > .section-title,
#typeIISection > .section-title {
    width: 100%;
}

#interactivePlotContainer,
#interactivePlotContainerII {
    flex: 1;
    background-color: #fff;
    margin-top: 10px;
    /*padding: 0 1.5vw;*/
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 500px;
    max-height: 600px;
    border-radius: 12px;
    overflow: hidden;
}

#interactivePlotContainer h3,
#interactivePlotContainerII h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
}

/* New styles for the horizontal layout of carousel and interactive plot */

.carousel-and-plot-container {
    display: flex;
    flex-direction: row;
    margin: 1% auto;
    padding: 1vw;
    width: 90%;
    max-width: 1200px;
    height: auto;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.carousel-and-plot-container > #typeICarousel,
.carousel-and-plot-container > #typeIICarousel {
    flex: 2;
}

/* Responsive para ambas secciones de resultados */
@media (max-width: 1200px) {
    .carousel-and-plot-container {
        margin: 1% 1% 1% 1%;
        padding: 0.5vw;
    }
    
    #interactivePlotContainer,
    #interactivePlotContainerII {
        padding: 0 1vw;
    }
    
    #interactive-plot-placeholder,
    #interactive-plot-placeholder-ii {
        min-height: 350px;
    }
}

@media (max-width: 992px) {
    .carousel-and-plot-container {
        flex-direction: column;
        height: auto;
        gap: 15px;
        margin: 1% 0;
        padding: 10px;
    }
    
    .carousel-container,
    #interactivePlotContainer,
    #interactivePlotContainerII {
        flex: none;
        width: 100%;
        max-width: 100%;
    }
    
    #interactivePlotContainer,
    #interactivePlotContainerII {
        padding: 0 10px;
    }
    
    #interactive-plot-placeholder,
    #interactive-plot-placeholder-ii {
        min-height: 300px;
        height: 50vh;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .carousel-and-plot-container {
        flex-direction: column;
        margin: 0;
        padding: 5px;
        gap: 10px;
    }
    
    #interactivePlotContainer,
    #interactivePlotContainerII {
        padding: 0 5px;
    }
    
    #interactivePlotContainer h3,
    #interactivePlotContainerII h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    #interactive-plot-placeholder,
    #interactive-plot-placeholder-ii {
        min-height: 280px;
        height: 45vh;
        max-height: 400px;
    }
    
    .plotly-loaded .main-svg {
        margin: 0 !important;
    }
    
    .js-plotly-plot .plotly .modebar {
        left: 0 !important;
        top: 0 !important;
    }
}

@media (max-width: 576px) {
    #interactive-plot-placeholder,
    #interactive-plot-placeholder-ii {
        min-height: 250px;
        height: 40vh;
        max-height: 350px;
    }
    
    #interactivePlotContainer h3,
    #interactivePlotContainerII h3 {
        font-size: 1rem;
    }
    
    .js-plotly-plot .plotly .gtitle {
        font-size: 14px !important;
    }
    
    .js-plotly-plot .plotly .xtick text,
    .js-plotly-plot .plotly .ytick text {
        font-size: 10px !important;
    }
}


.interactive-plot-container {
    flex: 1;
    background-color: #fafafa00;
    margin-top: 20px;
    /*padding: 0 1.5vw;*/
    width: 100%;
    max-width: 100%;
    /* Asegurar que el contenedor padre también sea responsive */
    min-width: 0; /* Permite que flex shrink funcione correctamente */
    height: 500px;
    max-height: 500px;
    overflow: hidden;
     
}

.interactive-plot-container h3 {
    margin-top: 20px!important;
    color: #333;
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
}

/* Asegurar que ambos placeholders de plot tengan el mismo estilo */
#interactive-plot-placeholder,
#interactive-plot-placeholder-ii {
    width: 100%;
    height: 400px !important;
    max-height: 400px !important;
    min-height: 300px;
    overflow: hidden;
    background-color: #f0f0f000;
    display: flex;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Cuando los plots están cargados - ambos deben comportarse igual */
#interactive-plot-placeholder.plotly-loaded,
#interactive-plot-placeholder-ii.plotly-loaded {
    background-color: transparent;
    border: none;
    padding: 0;
    display: block;
    width: 100% !important;
    height: auto !important;
}

 
.analysis-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin-top: 15px; 
    background-color: #f0f0f0;
    border-radius: 5px;
}

#timer {
    font-weight: bold;
    color: #333;
}

#stopButton {
    background-color: #d9534f; /* A standard red for stop/danger */
    color: white;
    margin-top: 15px;
    border: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    border-width: 2px;
    font-size: 1.7em;
    cursor: pointer;
    height: auto;
    width: auto; /* Prevents it from taking full width like other buttons */
}

#stopButton:hover {
    opacity: 0.6;
    color: white;
} 
.logos {
    background-color: white;
    height: 3vh;
    position: fixed; /* Does not move with scrolling */
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    z-index: 1000;
}
.logos_container {
    display: flex;
    align-items: center;
}
.text_logos {
    position: absolute;
    right: 2%;
    top: 50%;
    transform: translateY(-50%);
}
.annotations_logos {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}
.logo_CIQUS {
    height: 3vh;
    width: auto;
    margin: 0px 3px 0px 5px;
}
.logo_USC{
    height: 3vh;
    width: auto;
}
.logo_surffitter_short {
    height: 3vh;
    width: auto;
}
.tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
    margin: 0px 0px 0px 0px;
}
.tab-button {
    background-color: rgba(255, 255, 255, 0);
    padding: 10px 10px;
    cursor: pointer;
    background: none;
    border: 0px solid transparent;
    border-radius: 5px;
    font-size: bold;
    font-weight: 500;
    color: #333;
    border-radius: 0px;
    /*box-shadow: 0 2px 4px rgba(0,0,0,0);*/
    margin: 5px;
}
.tab-button.active {
    background-color: rgba(255, 255, 255, 1);
    color: #333;
    font-weight: bold;
    /*border-bottom-color: #01203D;*/
    margin: 0px 0px 0px 0px;
}
.tab-content {
    display: none;
    opacity: 0; /* Start fully transparent */
    transition: opacity 0.4s ease-in-out; /* Animate the opacity over 0.4 seconds */
}
.tab-content.active {
    display: block;
    opacity: 1; /* Become fully visible */
}
@media (max-width: 768px) {
    /* --- You would already have rules here for stacking containers --- */

    /* Suggestion 1: Make the logo smaller on mobile to save vertical space */
    .title-panel, .logo {
        height: 100px; /* Reduce from 23vh */
    }
    .intro-text {
        padding-top: 10px; /* Adjust padding to match new height */
    }

    /* Suggestion 2: Make tap targets larger and more readable on mobile */
    .about-button-class {
        font-size: 1.2rem; /* Control the clamped size if needed */
        width: 80%; /* Make buttons wider for easier tapping */
        text-align: center;
    }
}

/* Add this new style for the link-like button */
.link-button {
    background: none;
    border: none;
    box-shadow: none;
    color: #01203D; /* Use your theme's primary blue color */
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit; /* Make it the same size as the surrounding text */
    font-weight: bold;
}
.link-button:hover {
    color: #024b90;
}
#type-ii-prompt {
    margin-left: 0px;
    margin-right: auto;
}
.carousel-container {
    flex: 1;
    position: relative;
    height: 700px;
    min-height: 300px;
    max-height: 700px;
    width: 100%;
    margin: 0;  
    background: #fff;
    border-radius: 12px;            /* More rounded corners */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);  /* Professional shadow */
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);  /* Subtle border */
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;              /* Let height adjust to content */
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    margin-top: 5%;
    padding-bottom: 20px;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);  /* Smooth easing */
    transform: translateX(20px);    /* Slide in effect */
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0);       /* Slide to position */
}

.carousel-slide img {
    width: 90%;
    height: 90%;                   /* Fill the container */
    object-fit: contain;            /* Keep aspect ratio, fit entire image */
    object-position: center;        /* Center the image */
    transition: transform 0.3s ease;
}
.carousel-btn {
    position: absolute;
    top: 95%;
    width: 40px;                    /* Fixed size for consistency */
    height: 40px;                   /* Square buttons */
    transform: translateY(-50%);
    background: rgba(64, 64, 64, 0.05);  
    color: #333;                    /* Dark text for contrast */
    border: 2px solid rgba(0, 0, 0, 0.1);  /* Subtle border */
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;             /* Circular buttons */
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);  /* Professional shadow */
    backdrop-filter: blur(5px);     /* Modern glass effect */
}

.carousel-btn:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.40);
}

.carousel-btn.prev {
    left: 5px;                     /* Positioned over the image */
}

.carousel-btn.next {
    right: 5px;                    /* Positioned over the image */
}

.carousel-indicators {
    position: absolute;
    bottom: 3px;                   /* Position over the image */
    left: 50%;
    /*transform: translateX(-50%);*/
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);  /* Background for visibility */
    /*padding: 8px 12px;*/
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.carousel-indicator.active {
    background: #01203D;
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.8);
}

.carousel-indicator:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.carousel-indicator.active {
    background: #01203D; /* Your theme color */
}

.carousel-caption {
    position: absolute;
    top: 0; /* located at top */
    left: 0;
    right: 0;
    text-align: center;
    padding: 12px 15px;
    /*background: rgb(255, 255, 255, 0.2);*/
    color: #333!important;                   /* White text over dark gradient */
    font-size: 1.4rem;
    font-style: italic;
    z-index: 5;
    /*backdrop-filter: blur(3px);*/
}

/* Sample data button - matches existing file upload button style */
.sample-data-btn {
    margin-left: 10px; /* Space between buttons */
}

/* Sample data modal styles */
.sample-modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    background: white;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
}

.sample-options {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.sample-option {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.sample-option h4 {
    margin: 0 0 10px 0;
    color: #01203D;
    font-size: 1.2em;
}

.sample-option p {
    margin: 0 0 15px 0;
    color: #666;
    font-style: italic;
}

.sample-buttons {
    display: flex;
    gap: 10px;
}

.sample-action-btn {
    padding: 8px 16px;
    border: 1px solid #1673c8;
    background: white;
    color: #1673c8;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.sample-action-btn:hover {
    background: #f0f7ff;
}

.sample-action-btn.primary {
    background: #1673c8;
    color: white;
}

.sample-action-btn.primary:hover {
    background: #105392;
}

/* File preview modal styles */
.preview-modal-content {
    width: 80%;
    max-width: 800px;
    height: 80vh;  /* Set a specific height */
    max-height: 600px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;  /* Hide overflow on container */
}

.preview-container {
    height: calc(100% - 120px);  /* Account for header and buttons */
    overflow-y: auto;  /* Make it scrollable */
    padding: 20px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
}

.preview-container pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;  /* Allow wrapping long lines */
    word-wrap: break-word;
}

.preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

#previewContent {
    white-space: pre-wrap;
    tab-size: 4;
}

/* Specific styling for the file upload area only */
.file-upload-area {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between elements */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Override the file-upload-btn styling when inside file-upload-area */
.file-upload-area .file-upload-btn {
    width: auto; /* Let buttons fit their content */
    white-space: nowrap; /* Prevent text wrapping */
    padding: 0.375rem 0.75rem; /* Keep existing padding */
    margin-bottom: 0; /* Remove the margin-bottom */
    flex-shrink: 0; /* Don't shrink buttons */
}

/* Ensure the file name display doesn't shrink */
.file-upload-area .file-name-display {
    flex-shrink: 0;
    margin-left: 0; /* Remove any existing margin */
}


/* Asegurar que todos los elementos plotly sean responsive */
.js-plotly-plot,
.plotly,
.plotly div {
    width: 100% !important;
    max-width: 100% !important;
    height: 400px !important;
    max-height: 400px !important;

}

/* Navigation bar */
  .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 10px 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-container {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }
    
    .nav-logo {
        font-size: 1.5rem;
        font-weight: bold;
        color: #333;
        text-decoration: none;
    }
    
    .nav-links {
        display: flex;
        align-items: center;
        gap: 20px;
    }
    
    .nav-links a {
        color: #333;
        text-decoration: none;
        padding: 8px 16px;
        border-radius: 5px;
        transition: background 0.3s;
    }
    
    .nav-links a:hover {
        background: rgba(0, 123, 255, 0.1);
    }
    
    .nav-links .btn-primary {
        background: #007bff;
        color: white;
    }
    
    .nav-links .btn-primary:hover {
        background: #0056b3;
    }
    
    .user-menu {
        position: relative;
    }
    
    .user-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 5px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        min-width: 200px;
        display: none;
        z-index: 1001;
    }
    
    .user-dropdown.active {
        display: block;
    }
    
    .user-dropdown a {
        display: block;
        padding: 10px 15px;
        color: #333;
        text-decoration: none;
        border-bottom: 1px solid #eee;
    }
    
    .user-dropdown a:last-child {
        border-bottom: none;
    }
    
    .user-dropdown a:hover {
        background: #f8f9fa;
    }
    
    /* Ajustar el contenido principal para que no se superponga con el navbar */
    .title-panel {
        margin-top: 80px;
    }
    
    @media (max-width: 768px) {
        .nav-links {
            gap: 10px;
        }
        
        .nav-links a {
            padding: 6px 12px;
            font-size: 14px;
        }
    }