/* ==========================================================================
   HOMEPAGE CSS (Rules #6, #10)
   Homepage-specific styles that don't duplicate base styles
   ========================================================================== */

/* Homepage Specific Layout */
.homepage-main {
    background-color: var(--light-gray-color);
}

/* Promocodes Section */
.promocodes {
    padding: var(--spacing-xxl) 0;
    background-color: var(--light-gray-color);
}

.promocodes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.promocodes-header h2 {
    margin: 0;
    color: var(--text-color);
}

.promocodes-header span {
    color: var(--dark-gray-color);
    font-size: 14px;
    font-weight: 500;
}

/* Service Switcher in Sidebar */
.service-switcher {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.service-switch-button {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 4px var(--spacing-sm); /* Reduced padding */
    background: var(--light-gray-color);
    border-radius: var(--radius-sm);
    border: 1px solid var(--medium-gray-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 13px;
    text-align: left;
    min-height: 32px; /* Reduced height */
}

.service-switch-button:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.service-switch-button.active {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.service-switch-logo {
    flex-shrink: 0;
}

.service-switch-logo img {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.service-switch-logo svg {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
}

.service-switch-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Service Logo Placeholder (copied from service.css) */
.service-switch-logo .service-logo-placeholder {
    width: 24px !important; /* Reduced size for sidebar */
    height: 24px !important; /* Reduced size for sidebar */
    border-radius: var(--radius-sm); /* Reduced border radius */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
}

.service-switch-logo .service-logo-text {
    font-size: 10px !important; /* Reduced font size for sidebar */
    font-weight: 700;
    color: #000;
    letter-spacing: 0.5px;
}

/* How to Use Section */
.how-to-use {
    background: white;
    padding: var(--spacing-xxl) 0;
}

.how-to-use__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.how-to-use__step {
    text-align: center;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    background: var(--light-gray-color);
    border: 1px solid var(--medium-gray-color);
    transition: all var(--transition-normal);
}

.how-to-use__step:hover {
    border-color: var(--primary-color);
}

.how-to-use__step-number {
    display: inline-flex;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.how-to-use__step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.how-to-use__step-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: var(--lime);
    padding: var(--spacing-xxl) 0;
    text-align: center;
    color: var(--secondary-color);
}

.cta-section h2 {
    margin-bottom: var(--spacing-md);
    color: var(--secondary-color);
}

.cta-section p {
    font-size: 18px;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

.cta-button {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: #1a1a1a;
}

/* Homepage Search Specific */
.homepage-search {
    background: white;
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid var(--medium-gray-color);
}

/* View All Button */
#view-all-button {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.view-all-link {
    text-decoration: none;
}

.view-all-btn {
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-block;
}

.view-all-btn:hover {
    background: var(--lime-600);
    transform: translateY(-1px);
}

.homepage-search .search-bar {
    max-width: 800px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .how-to-use__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .promocodes {
        padding: var(--spacing-xl) 0;
    }
    
    .promocodes-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .how-to-use {
        padding: var(--spacing-xl) 0;
    }
    
    .how-to-use__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .how-to-use__step {
        padding: var(--spacing-md);
    }
    
    .how-to-use__step-number {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .how-to-use__step-title {
        font-size: 16px;
    }
    
    .how-to-use__step-description {
        font-size: 13px;
    }
    
    .cta-section {
        padding: var(--spacing-xl) 0;
    }
    
    .cta-section h2 {
        font-size: 24px;
    }
    
    .cta-section p {
        font-size: 16px;
    }
    
    .homepage-search {
        padding: var(--spacing-lg) 0;
    }
    
    /* Service Logo Placeholder Mobile */
    .service-logo-placeholder {
        width: 20px;
        height: 20px;
        border-radius: var(--radius-xs);
    }
    
    .service-logo-text {
        font-size: 8px;
    }
    
    .service-switch-button {
        padding: 3px var(--spacing-xs);
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .promocodes {
        background: white !important;
    }
    
    .how-to-use__step {
        background: white !important;
        border: 1px solid #ccc !important;
    }
    
    .cta-section {
        background: white !important;
        color: black !important;
    }
}
