:root {
    --radius:10px;
    --rainbow:rainbow 4s infinite;

    --color-font: #e9c46a;
    --color-link: #885053;
    --color-item: #e76f51;
    --color-selected-item: #f4a261;
    --color-background-site: #264653;
}

html {
    font-family: Verdana, sans-serif;
	color: var(--color-font);
}

a {
    text-decoration: none;
    color: var(--color-font);
    animation: var(--rainbow);
    text-shadow: 1px 1px var(--color-link);
}

body {
    background-color: var(--color-background-site);
    margin: 0;
    min-height: 100vh;
    min-width: 360px;
}

main {
    margin: 0 auto;
    width: min(700px,85%);
}

/* HEADER STYLES */

header{
    margin: 15px auto 0;
    width: min(720px,90%);
} 

.principal {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    margin: 15px 5px 0px;
    padding: 10px;
    border-style: ridge;
    border-color: var(--color-item);
    border-bottom: none;
}

.principal-icon {
    width: 6em;
    border-radius: var(--radius);
}

.principal-info {
    text-align: center;
    display: grid;
    size: 100%;
}

.principal-title {
    font-weight: bold;
    font-size: larger;
}

.principal-text {
    font-size: small;
    font-style: italic;
    margin-bottom: 0px;
}

/* NAV STYLES */

nav {
    display: grid;
    text-align: center;
    gap: 1px;
    margin: 5px;
    margin-top: 0px;
    background-color: var(--color-selected-item);
    border-radius: var(--radius);
}

nav a:last-of-type {
    border-radius: 0 0 var(--radius) var(--radius);
}

nav a {
    padding: 0.3em 0em;
    background-color: var(--color-item);
    animation: none;
}

nav a:hover {
    background-color: var(--color-selected-item);
}

.actual-nav {
    background-color: var(--color-selected-item);
    animation: var(--rainbow);
}

/* ESTILOS PANTALLAS ANCHAS */

@media screen and (min-width:500px) {

    header {
        margin-top: 15px;
    }

    nav {
        display: flex;
        justify-content: space-around;
        border-radius: var(--radius);
        gap: 1px;
        margin: 0 5px;
    }
    nav a {
        flex: 1;
    }
    nav a:first-of-type {
        border-radius: 0 0 0 var(--radius);
    }
    nav a:last-of-type {
        border-radius: 0 0 var(--radius) 0;
    }
    nav a:only-of-type {
        border-radius: 0 0 var(--radius) var(--radius);
    }
}

/* ESTILOS RANDOM */

.center {
    text-align: center;
}

.justify-text {
    text-align: justify;
}

.highlight {
    animation: highlighting 2s ease;
}

.rainbow {
    animation: var(--rainbow);
}

/* KEYFRAMES */

@keyframes rainbow{
    0%{color: orange;}
    10%{color: purple;}
    20%{color: red;}
    30%{color: CadetBlue};
    40%{color: yellow;}
    50%{color: coral;}
    60%{color: green;}
    70%{color: cyan;}
    80%{color: DeepPink;}
    90%{color: DodgerBlue;}
    100%{color: orange;}
}

@keyframes highlighting {
    50%   { background-color: var(--color-link); }
    100% { background-color: transparent; }
}
