/* ==========================================================================
   Home Page CSS - Landing Page Specific Styles
   ========================================================================== */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.home-hero {
    position: relative;
    padding: var(--spacing-4xl) 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    .home-hero {
        padding: var(--spacing-5xl) 0;
        min-height: 450px;
    }
}

@media (min-width: 1024px) {
    .home-hero {
        padding: var(--spacing-6xl) 0;
        min-height: 500px;
    }
}

.home-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.home-hero .hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(1px);
}

.home-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.85) 40%,
        rgba(255, 255, 255, 0.4) 100%
    );
}

.home-hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.home-hero .hero-text {
    padding-right: var(--spacing-2xl);
}

.home-hero .hero-title {
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-tight);
}

.home-hero .hero-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .home-hero .hero-title {
        font-size: 2.25rem;
    }

    .home-hero .hero-subtitle {
        font-size: 1.125rem;
    }
}

@media (min-width: 1024px) {
    .home-hero .hero-title {
        font-size: var(--font-size-5xl);
    }

    .home-hero .hero-subtitle {
        font-size: var(--font-size-xl);
    }
}


/* ==========================================================================
   Category Cards Section
   ========================================================================== */

.category-cards-section {
    padding: var(--spacing-xl) 0 var(--spacing-2xl);
    position: relative;
}

@media (min-width: 768px) {
    .category-cards-section {
        padding: var(--spacing-xl) 0 var(--spacing-2xl);
    }
}

@media (min-width: 1024px) {
    .category-cards-section {
        padding: var(--spacing-2xl) 0 var(--spacing-3xl);
    }
}

/* Category Cards Grid - Already defined in layout.css but enhanced here */
.category-cards {
    display: grid;
    gap: var(--spacing-2xl);
    grid-template-columns: 1fr;
    margin-bottom: var(--spacing-6xl);
}

@media (min-width: 768px) {
    .category-cards {
        gap: var(--spacing-3xl);
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    .category-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-2xl);
    }
}

/* Enhanced Category Card Styling */
.category-card {
    background-color: var(--color-background-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    transition: all var(--transition-base);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

@media (min-width: 768px) {
    .category-card {
        padding: var(--spacing-xl);
    }
}

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

.category-card:focus {
    outline: 3px solid var(--color-primary-blue);
    outline-offset: 2px;
}

/* Store Card */
.card-store {
    background: var(--color-card-store);
    border-color: var(--color-card-store-border);
}

.card-store:hover {
    box-shadow: var(--shadow-lg);
}

/* Restaurant Card */
.card-restaurant {
    background: var(--color-card-restaurant);
    border-color: var(--color-card-restaurant-border);
}

.card-restaurant:hover {
    box-shadow: var(--shadow-lg);
}

/* Support Card */
.card-support {
    background: var(--color-card-support);
    border-color: var(--color-card-support-border);
}

.card-support:hover {
    box-shadow: var(--shadow-lg);
}

/* Card Content Enhanced */
.category-card .card-content {
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-card .card-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon background colors per card type */
.card-store .card-icon {
    background-color: var(--color-icon-bg-blue);
}

.card-restaurant .card-icon {
    background-color: var(--color-icon-bg-orange);
}

.card-support .card-icon {
    background-color: var(--color-icon-bg-green);
}

.category-card .card-icon svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke-width: 1.5;
}

.card-store .card-icon svg {
    stroke: var(--color-icon-stroke-blue);
}

.card-restaurant .card-icon svg {
    stroke: var(--color-icon-stroke-orange);
}

.card-support .card-icon svg {
    stroke: var(--color-icon-stroke-green);
}

.category-card .card-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: var(--line-height-tight);
}

.category-card .card-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height-base);
    margin-bottom: var(--spacing-lg);
    flex-grow: 0;
}

/* Enhanced Features List */
.category-card .card-features {
    margin-bottom: var(--spacing-lg);
    flex-grow: 1;
}

.category-card .features-title {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

.category-card .features-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.category-card .feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-base);
    color: var(--color-text-secondary);
    opacity: 0;
    transform: translateX(-10px);
    animation: slideInLeft 0.3s ease forwards;
}

/* Stagger animation for feature items */
.category-card:nth-child(1) .feature-item:nth-child(1) {
    animation-delay: 0.1s;
}
.category-card:nth-child(1) .feature-item:nth-child(2) {
    animation-delay: 0.2s;
}
.category-card:nth-child(1) .feature-item:nth-child(3) {
    animation-delay: 0.3s;
}
.category-card:nth-child(1) .feature-item:nth-child(4) {
    animation-delay: 0.4s;
}
.category-card:nth-child(1) .feature-item:nth-child(5) {
    animation-delay: 0.5s;
}
.category-card:nth-child(1) .feature-item:nth-child(6) {
    animation-delay: 0.6s;
}
.category-card:nth-child(1) .feature-item:nth-child(7) {
    animation-delay: 0.7s;
}

.category-card:nth-child(2) .feature-item:nth-child(1) {
    animation-delay: 0.2s;
}
.category-card:nth-child(2) .feature-item:nth-child(2) {
    animation-delay: 0.3s;
}
.category-card:nth-child(2) .feature-item:nth-child(3) {
    animation-delay: 0.4s;
}
.category-card:nth-child(2) .feature-item:nth-child(4) {
    animation-delay: 0.5s;
}
.category-card:nth-child(2) .feature-item:nth-child(5) {
    animation-delay: 0.6s;
}
.category-card:nth-child(2) .feature-item:nth-child(6) {
    animation-delay: 0.7s;
}
.category-card:nth-child(2) .feature-item:nth-child(7) {
    animation-delay: 0.8s;
}

.category-card:nth-child(3) .feature-item:nth-child(1) {
    animation-delay: 0.3s;
}
.category-card:nth-child(3) .feature-item:nth-child(2) {
    animation-delay: 0.4s;
}
.category-card:nth-child(3) .feature-item:nth-child(3) {
    animation-delay: 0.5s;
}
.category-card:nth-child(3) .feature-item:nth-child(4) {
    animation-delay: 0.6s;
}
.category-card:nth-child(3) .feature-item:nth-child(5) {
    animation-delay: 0.7s;
}
.category-card:nth-child(3) .feature-item:nth-child(6) {
    animation-delay: 0.8s;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.category-card .feature-icon {
    flex-shrink: 0;
    margin-top: 1px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card .feature-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke-width: 1.5;
}

/* Checkmark colors per card type */
.card-store .feature-icon svg {
    stroke: var(--color-icon-stroke-blue);
}

.card-restaurant .feature-icon svg {
    stroke: var(--color-icon-stroke-orange);
}

.card-support .feature-icon svg {
    stroke: var(--color-icon-stroke-green);
}

/* Enhanced CTA Button */
.category-card .card-cta {
    margin-top: auto; /* push to bottom of card-content */
    margin-left: 0; /* no negative margins */
    margin-right: 0;
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: var(--font-size-base);
    height: 48px;
    min-height: 48px;
    padding: 0 var(--spacing-xl);
    flex-shrink: 0;

    width: 100%; /* full width inside card-content */
    align-self: stretch; /* stretch to match content width */
}

@media (max-width: 767px) {
    .category-card .card-cta {
        margin-left: 0; /* instead of negative */
        margin-right: 0;
        height: 44px;
        min-height: 44px;
        padding: 0 var(--spacing-lg);
    }
}

@media (max-width: 1023px) {
    .category-card .card-cta {
        width: 100%;
        align-self: stretch;
    }
}

@media (min-width: 1024px) {
    .category-card .card-cta {
        margin-left: 0;
        margin-right: 0;
        height: 56px;
        min-height: 56px;
        padding: 0 var(--spacing-2xl);
        width: 300px; /* consistent wide CTA */
        max-width: 150%; /* don’t overflow card */
        align-self: center; /* center horizontally */
    }
}

/* ==========================================================================
   Help Section Enhanced
   ========================================================================== */

.help-section {
    text-align: center;
    padding: var(--spacing-5xl) 0 var(--spacing-2xl);
    position: relative;
}

.help-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 100px;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--color-primary-blue),
        var(--color-secondary-orange),
        var(--color-accent-green)
    );
    transform: translateX(-50%);
    border-radius: 1px;
}

.help-text {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.help-link {
    color: var(--color-primary-blue);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-base);
    position: relative;
}

.help-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary-blue);
    transition: width var(--transition-base);
}

.help-link:hover::after {
    width: 100%;
}

.help-link:hover {
    color: var(--color-primary-blue);
    transform: translateY(-1px);
}

/* ==========================================================================
   Responsive Enhancements
   ========================================================================== */

/* Mobile-specific adjustments */
@media (max-width: 767px) {
    .category-card {
        padding: var(--spacing-2xl) var(--spacing-lg);
    }

    .category-card .card-cta {
        margin-left: calc(-1 * var(--spacing-lg));
        margin-right: calc(-1 * var(--spacing-lg));
        height: 44px;
        min-height: 44px;
        padding: 0 var(--spacing-lg);
    }

    .category-card .card-icon {
        width: 48px;
        height: 48px;
        margin-bottom: var(--spacing-lg);
    }

    .category-card .card-icon svg {
        width: 24px;
        height: 24px;
    }

    .category-card .card-title {
        font-size: var(--font-size-xl);
    }

    .category-card .features-list {
        gap: var(--spacing-xs);
    }

    .category-card .feature-item {
        font-size: var(--font-size-xs);
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .category-cards {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .category-card {
        padding: var(--spacing-3xl) var(--spacing-2xl);
    }
}

/* Large screen enhancements */
@media (min-width: 1440px) {
    .hero-section {
        padding: 48px 0 0;
    }

    .category-cards {
        gap: var(--spacing-2xl);
    }

    .category-card {
        padding: var(--spacing-xl);
    }
}

/* ==========================================================================
   Accessibility & Performance
   ========================================================================== */

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-section::before,
    .category-card .feature-item,
    .help-link {
        animation: none;
        transition: none;
    }

    .category-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .category-card {
        border-width: 3px;
    }

    .card-store {
        background: var(--color-card-store);
    }

    .card-restaurant {
        background: var(--color-card-restaurant);
    }

    .card-support {
        background: var(--color-card-support);
    }
}

/* Print styles */
@media print {
    .hero-section::before,
    .category-card::before,
    .help-section::before {
        display: none;
    }

    .category-card {
        break-inside: avoid;
        box-shadow: none;
        border: 2px solid var(--color-neutral-medium);
    }
}
