* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Titillium Web', sans-serif;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container */
#fourclasses {
    background: linear-gradient(rgba(18, 35, 72, 0.5), rgba(18, 35, 72, 0.7)),
        url('../../res/img/backgrounds/cadet_banner_bg.png') no-repeat center center/cover;
    min-height: 80vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
    text-align: center;
    margin-top: -25px;
}

/* Title */
#four_title {
    margin-bottom: 30px;
    margin-top: -50px;
}

#four_t {
    font-family: 'Bree Serif', serif;
    font-size: 50px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
    letter-spacing: 3px;
    color: white;
}

/* Class Container */
#categ_classes {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 90%;
    max-width: 1200px;
}

/* Each Class Box */
.classcontainer {
    width: 22%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    text-align: center;
    color: white;
    transition: transform 0.3s ease-in-out;
    animation: fadeInUp 1s ease-out;
}

.classcontainer:hover {
    transform: translateY(-7px);
    box-shadow: 0px 10px 20px rgba(205, 168, 87, 0.8);
    cursor: pointer;
}

.classcontent {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 200px;
    padding: 15px;
}

/* Class Title Number */
.classt {
    font-size: 2.2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
}

/* Class Description */
.classcontent p {
    font-size: 14px;
    line-height: 1.2;
    font-weight: bold;
    text-align: justify;
    margin: 10px 0;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
}

/* Images */
.cadetclass {
    width: 100%;
    height: auto;
    border-radius: 2px;
    margin-top: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 35, 72, 0.8);
}

.modal-content {
    width: 70%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
    background-color: #fff;
    color: #122348;
    padding: 20px;
    border-radius: 8px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.modal-header {
    align-items: center;
    justify-content: center;
    text-align: center;
    display: flex;
    gap: 10px;
    position: relative;
    margin-top: -60px;
}

.modal-header img {
    width: 60px;
    height: auto;
    object-fit: contain;
}

.modal-header h2 {
    margin: 0;
    font-size: 30px;
}

.modal-content h2 {
    color: #122348;
}

.modal_p {
    padding-top: 50px;
    display: grid;
    grid-template-columns: 50% 50%;
    align-items: center;
    gap: 20px;
}

.modal_p img {
    width: 450px;
    height: auto;
}

.modal_p p {
    margin-right: 20px;
    flex: 1;
    text-align: justify;
}

.modal-content p {
    color: #122348;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #122348;
    font-weight: bold;
    z-index: 1;
}

@media screen and (max-width: 1300px) {

    /* Modal */
    .modal-content {
        width: 90%;
        display: block;
        min-height: 630px;
        background-color: #fff;
        color: #122348;
        padding: 20px;
        border-radius: 8px;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .modal-header {
        margin-top: 0px;
        margin: 0 auto;
    }

    .modal-header img {
        width: 50px;
        height: auto;
        object-fit: contain;
    }

    .modal-header h2 {
        margin: 0;
        font-size: 1.8rem;
    }

    .modal-content h2 {
        color: #122348;
    }

    .modal_p {
        padding-top: 5px;
        display: block;
        align-items: center;
    }

    .modal_p img {
        width: 450px;
    }

    .modal_p p {
        margin-right: 0px;
    }
}

@media screen and (max-width: 992px) {
    #fourclasses {
        margin-top: -35px;
    }

    #categ_classes {
        flex-direction: column;
        align-items: center;
    }

    .classcontainer {
        width: 80%;
    }

    #four_title {
        margin-bottom: 30px;
        margin-top: 0px;
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 768px) {

    /* Modal */
    .modal-header h2 {
        font-size: 1.4rem;
    }

    .modal_p img {
        width: 280px;
    }

        #four_title {
        margin-bottom: 30px;
        margin-top: 0px;
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {

    /* Container */
    #fourclasses {
        margin-top: -23px;
    }

    .classcontainer {
        width: 100%;
    }

    .classcontent p {
        font-size: 15px;
    }

    /* Modal */
    .modal-header img {
        width: 30px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal_p img {
        width: 200px;
    }
}

.impact-section {
    padding: 60px 20px;
    background: #f9f9f9;
    color: #122348;
    text-align: center;
}

.impact-header h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.impact-header .intro {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    color: #444;
}

.impact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.impact-card {
    background: rgba(18, 35, 72, 0.9);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.impact-card:hover {
    transform: translateY(-5px);
}

.impact-card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.impact-card ul {
    margin-top: 10px;
    padding-left: 20px;
    font-size: 0.95rem;
}

.impact-footer {
    margin-top: 40px;
    font-size: 1.1rem;
    color: #333;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Title Container */
#four_title {
    background-color: #122348;
    border-radius: 5px;
    width: 85%;
    margin: 30px auto;
    padding: 25px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    animation: fadeSlideIn 1s ease-out forwards;
    opacity: 0;
}

/* Inner wrapper styling */
#four_title .strat-head {
    width: 100%;
    color: white;
}

/* Main Title */
#four_title .strat-head h1 {
    font-size: 50px;
    font-family: 'Bree Serif', serif;
    letter-spacing: 5px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

/* Subtitle */
#four_title .strat-head p:first-of-type {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #e0e6f2;
}

/* Divider line */
#four_title .strat-head hr {
    width: 60%;
    border: 1px solid #cda757;
    margin: 15px auto 25px auto;
}

/* Body text */
#four_title .strat-head p:last-of-type {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #d9e1ef;
}

/* Animation */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
