/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,100 1000,0"/></svg>');
    background-size: cover;
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #2563eb;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.about-features {
    list-style: none;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #374151;
}

.about-features i {
    color: #059669;
    font-size: 1.2rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #6b7280;
}

/* Courses Section */
.courses {
    padding: 6rem 0;
    background: white;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.course-image {
    height: 200px;
    overflow: hidden;
}

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

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-content {
    padding: 1.5rem;
}

.course-content h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.course-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.course-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-duration {
    color: #6b7280;
    font-size: 0.9rem;
}

.course-duration i {
    margin-right: 0.5rem;
}

.course-price {
    color: #2563eb;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: #f8fafc;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 1.3rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.contact-text p {
    color: #6b7280;
    line-height: 1.6;
}

/* Contact Phone Grid */
.contact-phone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-phone-item {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-phone-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

.contact-phone-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.contact-phone-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.contact-phone-info {
    flex: 1;
}

.contact-phone-info h5 {
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.branch-name {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.contact-phone-number {
    flex-shrink: 0;
    text-align: right;
}

.contact-phone-number a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.contact-phone-number a:hover {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}





/* Responsive Contact */
@media (max-width: 768px) {
    .contact-phone-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-phone-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .contact-phone-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-phone-number {
        text-align: center;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .contact-icon {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-phone-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .contact-phone-item {
        padding: 1rem;
    }
    
    .contact-phone-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .contact-phone-info h5 {
        font-size: 1rem;
    }
    
    .contact-phone-number a {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.8rem;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #2563eb;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.contact-info-footer p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-info-footer i {
    color: #2563eb;
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Loading animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* --- NEWS STYLES --- */

/* News Section on Homepage */
.news-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

/* Unified News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Unified News Card */
.news-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.news-card-img-container {
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    overflow: hidden;
}

.news-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-card-img-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 40px;
}

.news-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #333;
}

.news-card-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 15px;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f1f1;
}

/* Legacy helpers to ensure meta and read more spacing */
.news-meta { display: flex; gap: 12px; align-items: center; color: #888; font-size: 0.9rem; }
.news-author, .news-date, .news-views { display: flex; align-items: center; gap: 6px; }
.read-more { display: inline-flex; align-items: center; gap: 6px; color: #007bff; text-decoration: none; margin-top: 10px; }
.read-more:hover { text-decoration: underline; }

.news-card-date {
    font-size: 0.8rem;
    color: #888;
}

.news-card-date i {
    margin-right: 5px;
}

.all-news-link-container {
    text-align: center;
    margin-top: 40px;
}

/* News List Page (news.php) */
.news-list-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 60px 20px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 0 0 20px 20px;
}

.news-list-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.news-list-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.pagination a {
    background: #fff;
    color: #007bff;
}

.pagination a:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .disabled {
    opacity: 0.6;
    pointer-events: none;
    background: #e9ecef;
}

/* News Detail Page (news_detail.php) */
.news-detail-container {
    padding: 40px 0;
    padding-top: 100px;
}

.news-detail-card {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

.news-detail-header {
    text-align: center;
    margin: 25px 20px 10px 20px;
}

.news-detail-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.3;
}

.news-detail-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    color: #6b7280;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.news-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-detail-meta-item i {
    color: #007bff;
}

.news-detail-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-detail-image:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.news-detail-content {
    background: white;
    padding: 25px 22px 30px 22px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #343a40;
}

/* Additional images gallery */
.additional-images { padding: 0 22px 25px 22px; }
.additional-images h3 { margin-bottom: 12px; }
.images-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery-image { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; cursor: pointer; }

/* Image Modal/Lightbox */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #f1f1f1;
    padding: 15px 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #f1f1f1;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Animation for modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Make gallery images more interactive */
.gallery-image {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-image:hover {
    transform: scale(1.05);
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        padding: 10px 8px;
        font-size: 16px;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
    
    .modal-close {
        top: -40px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
}

/* Similar News Section */
.similar-news {
    margin-top: 40px;
    padding: 0 22px 25px 22px;
}

.similar-news h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
}

.similar-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.similar-news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.similar-news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.similar-news-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
    position: relative;
}

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

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

.similar-news-content {
    padding: 15px;
}

.similar-news-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-news-excerpt {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 12px;
}

.similar-news-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.similar-news-meta i {
    font-size: 0.7rem;
}

/* Responsive for similar news */
@media (max-width: 768px) {
    .similar-news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .similar-news-content {
        padding: 12px;
    }
    
    .similar-news-title {
        font-size: 0.9rem;
    }
    
    .similar-news-excerpt {
        font-size: 0.8rem;
    }
}

.news-detail-content h1, .news-detail-content h2, .news-detail-content h3, .news-detail-content h4 {
    color: #1f2937;
    margin-top: 30px;
    margin-bottom: 15px;
}

.news-detail-content p {
    margin-bottom: 20px;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

.back-to-news {
    display: inline-block;
    margin-bottom: 30px;
    padding: 12px 25px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-news:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* General Placeholders */
.no-news-placeholder {
    text-align: center;
    padding: 50px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.no-news-placeholder i {
    font-size: 4rem;
    color: #007bff;
    margin-bottom: 20px;
}

.no-news-placeholder h3 {
    font-size: 1.5rem;
    color: #333;
}

.no-news-placeholder p {
    color: #666;
}

/* News Edit Page Styles */
.current-images {
    margin: 15px 0;
}

.current-images h6 {
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.current-image-item {
    position: relative;
    display: inline-block;
    margin: 5px 10px 5px 0;
}

/* More specific selector to override any conflicting styles */
.current-images .current-image-item img,
.current-image-item img {
    width: 120px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    border: 2px solid #e5e7eb !important;
    max-width: 120px !important;
    max-height: 80px !important;
    min-width: 120px !important;
    min-height: 80px !important;
}

/* Very specific selector for news edit page images */
.reseption .current-image-item img,
.news_edit .current-image-item img {
    width: 120px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    border: 2px solid #e5e7eb !important;
    max-width: 120px !important;
    max-height: 80px !important;
    min-width: 120px !important;
    min-height: 80px !important;
}

.current-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 10;
}

.current-image-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Responsive News Grid */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-list-header {
        padding: 40px 20px;
    }
    
    .news-list-header h1 {
        font-size: 2.5rem;
    }
    
    .news-list-header p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .news-list-header h1 {
        font-size: 2rem;
    }
    
    .news-list-header p {
        font-size: 1rem;
    }
    
    .news-detail-title {
        font-size: 1.8rem;
    }
}