/* EverydayEcomCoupons - Custom Styles */

/* CSS Variables for 2025 Color Palette */
:root {
    --primary-blue: #1E3A8A;
    --secondary-emerald: #10B981;
    --accent-amber: #F59E0B;
    --light-gray: #F3F4F6;
    --white: #FFFFFF;
    --dark-gray: #1F2937;
    --text-dark: #111827;
    --text-muted: #6B7280;
    --success: #16A34A;
    --warning: #F59E0B;
    --info: #2563EB;
    --danger: #DC2626;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.display-4 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

/* Custom Bootstrap Overrides */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), #2745a7);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980B9, var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-amber), #d97706);
    color: white;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #E67E22, var(--primary-orange));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #22c55e);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, var(--primary-green));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-info {
    border: 2px solid var(--info);
    color: var(--info);
}

.btn-outline-info:hover {
    background: var(--info);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-success {
    border: 2px solid var(--success);
    color: var(--success);
}

.btn-outline-success:hover {
    background: var(--success);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-danger {
    border: 2px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-warning {
    border: 2px solid var(--warning);
    color: var(--warning);
}

.btn-outline-warning:hover {
    background: var(--warning);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border: 2px solid #6C757D;
    color: #6C757D;
}

.btn-outline-secondary:hover {
    background: #6C757D;
    color: white;
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: var(--transition);
    position: relative;
}

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

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

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-blue);
}

.dropdown-menu.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.dropdown-heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.category-count {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: var(--light-gray);
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.search-results {
    background: #fff;
}

.search-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.5rem;
}

.search-result-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid #E8E8E8;
    border-radius: 10px;
    transition: var(--transition);
}

.search-result-card:hover { box-shadow: var(--shadow); border-color: var(--primary-blue); }

.search-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.search-title { font-weight: 600; font-size: 0.9rem; }
.search-meta { font-size: 0.75rem; color: var(--text-muted); }
.search-exp { font-size: 0.75rem; color: var(--warning); }

.search-pagination { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem; }
.search-pagination .btn { padding: 0.4rem 0.6rem; font-size: 0.85rem; }

.category-pagination .btn { padding: 0.5rem 0.8rem; }
.category-pagination { padding: 0.5rem; }

@media (max-width: 992px) {
    .dropdown-menu { width: 100%; min-width: unset; }
    .search-result-grid { grid-template-columns: 1fr; }
}

.dropdown-item:focus, .dropdown-toggle:focus { outline: 2px solid var(--primary-blue); outline-offset: 2px; }

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue), #2745a7, var(--secondary-emerald));
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-blue), #2745a7, var(--secondary-emerald)) !important;
}

/* Category Cards */
.category-card {
    background: white;
    border: 1px solid #E8E8E8;
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.category-icon {
    transition: var(--transition);
}

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

/* Deal Cards */
.deal-card {
    position: relative;
    transition: var(--transition);
    border: 1px solid #E8E8E8;
}

.deal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.deal-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--danger), #b91c1c);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 2;
    box-shadow: var(--shadow);
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

/* Stats Section */
.bg-light {
    background-color: var(--light-gray) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-info {
    color: var(--info) !important;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-blue), #2745a7) !important;
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #111827, #1F2937) !important;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-orange) !important;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-orange);
    transform: translateY(-2px);
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #E8E8E8;
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem 1.5rem;
}

.coupon-code-display {
    border: 2px dashed var(--success);
    background: rgba(39, 174, 96, 0.1) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 3rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .category-card {
        margin-bottom: 1rem;
    }
    
    .deal-card {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 60vh;
    }
    
    .category-card {
        padding: 1.5rem !important;
    }
    
    .deal-card .card-body {
        padding: 1rem !important;
    }
}

/* Loading Animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .category-card,
    .deal-card {
        border: 2px solid var(--text-dark);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        width: 100%;
    }
}