/* Just4Advertise - Main Stylesheet */

:root {
    --primary-color: #FF6B35;
    --secondary-color: #004E89;
    --accent-color: #F7B801;
    --text-dark: #1A1A2E;
    --text-light: #6C757D;
    --bg-light: #F8F9FA;
    --border-color: #E0E0E0;
    --success-color: #28A745;
    --danger-color: #DC3545;
    --white: #FFFFFF;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--secondary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
}

.header-main {
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo:hover {
    color: var(--secondary-color);
}


/* Search Box */
#searchBox {
    display: flex;
    align-items: stretch;
    background: transparent;
    max-width: 400px;
    gap: 10px;
    /* Match newsletter gap */
}

#searchQuery {
    flex: 1;
    height: auto;
    border: none;
    padding: 15px;
    /* Match form-control padding */
    border-radius: var(--radius);
    /* Individual radius like newsletter */
    outline: none;
    width: auto;
    min-width: 0;
    font-size: 16px;
    background: #fff;
    transition: var(--transition);
}

#searchQuery:focus {
    outline: 2px solid var(--accent-color);
    /* Match form-control focus */
}

#searchButton {
    height: auto;
    border-radius: var(--radius);
    /* Individual radius like newsletter */
    margin: 0;
    padding: 15px 25px;
    /* Generous padding */
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 18px;
    /* Slightly larger icon */
}

/* Navigation Styles - Customizing Bootstrap */
.navbar-nav {
    gap: 15px;
}

.navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 10px !important;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Dropdown Styles */
.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius);
    padding: 10px 0;
    margin-top: 10px !important;
    /* Spacing from navbar */
}

.dropdown-item {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop Hover Support */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        animation: fadeIn 0.2s ease-in;
    }
}

/* Hero Section & Banner Slider */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 60px 0;
    color: var(--white);
}

.hero-banner img {
    width: 100%;
    border-radius: var(--radius);
}

.hero-content {
    text-align: center;
    padding: 40px 0;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Hero Carousel Fixed Dimensions */
.banner-slider-section {
    padding: 30px 0 60px;
    background: #fff;
}

#heroCarousel {
    width: 100%;
    max-width: 1160px;
    /* Slightly narrower to fit perfectly in container */
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius);
    background: #eee;
    /* Fallback background */
}

#heroCarousel .carousel-inner {
    height: 450px !important;
    /* Force fixed height on desktop */
}

#heroCarousel .carousel-item {
    height: 450px !important;
}

#heroCarousel .carousel-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
}

/* Responsive carousel heights */
@media (max-width: 992px) {

    #heroCarousel .carousel-inner,
    #heroCarousel .carousel-item {
        height: 350px !important;
    }
}

@media (max-width: 768px) {

    #heroCarousel .carousel-inner,
    #heroCarousel .carousel-item {
        height: 250px !important;
    }
}

@media (max-width: 576px) {

    #heroCarousel .carousel-inner,
    #heroCarousel .carousel-item {
        height: 200px !important;
    }
}

/* Sections */
section {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.btn-link {
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

.btn-link:hover {
    transform: translateX(5px);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon img {
    width: 35px;
    height: 35px;
}

.category-card h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin: 0;
}

/* Deals Grid */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.deal-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.deal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.deal-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
}

.deal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deal-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.merchant-logo {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 8px;
    padding: 5px;
    box-shadow: var(--shadow);
}

.deal-content {
    padding: 20px;
}

.deal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.3;
}

.deal-description {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.deal-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

.deal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.deal-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-image {
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.blog-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 8px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 18px;
}

/* Newsletter Section */
.newsletter-section {
    background: var(--secondary-color);
    color: var(--white);
}

.newsletter-box {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-box h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.newsletter-box p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.form-control {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
}

.form-control:focus {
    outline: 2px solid var(--accent-color);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-top: 15px;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.alert-danger {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.bg-light {
    background: var(--bg-light);
}

/* Responsive */
@media (max-width: 968px) {
    .header-content {
        flex-wrap: wrap;
    }

    #searchBox {
        order: 3;
        width: 100%;
        margin: 15px 0 0 0;
        max-width: none;
    }

    #searchQuery {
        width: 100%;
        /* Ensure full width on mobile */
    }


    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .section-title {
        font-size: 28px;
    }

    .deals-grid,
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .deals-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}