* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --dark: #1a1a2e;
    --darker: #0f0f1e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--darker);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo h1 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo .tagline {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

.nav-stats {
    font-size: 0.9rem;
    color: var(--gray);
}

.nav-stats span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 2s ease-in-out;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    z-index: 1;
}

.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 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
    background-size: cover;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.search-box input {
    flex: 1;
    padding: 1.2rem 2rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--dark);
}

.search-btn {
    padding: 1.2rem 2rem;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
    background: var(--darker);
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--gray);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: white;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.category-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--dark);
    border: 1px solid var(--border);
    height: 280px;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    border-color: var(--primary);
}

.category-card img,
.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
}

.category-card-img.loaded {
    animation: fadeIn 0.5s ease-in;
}

.category-card-img.load-error {
    background: linear-gradient(135deg, #2a0a0a 0%, #1a0505 100%);
    opacity: 0.5;
}

.category-card:hover img,
.category-card:hover .category-card-img {
    transform: scale(1.1);
}

.category-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.category-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.category-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.category-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    z-index: 2;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    max-width: 1600px;
    margin: 2rem auto;
    padding: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--gray);
    font-size: 1rem;
}

.modal-subtitle span {
    color: var(--primary);
    font-weight: 700;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

/* Resolution Selector */
.resolution-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.res-tab {
    flex: 1;
    min-width: 150px;
    padding: 1.2rem;
    background: var(--dark);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.res-tab:hover {
    border-color: var(--primary);
}

.res-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
}

.res-label {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 600;
}

.res-tab.active .res-label {
    color: white;
}

.res-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--dark);
    border: 1px solid var(--border);
    aspect-ratio: 16/9;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
    border-color: var(--primary);
}

.gallery-item img,
.gallery-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s, opacity 0.3s;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
}

.gallery-item-img.loaded {
    animation: fadeIn 0.5s ease-in;
}

.gallery-item-img.load-error {
    background: linear-gradient(135deg, #2a0a0a 0%, #1a0505 100%);
    opacity: 0.5;
}

.gallery-item:hover img,
.gallery-item:hover .gallery-item-img {
    transform: scale(1.05);
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

.image-modal.active {
    display: block;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
}

.image-modal-content {
    position: relative;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.image-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.image-close-btn:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.image-modal-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.image-info {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.image-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
}

.image-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid var(--border);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .resolution-selector {
        flex-direction: column;
    }

    .modal-container {
        padding: 1rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Wallpapers Grid Section */
.wallpapers-section {
    padding: 4rem 0;
    background: var(--darker);
    min-height: 100vh;
}

.wallpapers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.wallpaper-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--dark);
    border: 1px solid var(--border);
    aspect-ratio: 16/9;
}

.wallpaper-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    border-color: var(--primary);
}

.wallpaper-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s, opacity 0.3s;
}

.wallpaper-img.lazy {
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    min-height: 200px;
}

.wallpaper-img.loading {
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    min-height: 200px;
    position: relative;
    opacity: 0.7;
}

.wallpaper-img.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.wallpaper-img.loaded {
    animation: fadeIn 0.5s ease-in;
    opacity: 1;
}

.wallpaper-img.load-error {
    background: linear-gradient(135deg, #2a0a0a 0%, #1a0505 100%);
    position: relative;
    opacity: 0.5;
}

.wallpaper-img.load-error::after {
    content: 'âš ï¸ Load Failed';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff6b6b;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.wallpaper-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.5) 70%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 1;
    transition: all 0.3s;
}

.wallpaper-item:hover .wallpaper-item-info {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.7) 70%, transparent);
}

.wallpaper-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.wallpaper-category {
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: capitalize;
}

.wallpaper-caption {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: lowercase;
}

.wallpaper-download {
    background: var(--primary);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallpaper-download:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.wallpaper-download svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 1200px) {
    .wallpapers-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .wallpapers-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .wallpapers-section {
        padding: 3rem 0;
    }
}

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

/* Mobile Images Banner */
.mobile-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.mobile-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.mobile-banner-icon {
    flex-shrink: 0;
}

.mobile-banner-icon svg {
    color: #fff;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.mobile-banner-text {
    flex: 1;
    min-width: 200px;
}

.mobile-banner-text h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.mobile-banner-text p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 1rem;
}

.mobile-banner-btn {
    background: #fff;
    color: #667eea;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.mobile-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .mobile-banner {
        margin: 1rem;
    }

    .mobile-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .mobile-banner-btn {
        width: 100%;
    }
}

/* --- MOBILE PAGE LAYOUT --- */
.mobile-section {
    flex: 1;
    padding: 20px 0 60px 0;
}

/* --- BANNER --- */
.stats-banner {
    background: linear-gradient(135deg, #0052cc 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 16px;
    margin: 20px 0 40px 0;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 82, 204, 0.2);
}

.stats-banner h2 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    font-weight: 800;
}

/* --- GALLERY GRID --- */
.mobile-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Force 2 Columns on Mobile */
    gap: 15px;
    padding: 0 5px;
}

@media (min-width: 768px) {
    .mobile-gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 25px;
    }
}

.mobile-image-card {
    position: relative;
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 9/16;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05);
}

.mobile-image-card:active {
    transform: scale(0.98);
}

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

/* --- DOWNLOAD BUTTON --- */
.download-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 2;
    border: none;
}

.download-overlay svg {
    width: 22px;
    height: 22px;
    color: #0052cc;
}

/* --- PAGINATION --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
    padding: 20px;
}

.page-btn {
    background: #0052cc;
    border: none;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.3);
}

.page-btn:hover:not(:disabled) {
    background: #0066ff;
    transform: translateY(-2px);
}

.page-btn:disabled {
    background: #1a1a2e;
    color: #555;
    box-shadow: none;
    cursor: not-allowed;
}

.page-info {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    background: #1a1a2e;
    padding: 10px 20px;
    border-radius: 50px;
}


/* --- FOOTER REFACTORED --- */
.footer {
    background: linear-gradient(180deg, #0a0a14 0%, #050508 100%);
    padding: 60px 0;
    position: relative;
}

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

.footer-top {
    display: grid;
    grid-template-columns: 1fr; /* Default to 1 column for mobile */
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .brand-name {
    color: #0052cc;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0052cc, #0066ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.footer-brand .brand-tagline {
    color: #888;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

.footer-links .links-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 15px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    display: flex;
    flex-direction: column; /* Stack on mobile */
    align-items: center;
    text-align: center;
    padding-top: 30px;
    gap: 20px;
}

.footer-copyright {
    color: #666;
    font-size: 14px;
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on very small screens */
    gap: 20px;
}

.footer-legal-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer-legal-links a:hover {
    color: #0052cc;
}

/* Responsive Overrides */
@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr 200px; /* 2 columns on larger screens */
        gap: 60px;
        text-align: left;
    }

    .footer-bottom {
        flex-direction: row; /* Side-by-side on larger screens */
        justify-content: space-between;
    }

    .footer-brand .brand-tagline {
        max-width: 420px;
    }
}

/* Further adjustments for extremely narrow screens */
@media (max-width: 320px) {
    .footer-legal-links {
        flex-direction: column;
        gap: 15px;
    }
}

/* --- MODAL --- */
.image-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.image-modal.active {
    display: flex;
}

.modal-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 10000;
}

.modal-actions {
    margin-top: 25px;
}

.modal-btn {
    background: #0052cc;
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.4);
}