/**
 * WJPeso Gaming Platform - Main Stylesheet
 * Mobile-first responsive design for Philippine market
 * Max-width: 430px, rem-based sizing
 * All classes use s4ef- prefix
 */

/* CSS Variables */
:root {
    --s4ef-primary: #00B8D4;
    --s4ef-primary-dark: #0097A7;
    --s4ef-primary-light: #00E5FF;
    --s4ef-dark: #1E1E1E;
    --s4ef-dark-light: #2A2A2A;
    --s4ef-accent: #8B0000;
    --s4ef-red: #FF0000;
    --s4ef-green: #006400;
    --s4ef-green-light: #00A000;
    --s4ef-white: #FFFFFF;
    --s4ef-gray-light: #F5F5F5;
    --s4ef-gray: #CCCCCC;
    --s4ef-gray-dark: #666666;
    --s4ef-border: #E0E0E0;
    --s4ef-shadow: rgba(0, 0, 0, 0.1);
    --s4ef-shadow-heavy: rgba(0, 0, 0, 0.25);
    --s4ef-gradient-primary: linear-gradient(135deg, var(--s4ef-primary) 0%, var(--s4ef-primary-dark) 100%);
    --s4ef-gradient-accent: linear-gradient(135deg, var(--s4ef-accent) 0%, var(--s4ef-red) 100%);
    --s4ef-gradient-dark: linear-gradient(180deg, var(--s4ef-dark) 0%, var(--s4ef-dark-light) 100%);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--s4ef-dark);
    background: var(--s4ef-gray-light);
    overflow-x: hidden;
    max-width: 430px;
    margin: 0 auto;
}

/* Header */
.s4ef-header {
    background: var(--s4ef-gradient-dark);
    padding: 1.2rem 1.6rem;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 8px var(--s4ef-shadow);
    transition: all 0.3s ease;
}

.s4ef-header.s4ef-scrolled {
    padding: 0.8rem 1.6rem;
    box-shadow: 0 4px 12px var(--s4ef-shadow-heavy);
}

.s4ef-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
}

.s4ef-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.s4ef-logo-img {
    width: 4rem;
    height: 4rem;
    border-radius: 0.8rem;
}

.s4ef-logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--s4ef-white);
    letter-spacing: -0.05rem;
}

.s4ef-logo-text span {
    color: var(--s4ef-primary);
}

.s4ef-hamburger {
    width: 4.4rem;
    height: 4.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.8rem;
}

.s4ef-hamburger span {
    width: 2.4rem;
    height: 0.3rem;
    background: var(--s4ef-white);
    transition: all 0.3s ease;
    border-radius: 0.2rem;
}

.s4ef-hamburger.s4ef-active span:nth-child(1) {
    transform: rotate(45deg) translate(0.6rem, 0.6rem);
}

.s4ef-hamburger.s4ef-active span:nth-child(2) {
    opacity: 0;
}

.s4ef-hamburger.s4ef-active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.6rem, -0.6rem);
}

/* Mobile Navigation */
.s4ef-mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--s4ef-dark);
    z-index: 1001;
    transition: right 0.3s ease;
    padding: 8rem 2rem 2rem;
    overflow-y: auto;
}

.s4ef-mobile-nav.s4ef-active {
    right: 0;
}

.s4ef-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.s4ef-nav-overlay.s4ef-active {
    opacity: 1;
    visibility: visible;
}

.s4ef-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.s4ef-nav-item a {
    display: block;
    padding: 1.4rem 1.6rem;
    color: var(--s4ef-white);
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 500;
    border-radius: 0.8rem;
    transition: all 0.3s ease;
}

.s4ef-nav-item a:hover,
.s4ef-nav-item a:active {
    background: var(--s4ef-primary);
    transform: translateX(0.8rem);
}

/* Main Content */
.s4ef-main {
    min-height: calc(100vh - 16rem);
    padding-bottom: 8rem;
}

/* Carousel */
.s4ef-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 4px 12px var(--s4ef-shadow);
}

.s4ef-carousel-container {
    position: relative;
    width: 100%;
    height: 24rem;
}

.s4ef-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    cursor: pointer;
}

.s4ef-carousel-slide.s4ef-active {
    opacity: 1;
    z-index: 2;
}

.s4ef-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s4ef-carousel-dots {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 3;
}

.s4ef-carousel-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--s4ef-white);
}

.s4ef-carousel-dot.s4ef-active {
    background: var(--s4ef-primary);
    transform: scale(1.2);
}

/* Sections */
.s4ef-section {
    padding: 3rem 1.6rem;
    background: var(--s4ef-white);
    margin-bottom: 1.6rem;
}

.s4ef-section-alt {
    background: var(--s4ef-gray-light);
}

.s4ef-section-header {
    margin-bottom: 2rem;
}

.s4ef-section-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--s4ef-dark);
    margin-bottom: 0.8rem;
    position: relative;
    padding-bottom: 1.2rem;
}

.s4ef-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 6rem;
    height: 0.4rem;
    background: var(--s4ef-gradient-primary);
    border-radius: 0.2rem;
}

.s4ef-section-subtitle {
    font-size: 1.5rem;
    color: var(--s4ef-gray-dark);
    line-height: 1.5;
}

/* Buttons */
.s4ef-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 4.4rem;
    padding: 1.2rem 2.4rem;
    font-size: 1.6rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 2.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-align: center;
    gap: 0.8rem;
}

.s4ef-btn-primary {
    background: var(--s4ef-gradient-primary);
    color: var(--s4ef-white);
    box-shadow: 0 4px 12px rgba(0, 184, 212, 0.3);
}

.s4ef-btn-primary:hover,
.s4ef-btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 184, 212, 0.4);
}

.s4ef-btn-accent {
    background: var(--s4ef-gradient-accent);
    color: var(--s4ef-white);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.s4ef-btn-accent:hover,
.s4ef-btn-accent:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 0, 0, 0.4);
}

.s4ef-btn-outline {
    background: transparent;
    color: var(--s4ef-primary);
    border: 2px solid var(--s4ef-primary);
}

.s4ef-btn-outline:hover,
.s4ef-btn-outline:active {
    background: var(--s4ef-primary);
    color: var(--s4ef-white);
}

.s4ef-btn-block {
    width: 100%;
    display: flex;
}

.s4ef-btn-large {
    min-height: 5.2rem;
    font-size: 1.8rem;
    padding: 1.6rem 3.2rem;
}

/* Cards */
.s4ef-card {
    background: var(--s4ef-white);
    border-radius: 1.6rem;
    padding: 2rem;
    box-shadow: 0 2px 8px var(--s4ef-shadow);
    transition: all 0.3s ease;
}

.s4ef-card:hover {
    box-shadow: 0 4px 16px var(--s4ef-shadow-heavy);
    transform: translateY(-4px);
}

.s4ef-card-header {
    margin-bottom: 1.6rem;
}

.s4ef-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--s4ef-dark);
    margin-bottom: 0.8rem;
}

.s4ef-card-content p {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--s4ef-gray-dark);
    margin-bottom: 1.2rem;
}

.s4ef-card-content p:last-child {
    margin-bottom: 0;
}

/* Game Grid */
.s4ef-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.s4ef-game-item {
    position: relative;
    border-radius: 1.2rem;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px var(--s4ef-shadow);
}

.s4ef-game-item:hover,
.s4ef-game-item:active {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--s4ef-shadow-heavy);
}

.s4ef-game-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s4ef-game-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--s4ef-white);
    padding: 0.8rem 0.6rem 0.6rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

/* Feature Grid */
.s4ef-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.6rem;
    margin-bottom: 2rem;
}

.s4ef-feature-item {
    background: var(--s4ef-white);
    padding: 2rem 1.6rem;
    border-radius: 1.6rem;
    text-align: center;
    box-shadow: 0 2px 8px var(--s4ef-shadow);
    transition: all 0.3s ease;
}

.s4ef-feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--s4ef-shadow-heavy);
}

.s4ef-feature-icon {
    font-size: 4rem;
    margin-bottom: 1.2rem;
    color: var(--s4ef-primary);
}

.s4ef-feature-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--s4ef-dark);
    margin-bottom: 0.8rem;
}

.s4ef-feature-desc {
    font-size: 1.3rem;
    color: var(--s4ef-gray-dark);
    line-height: 1.5;
}

/* FAQ */
.s4ef-faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.s4ef-faq-item {
    background: var(--s4ef-white);
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 2px 6px var(--s4ef-shadow);
}

.s4ef-faq-question {
    padding: 1.6rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    min-height: 4.4rem;
}

.s4ef-faq-question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--s4ef-dark);
    flex: 1;
}

.s4ef-faq-icon {
    font-size: 2rem;
    color: var(--s4ef-primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.s4ef-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.s4ef-faq-answer-content {
    padding: 0 1.6rem 1.6rem;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--s4ef-gray-dark);
}

/* Footer */
.s4ef-footer {
    background: var(--s4ef-dark);
    color: var(--s4ef-white);
    padding: 3rem 1.6rem 10rem;
    margin-top: 2rem;
}

.s4ef-footer-partners {
    margin-bottom: 3rem;
}

.s4ef-footer-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.6rem;
    color: var(--s4ef-white);
}

.s4ef-partner-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
}

.s4ef-partner-logo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.8rem;
    object-fit: contain;
    background: var(--s4ef-white);
    padding: 0.8rem;
}

.s4ef-footer-links {
    margin-bottom: 2rem;
}

.s4ef-footer-link-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.s4ef-footer-link {
    color: var(--s4ef-gray);
    text-decoration: none;
    font-size: 1.3rem;
    padding: 0.8rem 0;
    transition: color 0.3s ease;
}

.s4ef-footer-link:hover,
.s4ef-footer-link:active {
    color: var(--s4ef-primary);
}

.s4ef-footer-bottom {
    border-top: 1px solid var(--s4ef-gray-dark);
    padding-top: 2rem;
    text-align: center;
}

.s4ef-footer-copyright {
    font-size: 1.3rem;
    color: var(--s4ef-gray);
    line-height: 1.6;
}

/* Bottom Navigation */
.s4ef-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--s4ef-white);
    box-shadow: 0 -2px 12px var(--s4ef-shadow);
    z-index: 998;
    padding: 0.8rem 0;
}

.s4ef-bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.s4ef-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--s4ef-gray-dark);
    padding: 0.8rem 1.2rem;
    min-width: 6rem;
    transition: all 0.3s ease;
}

.s4ef-bottom-nav-item:hover,
.s4ef-bottom-nav-item:active,
.s4ef-bottom-nav-item.s4ef-active {
    color: var(--s4ef-primary);
}

.s4ef-bottom-nav-icon {
    font-size: 2.4rem;
}

.s4ef-bottom-nav-label {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Back to Top Button */
.s4ef-back-to-top {
    position: fixed;
    bottom: 8rem;
    right: 1.6rem;
    width: 4.8rem;
    height: 4.8rem;
    background: var(--s4ef-gradient-primary);
    color: var(--s4ef-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--s4ef-shadow-heavy);
    z-index: 997;
}

.s4ef-back-to-top.s4ef-visible {
    opacity: 1;
    visibility: visible;
}

.s4ef-back-to-top:hover,
.s4ef-back-to-top:active {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 184, 212, 0.4);
}

/* Content Modules */
.s4ef-content-module {
    margin-bottom: 3rem;
}

.s4ef-content-module h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--s4ef-dark);
    margin-bottom: 1.6rem;
}

.s4ef-content-module h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--s4ef-dark);
    margin: 2rem 0 1.2rem;
}

.s4ef-content-module p {
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--s4ef-gray-dark);
    margin-bottom: 1.6rem;
}

.s4ef-content-module ul,
.s4ef-content-module ol {
    margin: 1.6rem 0;
    padding-left: 2rem;
}

.s4ef-content-module li {
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--s4ef-gray-dark);
    margin-bottom: 0.8rem;
}

.s4ef-content-module strong {
    color: var(--s4ef-dark);
    font-weight: 700;
}

/* Highlight Boxes */
.s4ef-highlight {
    background: linear-gradient(135deg, rgba(0, 184, 212, 0.1) 0%, rgba(0, 184, 212, 0.05) 100%);
    border-left: 4px solid var(--s4ef-primary);
    padding: 1.6rem;
    border-radius: 0.8rem;
    margin: 2rem 0;
}

.s4ef-highlight-accent {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.1) 0%, rgba(139, 0, 0, 0.05) 100%);
    border-left: 4px solid var(--s4ef-accent);
}

/* Animations */
@keyframes s4ef-fadeIn {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.s4ef-animate-on-scroll {
    opacity: 0;
}

.s4ef-animate-on-scroll.s4ef-animated {
    animation: s4ef-fadeIn 0.6s ease forwards;
}

/* Responsive Adjustments */
@media (max-width: 380px) {
    .s4ef-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .s4ef-partner-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .s4ef-bottom-nav-label {
        font-size: 1rem;
    }
}

@media (max-width: 320px) {
    html {
        font-size: 56%;
    }

    .s4ef-game-grid {
        gap: 0.8rem;
    }

    .s4ef-feature-grid {
        grid-template-columns: 1fr;
    }
}
