/* Reset & Basic Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333333;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Taaki footer hamesha bottom me rahe */
}

/* Main Container ko flex-grow dein taaki footer niche chala jaye */
.main-content {
    flex: 1;
    padding: 20px;
}

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

.page-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #111;
    font-weight: 700;
}

/* =========================================
   GRID LAYOUT (Mobile par 2 columns)
   ========================================= */
.grid-container {
    display: grid;
    /* Mobile par exactly 2 columns dikhenge */
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; /* Mobile par gap thoda kam rakha hai taaki jagah bache */
}

/* Tablet ke liye (3 columns) */
@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Desktop/Laptop ke liye (4 columns) */
@media (min-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* Card Styling */
.card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
}

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

/* 1:1 Ratio Thumbnail Wrapper */
.thumbnail-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1; /* 1:1 square ratio enforce karti hai */
    overflow: hidden;
    background-color: #ddd; 
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Image crop hokar square fit hogi */
    display: block;
    transition: transform 0.3s ease;
}

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

/* Content Area */
.card-content {
    padding: 10px; /* Mobile ke liye padding thoda kam kiya */
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 14px; /* Mobile par text chhota rakha taaki 2 grid me fit ho */
    font-weight: 600;
    color: #222;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Max 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Desktop par title ka size thoda bada kar dein */
@media (min-width: 768px) {
    .card-content {
        padding: 15px;
    }
    .card-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
}

/* Button Styling */
.download-btn {
    display: inline-block;
    width: 100%;
    padding: 8px 10px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.3s;
}

@media (min-width: 768px) {
    .download-btn {
        padding: 10px 15px;
        font-size: 15px;
    }
}

.download-btn:hover {
    background-color: #0056b3;
}

/* =========================================
   FOOTER STYLING
   ========================================= */
footer {
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 20px 10px;
    margin-top: 40px;
}

footer .footer-links {
    margin-bottom: 15px;
}

footer .footer-links a {
    color: #bbb;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
    transition: color 0.3s;
}

footer .footer-links a:hover {
    color: #fff;
}

footer .copyright {
    font-size: 12px;
    color: #777;
}