/* ============================================
   ADACE News Page Styles
   ============================================ */

/* News Hero Section */
.news-hero {
    background: linear-gradient(135deg, #13a89e 25%, #0174ba 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.news-hero h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    animation: fadeInDown 0.6s ease-out;
}

.news-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out;
}

/* News Grid Section */
.news-grid {
    padding: 60px 20px;
    background: #f8fafc;
    min-height: 400px;
}

/* News Card */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.news-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #e2e8f0;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.08);
}

.news-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-category {
    display: inline-block;
    background: linear-gradient(135deg, #13a89e 25%, #0174ba 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.3rem 0.85rem;
    border-radius: 15px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.news-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2d3748;
    margin: 0.75rem 0;
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-no-image {
    -webkit-line-clamp: 12 !important;
}

.news-date {
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.news-date::before {
    content: '\f017';
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    margin-right: 0.5rem;
}

/* News Detail Page */
.news-detail {
    padding: 60px 20px;
    background: white;
    min-height: 60vh;
    animation: fadeIn 0.5s ease-out;
}

.news-header {
    margin-bottom: 2rem;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.news-header .news-category {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-header .news-title {
    font-size: 2.5rem;
    margin: 1rem 0;
    color: #2d3748;
    line-height: 1.3;
}

.news-meta {
    color: #64748b;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.news-meta::before {
    content: '\f017';
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
}

.news-image {
    margin: 2rem auto;
    border-radius: 12px;
    overflow: hidden;
    max-height: 500px;
    max-width: 1000px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-content {
    max-width: 800px;
    margin: 3rem auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
}

.news-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.news-content p:first-child {
    font-size: 1.15rem;
    color: #1a202c;
}

.news-actions {
    margin-top: 3rem;
    text-align: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #13a89e 25%, #0174ba 100%);
    color: white;
    padding: 0.85rem 2.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: white;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #13a89e;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* No News State */
.no-news {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.no-news i {
    opacity: 0.5;
}

.no-news p {
    font-size: 1.2rem;
    margin: 1rem 0;
}

/* Error State */
.error-state {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-state i {
    opacity: 0.7;
}

.error-state h2 {
    color: #2d3748;
    margin: 1rem 0;
}

.error-state p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-hero {
        padding: 60px 20px;
    }

    .news-hero h1 {
        font-size: 2rem;
    }

    .news-hero p {
        font-size: 1rem;
    }

    .news-grid {
        padding: 40px 15px;
    }

    .news-card {
        margin-bottom: 1.5rem;
    }

    .news-card-image {
        height: 200px;
    }

    .news-header .news-title {
        font-size: 1.75rem;
    }

    .news-content {
        font-size: 1rem;
        padding: 0 15px;
    }

    .news-image {
        max-height: 300px;
        margin: 1.5rem 0;
    }

    .btn-back {
        padding: 0.75rem 2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .news-hero h1 {
        font-size: 1.75rem;
    }

    .news-card-content {
        padding: 1.25rem;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-header .news-title {
        font-size: 1.5rem;
    }

    .news-excerpt {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .news-hero,
    .news-actions,
    footer,
    nav {
        display: none;
    }

    .news-detail {
        padding: 0;
    }

    .news-content {
        max-width: 100%;
    }
}
