@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

body {
    font-family: system-ui, "Inter", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #000000;
    text-align: center;
    padding-bottom: 90px; /* For sticky footer */
}

@keyframes shimmer-ltr {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes shimmer-rtl {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton {
    background-color: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0);
    background-size: 200% 100%;
    border-radius: 0.21vw;
}

.skeleton.shimmer-ltr {
    animation: shimmer-ltr 1.5s infinite;
}

.skeleton.shimmer-rtl {
    animation: shimmer-rtl 1.5s infinite;
}

header {
    padding: 30px 0;
}

header .logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

header .logo-link:hover {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

header h1 {
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.6em;
    margin: 0;
}

.image-grid a.grid-item {
    padding-top: 100%; /* Aspect ratio 1:1 for perfect squares */
    position: relative;
    overflow: hidden;
    display: block;
}

.grid-item-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    cursor: pointer;
}

.grid-item .skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.grid-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    opacity: 0;
    transition: filter 0.3s ease, transform 2s ease, opacity 0.6s ease;
}

.grid-item img.loaded {
    opacity: 1;
}

.grid-item:hover img {
    filter: brightness(0.4);
    transform: scale(1.1);
}

.grid-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 0.78vw, 15px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.grid-item:hover .grid-item-overlay {
    opacity: 1;
}

.article-title {
    margin: 0;
    font-size: clamp(16px, 1.04vw, 24px);
    font-weight: 500;
    text-align: center;
    text-shadow: 0 0.05vw 0.21vw rgba(0,0,0,0.5);
    width: 80%;
}

.read-now-btn {
    background-color: white;
    color: black;
    border: none;
    border-radius: 0;
    padding: clamp(8px, 0.68vw, 16px) clamp(12px, 1.09vw, 24px);
    margin-top: clamp(12px, 1.04vw, 20px);
    font-size: clamp(14px, 0.83vw, 18px);
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.read-now-btn:hover {
    background-color: #000000;
    color: #ffffff;
}

.image-grid a:focus,
.image-grid a:hover {
    outline: none;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    background-color: #ffffff;
    height: 90px;
}

footer a {
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.6em;
    padding: 0 30px;
    margin-left: 0;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%;
}

footer a.contact {
    background-color: #ffffff;
    color: #000000;
}

footer a.contact:hover {
    background-color: #f0f0f0;
}

footer a.get-featured {
    background-color: #000000;
    color: #ffffff;
    border-left: 1px solid #f0f0f0;
}

footer a.get-featured:hover {
    background-color: #333333;
}

@media (max-width: 1100px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        padding: 20px 0;
    }

    body {
        padding-bottom: 180px; /* More space for stacked footer buttons */
    }

    footer {
        justify-content: center;
        flex-direction: column;
        align-items: stretch;
        height: auto;
    }

    footer a {
        width: 100%;
        text-align: center;
        justify-content: center;
        align-items: center;
        height: 90px;
        margin: 0;
        padding: 0;
        border-left: none;
    }

    footer a.get-featured {
        border-left: none;
        border-top: 1px solid #f0f0f0;
    }
}

@media (max-width: 600px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}