/* Home Page Styles */
.home-page {
    min-height: 100vh;
}

/* Hero Section */
.hero {
    background: url(/uploads/branding/qwertyuiop-background-top.png), linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.hero-search {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 8px;
}

.hero-search input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.hero-search input::placeholder {
    color: #999;
}

.hero-search button {
    background: var(--primary-color);
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-search button:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Browse Categories Section */
.browse-categories {
    padding: 60px 0;
    background: #f8f9fa;
}

.browse-categories h2 {
    text-align: center;
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

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

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.category-icon i {
    font-size: 2rem;
    color: white;
}

.category-card h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.category-card p {
    color: #666;
    margin-bottom: 1rem;
}

.category-link {
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    display: inline-block;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 47, 108, 0.3);
}

/* Featured Businesses Section */
.featured-businesses {
    padding: 3rem 0;
    background: #f8f9fa;
}

.featured-businesses .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.featured-businesses h2 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.business-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    position: relative;
}

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

.premium-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #f39c12;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.business-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.business-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.business-card:hover .business-image img {
    transform: scale(1.05);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8d9f5, #d4c5e8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b7ba8;
    font-size: 3rem;
}

.image-placeholder i {
    opacity: 0.6;
}

.business-info {
    padding: 1.5rem;
}

.business-info h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.business-category {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.business-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.business-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #ddd;
    font-size: 0.9rem;
}

.stars i.filled {
    color: #f39c12;
}

.rating-text {
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
}

.view-business-btn {
    background: white;
    color: var(--primary-color);
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.view-business-btn:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 47, 108, 0.3);
}

/* Recently Added Section */
.recently-added {
    padding: 3rem 0;
    background: #f8f9fa;
}

.recently-added .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.recently-added h2 {
    color: #333;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Own Business Section */
.own-business-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.own-business-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.own-business-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.btn-add-business,
.btn-login {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid;
}

/* Special case for buttons on colored backgrounds - override universal for specific contexts */
.hero .btn-add-business,
.own-business-section .btn-add-business {
    background: white !important;
    color: var(--primary-color) !important;
    border-color: white !important;
}

.hero .btn-add-business:hover,
.own-business-section .btn-add-business:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.hero .btn-login,
.own-business-section .btn-login {
    background: transparent !important;
    color: white !important;
    border-color: white !important;
}

.hero .btn-login:hover,
.own-business-section .btn-login:hover {
    background: white !important;
    color: var(--primary-color) !important;
    border-color: white !important;
}

/* Why Choose Section */
.why-choose-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.why-choose-section .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.why-choose-section h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
}

.why-choose-section .section-header p {
    font-size: 1.2rem;
    opacity: 1;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.feature-card {
    background: rgba(255,255,255,0.25);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.4);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.feature-card:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.feature-icon i {
    font-size: 2rem;
    color: white;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.feature-card p {
    opacity: 1;
    line-height: 1.6;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

/* Statistics Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 2rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.stat-item {
    margin: 1rem 0rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 1;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* No businesses message */
.no-businesses {
    text-align: center;
    padding: 3rem;
    color: #666;
    grid-column: 1 / -1;
}

/* Recent Businesses */
.recent-businesses {
    padding: 3rem 0;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.recent-business-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.recent-business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.recent-business-card .business-image {
    height: 160px;
    overflow: hidden;
    background: #f1e3ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-business-card .business-info {
    padding: 1rem;
}

.recent-business-card h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
    line-height: 1.3;
}

.business-category-small {
    color: #666;
    font-size: 0.8rem;
    margin: 0 0 0.5rem 0;
}

.rating-compact {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0 0.5rem 0;
}

.rating-compact .stars {
    display: flex;
    gap: 1px;
}

.rating-compact .stars i {
    color: #ddd;
    font-size: 0.7rem;
}

.rating-compact .stars i.active {
    color: #ffc107;
}

.rating-compact .rating-text {
    font-size: 0.75rem;
    color: #666;
}

.business-address-compact {
    color: #666;
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.3;
}

/* Nearby Businesses */
.nearby-businesses {
    padding: 3rem 0;
    background: #f8f9fa;
    display: none; /* Hidden by default, shown via JavaScript */
}

.nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.nearby-business-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nearby-business-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.business-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.business-header h4 {
    margin: 0;
    color: #333;
    flex: 1;
    font-size: 1rem;
    line-height: 1.3;
}

.distance {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.75rem;
    white-space: nowrap;
}

.nearby-business-card .category {
    color: #666;
    font-size: 0.8rem;
    margin: 0 0 0.4rem 0;
}

.nearby-business-card .address {
    color: #666;
    font-size: 0.75rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.view-btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
}



/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .cta-primary,
    .cta-secondary {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 0.8rem 1.5rem;
    }

    .featured-businesses,
    .recent-businesses,
    .nearby-businesses {
        padding: 2rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }

    .section-header p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .businesses-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
        padding: 0 1rem;
    }

    .recent-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
        margin-top: 1.5rem;
        padding: 0 1rem;
    }

    .nearby-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
        padding: 0 1rem;
    }

    .business-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .distance {
        margin-left: 0;
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1.5rem 0;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .recent-grid {
        grid-template-columns: 1fr;
    }

    .recent-business-card .business-image {
        height: 140px;
    }

    .recent-business-card h4 {
        font-size: 0.9rem;
    }

    .business-category-small {
        font-size: 0.75rem;
    }

    .business-address-compact {
        font-size: 0.7rem;
    }

    .rating-compact .stars i {
        font-size: 0.65rem;
    }

    .rating-compact .rating-text {
        font-size: 0.7rem;
    }
}