/*
Theme Name: Coach Pro Theme
Theme URI: https://example.com/coach-pro
Author: Mostafa Reda
Author URI: https://example.com
Description: Minimal mobile-first theme purpose-built to render the Coach Pro plugin app full-screen with no chrome, like a native mobile app. Auto-detects pages containing the [coach_app] shortcode and removes all theme markup. Outside the app, falls back to a clean dark landing.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coach-pro-theme
Tags: mobile-app, pwa, fullscreen, minimal, dark
*/

/* ============== RESET ============== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #0a0e23;
    background: #f5f6fb;
    line-height: 1.5;
    min-height: 100dvh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* WP admin bar fix */
html { margin-top: 0 !important; }
* html body { margin-top: 0 !important; }

/* ============== FULL-SCREEN APP MODE ============== */
body.coach-fullscreen {
    background: #f5f6fb;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
}
body.coach-fullscreen #wpadminbar { display: none !important; }

body.coach-fullscreen #wpadminbar,
body.coach-fullscreen #wpfooter,
body.coach-fullscreen #adminmenu,
body.coach-fullscreen .site-header,
body.coach-fullscreen .site-footer,
body.coach-fullscreen header.site-header,
body.coach-fullscreen footer.site-footer { display: none !important; }

#coach-page-wrap {
    min-height: 100dvh;
    width: 100%;
    background: #f5f6fb;
    color: #0a0e23;
}

/* ============== NORMAL PAGES (landing, 404, etc.) ============== */
.site-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
.site-header {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10,14,35,0.92);
    color: white;
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .brand {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-header .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #ff5e3a, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.site-header .nav a {
    margin-left: 18px;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    transition: color 0.2s;
}
.site-header .nav a:hover { color: white; }
.site-header .nav .cta {
    background: linear-gradient(135deg, #ff5e3a, #ff8c42);
    padding: 9px 18px;
    border-radius: 999px;
    color: white !important;
    box-shadow: 0 6px 16px rgba(255,94,58,0.35);
}

.site-main {
    flex: 1;
    padding: 32px 24px;
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
}
.site-main h1 {
    font-size: clamp(28px, 6vw, 44px);
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0 0 12px;
}
.site-main p { color: #5b5d72; font-size: 16px; }

.site-footer {
    padding: 24px;
    text-align: center;
    color: #9c9eb0;
    font-size: 12px;
    border-top: 1px solid #e8e9f3;
}

/* ============== HERO ============== */
.hero {
    background: linear-gradient(135deg, #0a0e23 0%, #2d1b5e 50%, #ff5e3a 100%);
    color: white;
    padding: 80px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -30%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: clamp(36px, 8vw, 64px);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin: 0 0 16px;
    position: relative;
}
.hero p {
    font-size: clamp(15px, 3vw, 18px);
    opacity: 0.9;
    max-width: 560px;
    margin: 0 auto 28px;
    position: relative;
}
.hero .btn {
    display: inline-block;
    background: white;
    color: #0a0e23;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    transition: transform 0.15s;
    position: relative;
}
.hero .btn:active { transform: scale(0.97); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 40px;
}
.feature {
    background: white;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(10,14,35,0.06);
}
.feature h3 { margin: 12px 0 6px; font-size: 16px; font-weight: 700; }
.feature p { color: #5b5d72; font-size: 13px; margin: 0; }
.feature .icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff5e3a, #ff8c42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* 404 */
.notfound {
    text-align: center;
    padding: 80px 20px;
}
.notfound h1 { font-size: 80px; margin: 0; background: linear-gradient(135deg, #ff5e3a, #6366f1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound a { color: #ff5e3a; font-weight: 700; }
