/**
 * Promote Web Games - Modern Styling
 * Version: 1.0.0
 */

/* ==========================================================================
   Container Styles
   ========================================================================== */

.pwg-container {
    width: 100%;
    margin: 0 0 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    clear: both;
    overflow: hidden;
}

/* Above content specific spacing */
.pwg-container.pwg-above-content {
    margin: 0 0 2.5rem 0;
    padding: 0;
    max-width: 100%;
}

/* Section Title */
.pwg-section-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #00cdb7 !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
    border: none !important;
    text-transform: none !important;
}

/* ==========================================================================
   Hero Banner Styles
   ========================================================================== */

.pwg-hero-banner {
    position: relative;
    width: 100%;
    height: 320px;
    background: #1f2937;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pwg-hero-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
    color: inherit !important;
}

.pwg-hero-link:hover,
.pwg-hero-link:visited,
.pwg-hero-link:active {
    text-decoration: none !important;
    color: inherit !important;
}

/* ==========================================================================
   Hero Image Styles
   ========================================================================== */

.pwg-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    z-index: 0;
}

.pwg-hero-link:hover .pwg-hero-image {
    transform: scale(1.05);
}

/* No Image Placeholder */
.pwg-hero-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    z-index: 0;
}

.pwg-no-image-icon {
    font-size: 5rem;
    opacity: 0.3;
}

/* Vignette Overlay - Right and Bottom Fade with #1d232a color */
.pwg-hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(
        to left,
        rgba(29, 35, 42, 1.0) 0%,
        rgba(29, 35, 42, 0.5) 8%,
        transparent 20%
    ),
    linear-gradient(
        to top,
        rgba(29, 35, 42, 1.0) 0%,
        rgba(29, 35, 42, 0.4) 15%,
        transparent 35%
    );
}

/* ==========================================================================
   Hero Content Styles - Overlaid on Left Side
   ========================================================================== */

.pwg-hero-content {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 50%;
    padding: 2rem 2.5rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    z-index: 2;
}

.pwg-hero-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    padding: 0 !important;
    border: none !important;
    transition: color 0.2s ease !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.pwg-hero-link:hover .pwg-hero-title {
    color: oklch(0.7451 0.167 183.61) !important;
}

.pwg-hero-description {
    font-size: 1rem !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.6 !important;
    padding: 0 !important;
    border: none !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Hero Play Button
   ========================================================================== */

.pwg-hero-play-button {
    background: #5865f2;
    color: #ffffff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.pwg-hero-play-button:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Mobile devices */
@media (max-width: 768px) {
    .pwg-section-title {
        font-size: 1.5rem !important;
        margin: 0 0 1rem 0 !important;
    }

    .pwg-hero-banner {
        height: 300px;
    }

    .pwg-hero-content {
        max-width: 90%;
        padding: 2rem 1.5rem 1.5rem 1.5rem;
    }

    .pwg-hero-title {
        font-size: 1.5rem !important;
    }

    .pwg-hero-description {
        font-size: 0.875rem !important;
    }

    .pwg-hero-play-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    /* Adjust vignette for mobile */
    .pwg-hero-vignette {
        background: linear-gradient(
            to top,
            rgba(29, 35, 42, 1.0) 0%,
            rgba(29, 35, 42, 0.6) 30%,
            transparent 60%
        );
    }
}

/* Tablet devices */
@media (min-width: 769px) and (max-width: 1023px) {
    .pwg-hero-banner {
        height: 350px;
    }

    .pwg-hero-content {
        max-width: 60%;
        padding: 2.5rem 2rem 2rem 2rem;
    }

    .pwg-hero-title {
        font-size: 2rem !important;
    }

    .pwg-hero-description {
        font-size: 0.9375rem !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.pwg-hero-link:focus {
    outline: 3px solid #7480ff;
    outline-offset: 2px;
}

.pwg-hero-link:focus .pwg-hero-banner {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pwg-hero-image,
    .pwg-hero-play-button,
    .pwg-hero-wishlist-button {
        transition: none;
        animation: none;
    }
}

/* ==========================================================================
   Games Grid (Before Footer)
   ========================================================================== */

.pwg-games-container {
    width: 100%;
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pwg-games-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
}

/* Grid Card Styles */
.pwg-grid-card {
    background: #2a303c;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.pwg-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.pwg-grid-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    color: inherit !important;
}

.pwg-grid-card-link:hover,
.pwg-grid-card-link:visited,
.pwg-grid-card-link:active {
    text-decoration: none !important;
    color: inherit !important;
}

/* Grid Card Image */
.pwg-grid-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 140px;
    background: #1a1f2e;
    overflow: hidden;
}

.pwg-grid-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.pwg-grid-card:hover .pwg-grid-card-image {
    transform: scale(1.05);
}

.pwg-grid-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1f2e;
}

.pwg-grid-no-image-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* Grid Card Content */
.pwg-grid-card-content {
    padding: 1rem;
    background: #2a303c;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
}

.pwg-grid-card-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #ffffff !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    padding: 0 !important;
    border: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwg-grid-card-category {
    font-size: 0.8125rem !important;
    color: #9ca3af !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.4 !important;
}

.pwg-grid-card-description {
    font-size: 0.8125rem !important;
    color: #9ca3af !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.4 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Grid Play Button */
.pwg-grid-play-button {
    background: #3a4556;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-top: auto;
    width: 100%;
}

.pwg-grid-play-button:hover {
    background: #4a5568;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .pwg-games-grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .pwg-games-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .pwg-games-container {
        margin: 2rem 0;
    }
}

@media (max-width: 480px) {
    .pwg-games-grid-wrapper {
        grid-template-columns: 1fr;
    }
}
