@import url('https://fonts.googleapis.com/css2?family=Platypi:ital,wght@0,300..800;1,300..800&family=Quattrocento:wght@400;700&family=Raleway:ital,wght@0,100..900;1,100..900&family=Roboto:wght@100;300;400;500;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Raleway', sans-serif;
}

::-webkit-scrollbar {
    width: 0.3em;
    background-color: transparent;
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 100, 0.8);
    border-radius: 8px;
}

::-webkit-scrollbar-corner,
::-webkit-scrollbar-thumb:window-inactive {
    background: rgba(100, 100, 100, 0.4);
}

body {
    h1 {
        font-family: 'Platypi', sans-serif;
    }
}

header {
    width: 100%;
    padding: 15px;
    top: 0;
    z-index: 100;
    background-color: #fff;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* CSS for menu button */
.hamburger {
    cursor: pointer;
    width: 225px;
    display: none;
}
  
.hamburger input {
display: none;
}

.hamburger svg {
height: 3em;
transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line {
fill: none;
stroke: black;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 3;
transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
            stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line-top-bottom {
stroke-dasharray: 12 63;
}

.hamburger input:checked + svg {
transform: rotate(-45deg);
}

.hamburger input:checked + svg .line-top-bottom {
stroke-dasharray: 20 300;
stroke-dashoffset: -32.42;
}

.logo{
    width: 300px;
    height: 150px;
    background: url(assets/logo.png) no-repeat center center/cover;
}

ul {
    display: flex;
    justify-content: center;
    align-items: center;
}

ul li {
    font-size: 0.85rem;
    margin: 0 10px;
    list-style: none;
    .active {
        color: #f0f0f0;
        background-color: #1a1a1a;
        padding: 5px 15px;
        border-radius: 30px;
    }
    a {
        color: #676767;
        text-decoration: none;
    }
    .active:hover {
        color: #f0f0f0;
    }
    a:hover {
        color: #1a1a1a;
    }
}

.search {
    background-color: #eef0f2;
    display: flex;
    align-items: center;
    /* width: 225px; */
    padding: 2px 10px;
    border-radius: 20px;
    input {
        padding: 5px;
        border: none;
        background-color: transparent;
    }
    input:focus {
        outline: none;
    }
    button {
        background-color: transparent;
        border: none;
        display: flex;
        font-size: 1.2rem;
        text-align: center;
    }
}

.divider {
    .px3 {
        height: 3px;
        background-color: #1a1a1a;
        margin-bottom: 5px;
    }
    .px2 {
        height: 2px;
        background-color: #1a1a1afb;
    }
}

.hero-content {
    height: 70%;
}

.heading {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 30px;
    font-family: 'platypi', sans-serif;
    h1 {
        font-size: 3rem;
    }
    h4 {
        font-family: 'platypi', sans-serif;
    }
    span {
        font-size: 0.85rem;
        color: #676767;
    }
    .weather {
        width: 150px;
    }
}
.main-news {
    margin-top: 10px;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    max-height: 700px;
    position: relative;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    z-index: -1;
}

.main-content {
    position: absolute;
    bottom: 20px;
    width: 100%;
    color: white;
    text-align: left;
    padding: 20px;
    z-index: 1;
    
    #main-headline {
        text-align: center;
        margin: 20px;
        margin-top: 50px;
        font-size: 2.5rem;
        font-family: 'Quattrocento', sans-serif;
    }

    #main-description {
        font-size: 1.3rem;
        font-weight: 500;
        margin: 10px;
        color: #dbdbdb;
        /* CSS properties to limit description to 2-3 lines */
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Number of lines to show */
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    #by-line {
        margin: 0px 10px;
        color: #dbdbdb;
    }
    .read-more{
        font-size: 1.2rem;
    }
    .read-more>a:hover {
        color: #eaeaea;
    }
}

.main-news::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 1));
    z-index: 0;
}

/* CSS for News Ticker */
.news-ticker {
    margin-top: 10px;
    overflow: hidden;
    background: rgba(155, 0, 0, 0.801);
    padding: 10px;
    border-radius: 5px;
}

.ticker-wrap {
    display: flex;
    animation: ticker 20s linear infinite;
}

.ticker-move {
    display: flex;
    white-space: nowrap;
}

.ticker-item {
    display: inline-block;
    padding: 0 20px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* CSS for News Articles */
.trending {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #f8f8f8;
    .news-label {
        align-self: center;
        position: absolute;
        top: -19px;
        padding: 0px 40px;
        background-color: #f8f8f8;
    }
}

.container {
    margin-top: 70px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    width: 28%;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    margin: 10px;
    padding: 10px;
    color: #1a1a1a;
    box-shadow: 5px 5px 15px #1a1a1a1a;
    background-color: #fff;
    height: 600px;
}

.news-image {
    width: 100%;
    height: 40%;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.news-content {
    flex-grow: 1;
    overflow: hidden;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-content h1 {
    font-size: 1.45rem;
    padding: 0px 15px;
    margin-bottom: 10px;
    white-space: wrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-content p {
    font-size: 1rem;
    color: #676767;
    padding: 0px 15px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: flex;
    justify-content: space-around;
    padding: 0px 15px;
    align-items: center;
    margin-top: 15px;
    hr {
        width: 75%;
    }
    a {
        color: #676767;
        padding: 0px 0px 0px 5px;
        text-decoration: none;
        font-weight: 700;
    }
    a:hover {
        color: #1a1a1a;
    }
}

#load-more {
    width: 200px;
    padding: 10px 15px;
    background-color: #2d2d2d;
    color: #efefef;
    margin: 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    border: 3px solid #2d2d2d;
    transition: all 0.3s ease-in-out;
}

#load-more:hover {
    background-color: #1a1a1a;
    color: #f0f0f0;
    box-shadow: 2px 2px 10px #1a1a1a62;
}

footer {
    background-color: #1a1a1a;
    height: auto;
    width: 100%;
    padding: 20px 0;
}

.team {
    display: flex;
    justify-content: space-evenly; /* Evenly distribute team members */
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 20px; /* Space between team members */
    max-width: 1200px; /* Limit width for larger screens */
    margin: 0 auto; /* Center the team container */
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 150px; /* Ensure enough space for names */
}

.team-member h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Raleway', sans-serif;
}

.team-member a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem; /* Size of LinkedIn icon */
}

.team-member a:hover {
    color: #0077b5; /* LinkedIn blue on hover */
}

/* responsive */
@media screen and (max-width: 1024px) {
    .heading h1 {
        font-size: 2.5rem;
    }
    #date{
        font-size: 0.9rem;
        span{
            font-size: 0.8rem;
        }
    }
    .main-news {
        height: 55vh;
        min-height: 500px;
        max-height: 650px;
    }
    .main-content #main-headline {
        font-size: 2rem;
    }
    .main-content #main-description {
        font-size: 1.2rem;
    }
    .card {
        width: 45%;
        min-width: 300px;
        height: 500px;
    }
    .news-content h1 {
        font-size: 1.2rem;
    }
    .news-content p {
        font-size: 0.9rem;
    }
    .news-content .read-more {
        hr{
            width: 70%;
        }
        a{
            padding: 0px 0px 0px 2px;
        }
    }
    .search {
        width: auto;
        padding: 2px 5px;
        input {
            width: 120px;
            font-size: 0.7em;
        }
        button {
            font-size: 0.8rem;
            padding: 3px;
        }
    }
}

@media screen and (max-width: 768px) {
    .heading h1 {
        font-size: 2rem;
        position: absolute;
        top: 15px;
    }
    #date, .weather{
        display: none;
    }
    .main-news {
        height: 50vh;
        max-height: 600px;
    }
    .main-content #main-headline {
        font-size: 1.7rem;
    }
    .main-content #main-description {
        font-size: 1rem;
    }
    .main-content #by-line {
        font-size: 0.9rem;
    }
    .news-content h1 {
        font-size: 1rem;
    }
    .news-content p {
        font-size: 0.8rem;
    }
    .logo{
        display: none;
    }
    .hamburger {
        display: block;
        width: auto;
    }
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 10;
        padding: 10px 0;
        transition: all 1s ease-in-out;
    }
    nav ul.show {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }
    nav ul.hide {
        display: none;
        opacity: 0;
        transform: translateY(-20px);
    }
    nav ul li {
        margin: 10px 0;
        text-align: center;
    }
    
    .search {
        width: 40px; /* Initial small width */
        padding: 5px;
        background-color: transparent;
        transition: none; /* No transition initially */
    }

    .search input {
        width: 0;
        transition: width 0.3s ease;
    }

    .search.search-expanded {
        width: 100vw; /* Full width when expanded */
        height: 85px;
        background-color: #fff;
        padding: 5px 10px;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1000;
        animation: reveal 0.5s forwards; /* Smooth transition for full width */
    }

    .search.search-expanded input {
        width: calc(100% - 40px);
        font-size: 1rem;
        animation: reveal 0.5s forwards;
    }

    .search button {
        font-size: 1.5rem;
        margin-left: auto; /* Align button to the right */
    }

    @keyframes reveal {
        from {
          clip-path: inset(0 0 0 100%);
        }
        to {
          clip-path: inset(0 0 0 0);
        }
    }

    .card {
        width: 100%;
        height: auto; /* Allow height to adjust based on content */
        flex-direction: row; /* Change to row for small screens */
        min-width: unset; /* Remove min-width */
    }

    .news-image {
        width: 200px;
        height: 100%;
        flex-shrink: 0;
    }

    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .news-content {
        flex-grow: 1;
        overflow: hidden;
        margin-top: 0;
        padding: 10px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .news-content h1 {
        font-size: 1rem;
        padding: 0;
        margin-bottom: 5px;
    }

    .news-content p {
        font-size: 0.8rem;
        padding: 0;
        margin-bottom: 5px;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .read-more {
        margin-top: 5px;
        padding: 0;
        hr {
            width: 75%;
        }
        a {
            font-size: 0.8rem;
            padding: 0;
        }
    }
}


@media screen and (max-width: 480px) {
    .heading h1 {
        top: 20px;
        font-size: 1.5rem;
    }
    .headline h1 {
        font-size: 1.5rem;
    }
    .main-news {
        height: 40vh;
    }
    .main-content #main-headline {
        font-size: 1.5rem;
    }
    .main-content #main-description {
        font-size: 0.8rem;
    }
    .main-content #by-line {
        font-size: 0.7rem;
    }
    .card {
        width: 100%;
        height: auto;
    }
    .news-content h1 {
        font-size: 0.8rem;
    }
    .news-content p {
        font-size: 0.7rem;
    }
    .news-image{
        width: 120px;
    }
    .read-more a{
        font-size: 0.7rem;
    }
    .trending .news-label {
        font-size: 1.3rem;
        padding: 0px 20px;
        top: -10px;
    }
    .team {
        flex-direction: column; /* Stack team members vertically */
        gap: 15px; /* Reduce gap for mobile */
    }
    .team-member h3 {
        font-size: 1rem; /* Smaller font for names */
    }
    .team-member a {
        font-size: 1.5rem; /* Smaller LinkedIn icon */
    }
}
@media screen and (min-width: 1024px) {
    .team-member h3 {
        font-size: 1.4rem; /* Slightly larger names */
    }
    .team-member a {
        font-size: 2rem; /* Larger LinkedIn icons */
    }
}