/* 
 * Nieuws (News) Section Styling
 * Matches the logo-based theme design
 */

/* Define logo colors directly to ensure they're available */
:root {
    /* Logo-based colors */
    --hdv-green: #4CAF50;       /* Green square with plant icon */
    --hdv-blue: #2196F3;        /* Blue square with computer icon */
    --hdv-orange: #FF9800;      /* Orange square with book icon */
    --hdv-red: #FF5722;         /* Red square with hammer icon */
    
    /* Supporting colors */
    --hdv-dark-green: #388E3C;
    --hdv-dark-blue: #1976D2;
    --hdv-dark-orange: #F57C00;
    --hdv-dark-red: #E64A19;
    
    /* Light variants */
    --hdv-light-green: #C8E6C9;
    --hdv-light-blue: #BBDEFB;
    --hdv-light-orange: #FFE0B2;
    --hdv-light-red: #FFCCBC;
    
    /* Neutral colors */
    --hdv-white: #FFFFFF;
    --hdv-light-gray: #F5F5F5;
    --hdv-gray: #9E9E9E;
    --hdv-dark-gray: #424242;
    --hdv-black: #212121;
}

/* Container styling */
.nieuws-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1.5rem;
}

/* Title styling */
.nieuws-container .section-title {
    color: #4CAF50; /* Direct green color from logo */
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.nieuws-container .section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #4CAF50, #2196F3); /* Direct logo colors */
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

/* Search and filter controls */
.nieuws-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

#zoekInput {
    flex: 1 1 220px;
    max-width: 340px;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    font-size: 1rem;
    background: white;
    color: #424242; /* Direct dark gray color */
    outline: none;
    transition: all 0.3s ease;
}

#zoekInput:focus {
    border-color: #2196F3; /* Direct blue color from logo */
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

#zoekInput::placeholder {
    color: #9E9E9E; /* Direct gray color */
}

#sortSelect {
    flex: 0 0 180px;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    font-size: 1rem;
    background: white;
    color: #424242; /* Direct dark gray color */
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

#sortSelect:focus {
    border-color: #2196F3; /* Direct blue color from logo */
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

/* No results message */
#geenResultaten {
    text-align: center;
    color: #FF5722; /* Direct red color from logo */
    font-size: 1.1rem;
    margin: 3rem auto;
    padding: 1.5rem;
    background: #fff5f5;
    border-radius: 8px;
    border: 1px solid #ffe0e0;
}

/* News grid layout */
.nieuws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* News card styling */
.nieuws-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #eaeaea;
    position: relative;
    overflow: hidden;
}

.nieuws-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #4CAF50, #2196F3); /* Direct logo colors */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nieuws-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.nieuws-card:hover::before {
    transform: scaleX(1);
}

.nieuws-card .datum {
    color: #2196F3; /* Direct blue color from logo */
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.nieuws-card .datum::before {
    content: '\f073'; /* Calendar icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 8px;
    font-size: 0.9rem;
}

.nieuws-card .titel {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #4CAF50; /* Direct green color from logo */
    line-height: 1.4;
}

.nieuws-card .intro {
    color: #424242; /* Direct dark gray color */
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.nieuws-card .leesmeer-btn {
    background: linear-gradient(to right, #4CAF50, #2196F3); /* Direct logo colors */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);
    align-self: flex-start;
    display: flex;
    align-items: center;
}

.nieuws-card .leesmeer-btn::after {
    content: '\f061'; /* Arrow right icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 8px;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.nieuws-card .leesmeer-btn:hover {
    background: linear-gradient(to right, #2196F3, #4CAF50); /* Direct logo colors reversed */
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.3);
}

.nieuws-card .leesmeer-btn:hover::after {
    transform: translateX(4px);
}

/* Modal styling */
.nieuws-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(5px);
}

.nieuws-modal.active {
    display: flex;
}

.nieuws-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    padding: 2.5rem 2rem;
    position: relative;
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 1;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.nieuws-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #9E9E9E; /* Direct gray color */
    cursor: pointer;
    transition: color 0.2s;
}

.nieuws-modal-close:hover {
    color: #FF5722; /* Direct red color from logo */
}

.nieuws-modal-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #F5F5F5; /* Direct light gray color */
    padding-bottom: 15px;
}

.nieuws-modal-title {
    color: #4CAF50; /* Direct green color from logo */
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.nieuws-modal-date {
    color: #2196F3; /* Direct blue color from logo */
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.nieuws-modal-date::before {
    content: '\f073'; /* Calendar icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 8px;
}

.nieuws-modal-body {
    color: #424242; /* Direct dark gray color */
    font-size: 1.05rem;
    line-height: 1.7;
}

.nieuws-modal-body p {
    margin-bottom: 1.2rem;
}

.nieuws-modal-body a {
    color: #2196F3; /* Direct blue color from logo */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nieuws-modal-body a:hover {
    color: #1976D2; /* Direct dark blue color */
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nieuws-grid {
        grid-template-columns: 1fr;
    }
    
    .nieuws-container {
        padding: 1rem;
    }
    
    .nieuws-container .section-title {
        font-size: 1.8rem;
    }
    
    .nieuws-modal-content {
        padding: 2rem 1.5rem;
        max-width: 95%;
    }
    
    .modal-titel {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nieuws-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    #zoekInput, #sortSelect {
        max-width: 100%;
    }
    
    .nieuws-container .section-title {
        font-size: 1.6rem;
    }
    
    .nieuws-card {
        padding: 1.2rem;
    }
    
    .nieuws-modal-content {
        padding: 1.5rem 1rem;
    }
}
