/* Latest Updates and Article Cards Styles */

/* Latest Updates Section - Centered section with white background and relative positioning */
.latest-updates {
    width: 100%;
    background: white;
    padding: 0 5% 10px 5%;
    max-width: 1400px;
    margin: 0 auto;
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
    top: -75px;
}

/* Updates Header - Flex layout for title and button with space between */
.updates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 5%;
}

/* Updates Header Title - Large, bold, uppercase title */
.updates-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #000;
    margin: 0;
    text-transform: uppercase;
}

/* View All Link - Black rounded button with uppercase text */
.view-all-link {
    background: black;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
}

.view-all-link:hover {
    background-color: #fff;
    color: #000;
    border: 2px solid #000;
}

/* Updates Grid - CSS Grid layout for update cards with 3 columns and gap */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(3, 570px);
    gap: 12px;
    justify-content: center;
    margin: 0 auto;
    padding: 0 5%;
}

/* Update Card - White card with shadow, rounded corners, and hover effects */
.update-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 420px;
}

/* Update Card Hover - Enhances shadow and lifts the card on hover */
.update-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-8px);
}

/* Update Card Image Hover - Scales the image on card hover */
.update-card:hover img {
    transform: scale(1.08);
}

/* Update Card Image - Full-width image with cover fit, transition, and initial zoom */
.update-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: all 0.3s ease;
    transform: scale(1.2);
}

/* Update Card Title - Bold title with margins and letter spacing */
.update-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin: 35px 15px 5px;
    letter-spacing: 0.5px;
}

/* Update Card Description - Smaller text with margins and line height (though not used in current HTML) */
.update-card p {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    margin: 0 15px 15px;
    line-height: 1.4;
}

/* Articles Section Styles */
.articles-section {
    width: 100%;
    background: white;
    padding: 20px 5% 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    top: -50px;
}

.articles-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 60px;
    padding: 0 0 0 5%;
    position: relative;
}

.articles-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #000;
    margin: 0;
    text-transform: uppercase;
    text-align: center;
}

.filter-section {
    position: absolute;
    right: -5%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.filter-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
}

.custom-dropdown {
    position: relative;
    width: 200px;
}

.selected {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected:hover {
    background: #f9f9f9;
    border-color: #999;
}

.selected::after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.3s ease;
}

.custom-dropdown.open .selected::after {
    transform: rotate(180deg);
}

.options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
}

.custom-dropdown.open .options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.options li {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.options li:hover {
    background: #f9f9f9;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 570px);
    gap: 30px;
    justify-content: center;
    margin: 0 auto;
    padding: 0 5%;
}

.article-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 420px;
}

.article-card:hover {
    box-shadow: 0 15px 40px rgba(255, 107, 0, 0.3);
    transform: translateY(-10px);
    border: 2px solid #ff6b00;
}

.article-card:hover img {
    transform: scale(1.15);
    opacity: 0.8;
}

.article-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: all 0.6s ease;
    transform: scale(1.2);
}

.article-card h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000;
    margin: 35px 15px 5px;
    letter-spacing: 0.5px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-card:hover h4 {
    color: #ff6b00;
}

.article-date {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #666666;
    margin: 0 15px 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-bubble {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 107, 0, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    font-family: 'Poppins', sans-serif;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.article-card:hover .category-bubble {
    opacity: 1;
    transform: translateY(0);
}

.article-date i {
    color: #ff6b00;
}
