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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f5f9ff;
}

a {
    text-decoration: none;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 0 15px;*/
}

.flex {
    display: flex;
}

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

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

/* Header styles */
.header {
    background-color: #1e88e5;
    box-shadow: none;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-top {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.1);
}

.header-top-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    justify-content: space-between;
}

.logo  {
    height: 32px;
    width: auto;
	color:white;
    filter: brightness(0) invert(1);
}

.header-bottom {
    padding: 10px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.header-bottom::-webkit-scrollbar {
    display: none;
}

.header-bottom-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.categories {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 0 15px;
    min-width: min-content;
}

.cate-item {
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    font-size: 15px;
}

.cate-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cate-item.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.cate-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.cate-item:hover::after,
.cate-item.active::after {
    width: 100%;
}

/* Footer styles */
.footer {
    background-color: #1e88e5;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    /*margin-bottom: 20px;*/
}

.footer-column h3 {
    /*margin-bottom: 15px;*/
    font-size: 16px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.9);
}

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

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
    font-size: 14px;
}

.footer-column ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Menu toggle button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    z-index: 100;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

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

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile styles */
@media (max-width: 768px) {
    .header-top-wrapper {
        padding: 0 10px;
    }

    .menu-toggle {
        display: flex;
    }

    .header-bottom {
        position: fixed;
        top: 48px;
        left: 0;
        width: 100%;
        background-color: #1e88e5;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 99;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .header-bottom.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    body.menu-open {
        overflow: hidden;
    }

    .categories {
        padding: 10px;
        flex-direction: column;
        align-items: flex-start;
    }

    .cate-item {
        padding: 12px 15px;
        font-size: 15px;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cate-item:last-child {
        border-bottom: none;
    }

    .logo img {
        height: 28px;
    }

    .footer {
        padding: 30px 0 15px;
    }

    .footer-column {
        min-width: 150px;
        /*margin-bottom: 25px;*/
    }

    .footer-links {
        padding: 0 10px;
    }
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #1e88e5;
    color: #fff;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.2);
}

/* Card styles */
.card {
    background-color: #fff;
    /*border-radius: 8px;*/
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.1);
    border: 1px solid #e3f2fd;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.card a {
    text-decoration: none;
    color: inherit;
}

.news-item-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.card-img {
    width: 100%;
    height: 0;
    padding-bottom: 52.5%; /* 600/315 = 0.525 */
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

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

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

.card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
}

.card-text {
    color: #666;
    margin-bottom: 15px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .header-menu {
        display: block;
    }
    
    .categories {
        flex-direction: column;
    }
    
    .cate-item {
        margin-bottom: 5px;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .footer-column {
        width: 100%;
    }
}

/* Lazy loading */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-loaded {
    opacity: 1;
}

/* Loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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