
/* CSS issue update */


/* background */
body {
    background-color: #a6c2fc ;
    font-family: "Roboto", sans-serif;
    
}

h1{
    color: rgb(73, 97, 176);
    
}

h2{
    color: hsl(330, 44%, 58%);
}

h3{
    color: lightcoral;
}

nav a{
    color: lightseagreen;
    text-decoration: underline;
}



/*addign margin/ box model*/

section {
    margin: 20px; 
    padding: 20px; 
    border: 1px solid rgb(28, 30, 90);
    border-radius: 10px;
    
}

nav{
    /*longhand margin*/

    margin-top: 20px; 
    margin-bottom: 20px; 
    margin-left: 40px; 
    margin-right: 40px;

    /*longhand padding*/

    padding-top: 10px; 
    padding-bottom: 10px; 
    padding-left: 20px; 
    padding-right: 20px;
}

img {
    border-style: solid;
    border-width: 3px;
    border-color: darkblue;
    border-radius: 8px;
}

/* flexbox */

nav ul{
    display: flex; 
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap; 
}

/*grid */

fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    justify-items: center;
}

/* universal selector */
* {
    box-sizing: border-box;
}

/* selectro list */
h1, h2, h3{
    text-align: center;
}

/* id selector */
#attendance {
    background-color: lightsalmon;
}

/*attribute selector */
input[type="text"] {
    border: 2px solid lightblue;
    padding: 5px;
    border-radius: 5px;
}

/* display */
img {
    display: block;

}

button {
    display: inline-block;
}
/* sizing */
img{
    width: 200px;
    max-width: 100%;
    min-width: 200px;
    height: auto; 
}

video 
{
    width : 400px; 
    max-width: 100%;
    height: auto;
}

input[type="text"] {
    width: 200px;
    max-width: 100%;
    height: auto;
}


/* position */

nav{
    position: sticky; 
    top: 0;
}

footer{
    position: relative; 
}



/* Pseudo-classes */
a:hover {
    color: darkblue;
}

button:active {
    background-color: lightgray;
}

/*child combinator */
nav > ul {
    list-style-type: none;
    padding-left: 0;
}


/*adjacent sibling combinator */
hr + section {
    background-color: #f3b57c;
}



/*general sibling combinator */
hr ~ section {
    border-color: #b87b5a;
}

/* :has() selector*/

section:has(img) {
    background-color: #faa5f3;
}

/*.class selector */
.highlight {
    
    background-color: hsl(157, 29%, 56%);
}

/* fallback */
body{
    --favcolor: hsl(204, 75%, 30%);

}

.highlight {
    background-color: var(--favcolor, lightyellow);

}
 
/* combining selectors */

p.highlight {
    padding: 10px;
    border-radius: 5px;
}

/* nested selectors, has ERROR?? */
nav{
    a{
        font-size: 18px;
    }
}


/* media query */
@media (max-width: 600px) {
    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }
}


footer {
    background-color: #324574;
}

summary {
    color: color(display-p3 0.3 0.4 0.8);
}


nav {
    background-color: color-mix(in srgb, rgb(113, 177, 93) 70%, rgb(176, 64, 64) 30%);
}

/* fonts */
h1 {
    font-size: 2rem;
}

video {
    border-width: 2pt;
}

p {
    font-size: 1.1em;
}


section {
    max-width: 15cm;
}
