body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    max-width: 1200px;
    margin: 16px;
    background-color: #f9f4ef;
}

nav ul {
    padding: 0;
    margin: 0;
}

.btn {
    color: #fff;
    background-color: rgb(237, 112, 39);
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: 10px;
    display: inline-block;
}

h1 {
    font-size: 1rem;
    text-transform: uppercase;
}

header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffffd6;
    border-radius: 12px;
    padding: 1em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

nav li {
    padding: 0;
    list-style-type: none;
}

#top-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: static;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    gap: 10px;
}

#top-nav ul a {
    font-weight: 600;
    transition: background 0.2s, color 0.3s;
}

#top-nav ul li:nth-child(1) a {
    color: #E57373;
}

#top-nav ul li:nth-child(2) a {
    color: #64B5F6;
}

#top-nav ul li:nth-child(3) a {
    color: #81C784;
}

#top-nav ul li:nth-child(1) a:hover {
    background-color: #FDE0DC;
    color: #B71C1C;
}

#top-nav ul li:nth-child(2) a:hover {
    background-color: #E3F2FD;
    color: #0D47A1;
}

#top-nav ul li:nth-child(3) a:hover {
    background-color: #E8F5E9;
    color: #1B5E20;
}

#top-nav ul a {
    padding: 8px 12px;
    display: block;
    border-bottom: solid 1px #ddd;
    font-weight: 500;
    color: #333;
}

#top-nav ul a:hover {
    background-color: #f0f0f0;
}

#top-nav li {
    display: block;
    padding: 5px;
}

#top-nav form {
    margin-left: 1em;
    padding: 0;
    display: flex;
    align-items: center;
}

#top-nav form input[type="text"] {
    padding: 0.5em;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#top-nav form button {
    padding: 0.5em;
    margin-left: 0.5em;
    border-radius: 5px;
    background-color: rgb(237, 112, 39);
    color: white;
    border: none;
    cursor: pointer;
}

.dropdown ul {
    background-color: #000000;
    display: none;
}

li.dropdown ul {
    display: none;
}

li.dropdown:hover ul {
    display: block;
}

.dropdown {
    background-color: rgb(187, 209, 239);
    margin-bottom: 1em;
    border-radius: 10px;
}

.dropdown a {
    display: block;
    text-decoration: none;
    color: #fff;
    padding: 5px;
    background-color: rgb(107, 151, 213);
}

.dropdown ul {
    background-color: #fff;
}

h1 a {
    text-decoration: none;
    color: #000;
}

section h2 {
    font-size: 1rem;
    text-transform: uppercase;
}

article h3 {
    font-size: 1rem;
}

article {
    color: #000;
    margin-bottom: 3em;
}

.hero h3 {
    font-size: 1rem;
}

.hero {
    background: url("img/ggg.webp") no-repeat top;
    padding: 2em;
    color: white;
    margin-bottom: 2em;
    margin-top: 2em;
}

.hero p {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 1em;
}

article img {
    max-width: 100%;
}

.card {
    border: solid 1px #ffffff;
    border-radius: 10px;
    transition: box-shadow 1s, transform 2s;
    background-color: #d3d3d3; 
}

.card img {
    border-radius: 10px 10px 0 0;
}

.card:hover {
    background-color: rgb(255, 255, 255);
    box-shadow: 5px 10px 5px #b29999;
    transform: rotate(1deg);
}


.card-body {
    padding: 1em;
}

.card h3 {
    font-size: 1em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.card h2 {
    font-size: 1.5em;
}

.card h4 {
    margin: 0;
    font-weight: normal;
    font-size: 1em;
}

.responsive-img {
    width: 100%;
}

.no-underline {
    text-decoration: none;
}

.c-black {
    color: black;
}

@media (min-width: 768px) {
    #top-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
    }

    #top-nav ul {
        display: flex;
        align-items: center;
    }

    #top-nav li {
        margin: 0 1em;
    }

    #top-nav ul a {
        display: block;
        padding: 1em;
        border-bottom: none;
    }

    #top-nav ul li {
        border: none;
    }

    .hero {
        padding: 4em 2em;
    }

    .programs-menu {
        position: relative;
        display: flex;
        justify-content: space-between;
    }

    .dropdown {
        width: 32%;
    }

    .dropdown:hover {
        border-radius: 10px 10px 0 0;
    }

    .dropdown ul {
        position: absolute;
        width: 32%;
    }

    .home main {
        display: grid;
        grid-template-columns: minmax(500px, 1fr) 300px;
        grid-gap: 2em;
    }

    .programs-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        grid-gap: 1em;
    }

    .card {
        height: 100%;
    }
}

@media (max-width: 767px) {
    #top-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        background-color: #ffffff;
        border-radius: 8px;
        padding: 0.5em;
        margin-top: 0.5em;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    #top-nav ul {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    #top-nav li {
        padding: 0.4em 0;
        border-bottom: 1px solid #eee;
        text-align: left;
    }

    #top-nav ul a {
        color: #333;
        display: block;
        text-decoration: none;
        font-size: 0.95em;
        padding: 0.4em;
        border-radius: 6px;
        transition: background 0.2s;
    }

    #top-nav ul a:hover {
        background-color: #f5f5f5;
    }

    #top-nav form {
        width: 100%;
        margin-top: 0.5em;
    }

    .programs-menu {
        display: block;
        width: 100%;
    }

    .dropdown {
        width: 100%;
        margin-bottom: 1em;
    }

    .dropdown ul {
        width: 100%;
        position: static;
    }

    .dropdown a {
        font-size: 1em;
    }
}


body.programs main {
  position: relative;
}

body.programs .events {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px; 
  box-sizing: border-box;
  padding-left: 20px;
}

body.programs .news {
  margin-right: 320px; 
}
