/* main.css - Complete CSS for WallHub */

:root {
    /* Color Variables */
    --primary-color: #FF6B35;
    --primary-dark: #E85D04;
    --primary-light: #FF9E66;
    --secondary-color: #4361ee;
    --accent-color: #4cc9f0;
    --dark-bg: #0A0A0A;
    --darker-bg: #050505;
    --card-bg: #1A1A1A;
    --card-hover: #222222;
    --text-light: #F0F0F0;
    --text-dim: #AAAAAA;
    --border-color: #333333;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    /* Gradient Variables */
    --gradient-orange: linear-gradient(135deg, #FF6B35 0%, #FF9E00 100%);
    --gradient-blue: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    --primary-gradient: linear-gradient(135deg, #FF6B35 0%, #FF9E00 50%, #FF3864 100%);
    --gradient-cyan: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.8rem;
}

h3 {
    font-size: 2.2rem;
}

h4 {
    font-size: 1.8rem;
}

h5 {
    font-size: 1.4rem;
}

h6 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-dim);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* ===== GRID SYSTEM ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.row > * {
    padding: 0 15px;
}

/* Column Sizes */
.col-12 { width: 100%; }
.col-lg-6 { width: 50%; }
.col-lg-8 { width: 66.6667%; }
.col-md-4 { width: 33.3333%; }
.col-md-3 { width: 25%; }
.col-md-6 { width: 50%; }
.col-md-8 { width: 66.6667%; }
.col-sm-6 { width: 50%; }

/* Responsive Columns */
@media (max-width: 992px) {
    .col-lg-6, .col-lg-8, .col-md-4, .col-md-3, .col-md-6, .col-md-8, .col-sm-6 {
        width: 100%;
    }
}

/* ===== UTILITY CLASSES ===== */

/* Text Alignment */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Text Colors */
.text-white { color: white !important; }
.text-light { color: var(--text-light) !important; }
.text-dim { color: var(--text-dim) !important; }
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }

/* Text Decoration */
.text-decoration-none { text-decoration: none !important; }
.text-decoration-underline { text-decoration: underline !important; }

/* Font Weight */
.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: 800 !important; }

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }

/* Flex Properties */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

/* Justify Content */
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

/* Align Items */
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-stretch { align-items: stretch !important; }

/* Align Self */
.align-self-start { align-self: flex-start !important; }
.align-self-center { align-self: center !important; }
.align-self-end { align-self: flex-end !important; }
.align-self-stretch { align-self: stretch !important; }

/* Gap */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* Margin */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }
.m-auto { margin: auto !important; }

/* Margin Top */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mt-auto { margin-top: auto !important; }

/* Margin Bottom */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mb-auto { margin-bottom: auto !important; }

/* Margin Left/Right */
.ms-0 { margin-left: 0 !important; }
.me-0 { margin-right: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.me-3 { margin-right: 1rem !important; }

/* Padding */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* Padding Top */
.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }

/* Padding Bottom */
.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

/* ===== COMPONENT STYLES ===== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9) 0%, rgba(18, 18, 18, 0.95) 100%),
                url('https://images.unsplash.com/photo-1519681393784-d120267933ba?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') center/cover no-repeat;
    padding: 120px 0 80px;
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(67, 97, 238, 0.15) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 4px 15px rgba(76, 201, 240, 0.3);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 30px;
    font-weight: 300;
    line-height: 1.6;
}

/* Hero Images - FIXED */
.hero-content .position-relative {
    min-height: 300px;
}

.hero-content img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-premium {
    background: linear-gradient(135deg, #4361ee, #3f37c9);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    display: inline-block;
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(67, 97, 238, 0.4);
    color: white;
}

.btn-outline-light {
    color: white;
    background-color: transparent;
    border: 2px solid white;
}

.btn-outline-light:hover {
    color: var(--dark-bg);
    background-color: white;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Category Buttons */
.category-btn {
    background-color: rgba(30, 30, 30, 0.7);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 20px;
    margin: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
}

.category-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
    border-color: var(--primary-color);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    color: white;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 2px;
}

/* Wallpaper Cards - FIXED SIZES */
.wallpaper-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
    position: relative;
    cursor: pointer;
    height: 250px; /* Fixed height for trending */
}

/* Different height for popular collections */
#popular-collections .wallpaper-card,
.popular-collections-section .wallpaper-card {
    height: 200px; /* Smaller height for collections */
}

.wallpaper-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.wallpaper-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wallpaper-card:hover .wallpaper-img {
    transform: scale(1.05);
}

.wallpaper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.wallpaper-card:hover .wallpaper-overlay {
    opacity: 1;
}

.download-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(30, 30, 30, 0.8);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    z-index: 2;
    font-size: 0.9rem;
}

.wallpaper-card:hover .download-btn {
    opacity: 1;
    background-color: var(--primary-color);
}

.wallpaper-info {
    color: white;
}

.wallpaper-info h5 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.wallpaper-info p {
    color: #b0b0b0;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

/* Feature Boxes */
.feature-box {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Newsletter */
.newsletter-section {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(18, 18, 18, 0.9) 100%);
    padding: 60px 0;
    border-radius: 20px;
    margin: 60px 0;
    position: relative;
    overflow: hidden;
}

/* Form Controls */
.form-control {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: white;
    background-color: rgba(30, 30, 30, 0.8);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: white;
    background-color: rgba(30, 30, 30, 0.9);
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.25);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.5em;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 50rem;
    color: white;
}

.bg-primary { background-color: #4361ee !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-success { background-color: #28a745 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-warning { background-color: #ffc107 !important; color: #000 !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-dark { background-color: #343a40 !important; }

/* Images */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.rounded-4 {
    border-radius: 1rem !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Position */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* Top, Right, Bottom, Left */
.top-0 { top: 0 !important; }
.start-0 { left: 0 !important; }
.end-0 { right: 0 !important; }
.top-50 { top: 50% !important; }

/* Transform */
.translate-middle { transform: translate(-50%, -50%) !important; }
.translate-middle-x { transform: translateX(-50%) !important; }
.translate-middle-y { transform: translateY(-50%) !important; }

/* ===== MAIN CONTENT AREA ===== */
main {
    padding-top: 20px;
    min-height: 70vh;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .wallpaper-card {
        height: 220px;
    }
    
    .popular-collections-section .wallpaper-card {
        height: 180px;
    }
    
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.8rem; }
    
    .hero-content img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .wallpaper-card {
        height: 200px;
    }
    
    .popular-collections-section .wallpaper-card {
        height: 160px;
    }
    
    .btn-premium {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-content img {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .wallpaper-card {
        height: 180px;
    }
    
    .popular-collections-section .wallpaper-card {
        height: 140px;
    }
    
    .btn-premium {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    .hero-content img {
        height: 120px;
    }
}