﻿body{
    overflow: auto;
    box-sizing: border-box;
    user-select: none;
}

p{
    text-align: left!important;
}

strong, em {
    display: inline !important;
}

#asmi-navbar{
    box-shadow: var(--asmi-dark-blue) 0 .4rem;
}

#practica-main-header {
    background-color: #fff;
    box-shadow: var(--asmi-darkest-blue) .8em .8em;
    border-radius: 1rem;
    min-width: 40vw;
    max-width:93vw;
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem 2.5rem 2rem;
    max-height: 35vh;
}

    #practica-main-header h1 {
        margin: 0 !important;
        color: #000;
        font-weight: 500;
        font-size: 3.4rem;
        text-align: center;
    }

@media (max-width: 1068px) {
    #practica-main-header {
        top: 20vh;
    }
}

@media (max-width: 768px) {
    #practica-main-header {
        top: 20vh;
    }
    #practica-main-header h1{
        font-size:4rem;
    }
}

#practica-info-header {
    background-color: #A0522D;
    box-shadow: var(--asmi-darkest-blue) 0.5em 0.5em;
    border-radius: 0.5rem;
    color: white;

    min-width: 180px; 
    padding: 1rem;
}

#practica-info-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

#practica-button-group {
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3em;
    top: 50%;
}

@media (max-width: 1068px) {
    #practica-button-group {
        top: 43vh; 
        flex-direction: column;
        gap: 2em;
        font-size:2rem;
    }
}

@media (max-width: 768px) {
    #practica-button-group {
        top: 43vh;
        gap: 2em;
        font-size:.8rem;
    }
}

#practica-viewmore {
    position: absolute;
    bottom: 15vh; 
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    box-shadow: var(--asmi-darkest-blue) .8em .8em;
    border-radius: 1rem;
    min-width: 20vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

@media (max-width: 1068px) {
    #practica-viewmore {
        top: 80vh;
        min-width: 80vw !important;
        height: 5vh;
        font-size: .7rem;
    }
}

@media (max-width: 768px) {
    #practica-viewmore {
        top: 80vh;
        min-width: 80vw!important;
        height:5vh;
        font-size:.5rem;
    }
}

#practica-viewmore,
#practica-info-header {
    background-color: #fff;
    box-shadow: var(--asmi-darkest-blue) .8em .8em;
    border-radius: 1rem;
    min-width: 20vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;

}

#practica-info-header h2 {
    font-size: 2em;
    color: #000;
    font-weight: 500;
    text-transform: uppercase;
    text-align: center;
    margin: 0 !important;
    transition: 1s ease-out;
    user-select: none;
}

#practica-button-group a{
    text-decoration: none !important;
}

#practica-viewmore:hover,
#practica-info-header:hover {
    cursor: pointer;
    background-color: var(--asmi-lightest-blue);
}

#practica-viewmore:hover span,
#practica-info-header:hover h2 {
    color: #fff;
    transform: scale(1.1);
    text-decoration: none !important;
    transition: .5s ease-in-out;
}

#practica-viewmore span {
    font-size: 1.5em;
    color: #000;
    font-weight: 500;
    text-transform: uppercase;
    text-align: center;
    margin: 0 !important;
    transition: 1s ease-out;
    user-select: none;
}

@media (max-width: 768px){
    
    #practica-info-header {
        min-width: 70vw;
    }
}

@keyframes sway {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(2deg); }
}

.modal {
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    background-color: rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items:center;
}

.modal-content {
    background-color: #e1e9f5;
    padding: 20px;
    border: 1px solid #888;
    max-width: 85vw;
    max-height: 80vh;
    overflow-y: auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    position: relative;
}

.hidden{
    display: none;
}

#modal-close {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    background: #ffaa33;
    border: none;
    cursor: pointer;
    color: #fff!important;
    padding: .5em;
    line-height: 1;
    border-radius: .25rem;
}

.moving-rects {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(180deg, #004aad, #4495f4);
    color: white;
    text-align: center;
}

.rect-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform: rotate(45deg);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rect {
    flex: none;
    height: 100%;
    background: linear-gradient(180deg, #004aad, #4495f4);
    opacity: 0;
    animation: slide 100s linear infinite;
}

@keyframes slide {
    0% {
        transform: translateX(50%) translateY(50%);
        opacity: 0;
    }

    10% {
        opacity: var(--start-opacity, 0.1);
    }

    50% {
        opacity: var(--start-opacity, 0.5);
    }

    90% {
        opacity: var(--start-opacity, 0.1);
    }

    100% {
        transform: translateX(200%) translateY(-50%);
        opacity: 0;
    }
}

.container h2{
    color: #fff;
    text-align:center;
    margin-bottom: 1em;
}

.firma-card{
    background-color: transparent;
    border-radius: 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    perspective: 1000px;
    cursor: pointer;
}

.firma-inner{
    background-color: #ffffffe6;
    border-radius: 5%;
    position:relative;
    width:100%;
    height:100%;
    text-align:center;
    transition: transform 0.8s ease-in-out;
    transform-style: preserve-3d;
    min-height:40vh;
    border: 2px solid rgba(255, 255, 255, 0.4); 
    box-shadow: 0 9px 6px rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 768px) {
    .firma-card:hover .firma-inner {
        transform: rotateY(180deg);
    }
}

.firma-inner.flipped {
    transform: rotateY(180deg);
}

.scaled{
    transform: scale(1.1);
}

.firma-front, .firma-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display:flex;
    justify-content:center;
    align-items:center;
    border-radius: 1em;
    padding: 1em;
    color: black;
}

.firma-front{
    min-width: 280px; 
    min-height: 250px;
}

.firma-front img {
    max-width: 90% !important;
    object-fit: contain;
}

.firma-front svg{
    position: absolute;
    bottom: 5%;
    right:5%;
    cursor:pointer;
}

.firma-back{
    transform: rotateY(180deg);
    display: block;
    text-align: justify;
    padding: 1.5em;
    font-size: 1.1rem;
    line-height: 1.4;
    overflow-y: auto;
}

.firma-back span {
    padding: 10px;
    position: absolute;
    top: 0;
    text-align: inherit;
    margin: 10px;
    overflow-y: auto;
}

.overflow{
    justify-content:flex-start;
    overflow-y: auto;
}

.firme-div{
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    grid-gap: 3em;
    max-width: 1600px;
    justify-content: center;
}

#practica-logo-fmi, #practica-logo-asmi{
    height: 5vw;
    max-height: 300px;
    min-height: 100px;
    object-fit: contain;
    margin: 0 auto;
}

#presentation-section{
    display: flex;
    flex-direction: row; 
    justify-content: center;
    align-items: center;
    gap: 4em;
    position: relative; 
    z-index: 1;
}

section[style*="min-height: 100vh"][style*="#4495f4"] {
    position: relative;
    z-index: 10;
    padding-top: 3em; 
}

section[style*="min-height: 100vh"][style*="#4495f4"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px; 
    
    background-color: #4495f4; 
    
    mask-image: linear-gradient(to bottom, rgba(0,0,0, 0.0), rgba(0,0,0, 1.0) 80%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0, 0.0), rgba(0,0,0, 1.0) 80%);
    
    margin-top: -100px; 
    z-index: 5; 
}

#presentation-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    
    background-color: #1a1054;
    
    mask-image: linear-gradient(to bottom, rgba(0,0,0, 0.0), rgba(0,0,0, 1.0) 80%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0, 0.0), rgba(0,0,0, 1.0) 80%);
    
    margin-top: -50px; 
    z-index: 5; 
}

section[style*="min-height: 100vh"][style*="#383535"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    
    background-color: #111140;
    
    mask-image: linear-gradient(to top, rgba(0,0,0, 0.0), rgba(0,0,0, 0) 80%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0, 0.0), rgba(0,0,0, 0) 80%);
    
    margin-top: -50px; 
    z-index: 5; 
}

section[style*="min-height: 100vh"][style*="#4495f4"] .container {
    z-index: 1;
    position: relative;
}

.ocean-section {
    position: absolute;
    top: 0;
    left: 0;
    width:100%;
    height: 100%;
    background: linear-gradient(to bottom, #4495f4 0%, #1a1054 100%);
    overflow: hidden;
    z-index:0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: 5%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: rise 20s linear infinite;
    z-index: 1;
}

.ocean-section {
    position: absolute;
    top: 0;
    left: 0;
    width:100%;
    height: 100%;
    background: linear-gradient(to bottom, #4495f4 0%, #1a1054 100%);
    overflow: hidden;
    z-index:0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: 5%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    opacity: 0.6;
    animation: rise 20s linear infinite;
    z-index: 1;
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    25% {
        transform: translateY(-25vh) translateX(5px) scale(1.05);
    }

    50% {
        transform: translateY(-40vh) translateX(-50px) scale(1.1);
        opacity: 0.8;
    }

    75% {
        transform: translateY(-80vh) translateX(40px) scale(1.15);
    }

    100% {
        transform: translateY(-90vh) translateX(-3px) scale(1.2);
        opacity: 0;
    }
}

.math-symbol {
    position: absolute;
    color: white;
    font-weight: bold;
    animation: float 10s ease-in-out infinite;
    user-select: none;
    white-space: nowrap;
    z-index: 1;
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px);
    }

    50% {
        transform: translateY(-50px) translateX(200px);
    }
    
    60%{
        opacity: 0.3;
    }

    100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0;
    }
}

section[style*="min-height: 100vh"][style*="#383535"] {
    position: relative;
    overflow: hidden;
    z-index: 0;
}

section[style*="min-height: 100vh"][style*="#383535"] .container{
    z-index:1;
    position:relative;
}

.computer-section {
    position: absolute;
    top: 0;
    left:0;
    height: 100%;
    width: 100%;
    background-color: #383535;
    overflow: hidden;
    font-family: monospace;
    color: #5087b1;
    font-size: 1.2rem;
    letter-spacing: 2px;
    z-index: 0;
}

.line {
    position: absolute;
    white-space: nowrap;
    left: -100%;
    opacity: 0.2;
    animation: scroll 30s linear infinite, flicker 1.5s infinite;
    z-index:1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
        opacity: 0;
    }

    10%{
        opacity: 0.3;
    }

    30% {
        opacity: 0.2;
    }

    70%{
        opacity: 0.3;
    }

    90% {
        opacity: 0.2;
    }

    100% {
        transform: translateX(200vw);
        opacity: 0;
    }
}

@keyframes flicker {
    0%, 100% {
        opacity: 0.8;
    }

    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.7;
    }
}

@media screen and (max-width: 768px) {
    .firma-card img {
        min-width: 70vw;
    }

    #presentation-section {
        flex-direction: column;
    }
    
    #practica-logo-fmi, #practica-logo-asmi{
        margin: 1em auto;
    }

    #practica-button-group {
        flex-direction: column;
    }

    #modal-close {
        width: 10vw;
        font-size: 2rem;
    }

    .firme-div {
        grid-template-columns: 1fr;
        grid-gap: 2em;
    }
}


@media screen and (max-width: 368px) {
    .modal h2{
        margin-top: 2em;
    }
}
