@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: lightgray;
    color: #333;
    padding: 20px;
}

header {
    background-color: #c62828;
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.logo-container-left {
    position: absolute;
    top: 27px;
    left: 50px;
}
.logo-container-right {
    position: absolute;
    top: 27px;
    right: 50px;
}

.logo-container-left img,
.logo-container-right img {
    height: 100px;
    width: auto;
}

header h1 {
    font-size: 2.7rem;
    color: #000;
    letter-spacing: 1px;
}

header p {
    font-size: 1.2rem;
    color: #fff;
    margin-top: 5px;
}

main {
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.main-nav {
    background-color: #b71c1c;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 20px;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.main-nav a {
    position: relative;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #ef5350;
    transition: 0.3s ease;
    transform: translateX(-50%);
}

.main-nav a:hover {
    color: black;
}

.main-nav a:hover::after {
    width: 100%;
}

.info {
    color: #c62828;
    font-weight: bold;
    background-color: #ffebee;
    padding: 1rem;
    border-left: 5px solid #ef5350;
    border-radius: 5px;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

th {
    background-color: #ef5350;
    color: white;
    text-transform: uppercase;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    font-size: 0.95rem;
}

td {
    background-color: #f9f9f9;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #eee;
    border-radius: 5px;
    font-size: 0.95rem;
}

td:first-child, td:nth-child(2) {
    font-weight: bold;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: #888;
    font-size: 0.9rem;
}

.marquee {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    background-color: #f5f5f5;
    padding: 10px 0;
}

.marquee-track {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 20s linear infinite;
}

.marquee-track span {
    display: inline-block;
    margin-right: 100px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #c62828;
}

@keyframes scroll-left {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.carousel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 40px;
}

.carousel {
    width: 25%;
    max-width: 220px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    height: 300px;
    position: relative;
}

.carousel img {
    width: 100%;
    height: auto;
    display: block;
    animation: scrollImages 12s linear infinite;
}

.left-carousel img {
    animation-direction: normal;
}

.right-carousel img {
    animation-direction: reverse;
}

@keyframes scrollImages {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

.modern-carousel-wrapper {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

.modern-carousel {
    position: relative;
    width: 240px;
    height: 320px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modern-carousel img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.modern-carousel img.active {
    opacity: 1;
}

a {
    color: #c62828;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
}

a:hover {
    color: #ef5350;
    border-bottom: 2px solid #ef5350;
}

/* ------------------------- */
/* ----- Responsive CSS ---- */
/* ------------------------- */
@media screen and (max-width: 768px) {
    .logo-container-left,
    .logo-container-right {
        position: static;
        display: inline-block;
        margin: 10px;
    }

    .logo-container-left img,
    .logo-container-right img {
        height: 60px;
    }

    header {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    header h1 {
        font-size: 2rem;
        margin-top: 10px;
        background-color: rgba(255, 255, 255, 0.7);
        padding: 10px;
        border-radius: 10px;
        display: inline-block;
    }

    header p {
        font-size: 1rem;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .main-nav a {
        font-size: 1rem;
    }

    main {
        padding: 1rem;
        margin: 20px auto;
    }

    .carousel-container {
        flex-direction: column;
        align-items: center;
    }

    .carousel {
        width: 80%;
    }

    .modern-carousel-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .modern-carousel {
        width: 80%;
        height: 250px;
    }
}

/* ------- TABLE RESPONSIVE ------- */
@media screen and (max-width: 600px) {
    table thead {
        display: none;
    }

    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }

    table tr {
        margin-bottom: 20px;
        background-color: #fff;
        border: 1px solid #ccc;
        border-radius: 10px;
        padding: 10px;
    }

    table td {
        text-align: left;
        padding: 10px;
        border: none;
        position: relative;
    }

    table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #c62828;
        display: block;
        margin-bottom: 5px;
    }
}
