/*
Theme Name:  Gymkhana
Theme URI:   https://gymkhana.cloud
Description: Clean professional theme for Gymkhana Membership Portal.
Version:     2.0.0
Author:      Gymkhana
License:     GPL2
Text Domain: gymkhana
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ───────────────────────────────── */
:root {
    --navy:       #0f2340;
    --navy-mid:   #1a3c5e;
    --navy-light: #2563a8;
    --gold:       #c9a84c;
    --gold-light: #e8c96d;
    --white:      #ffffff;
    --off-white:  #f7f6f2;
    --gray-200:   #e5e7eb;
    --gray-600:   #4b5563;
    --gray-800:   #1f2937;
    --shadow-sm:  0 1px 3px rgba(15,35,64,.08);
    --shadow-md:  0 4px 16px rgba(15,35,64,.12);
    --radius:     10px;
    --header-h:   70px;
    --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--gray-800);
    background: var(--off-white);
    -webkit-font-smoothing: antialiased;
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.admin-bar .site-header { top: 32px; }
@media screen and (max-width:782px) { .admin-bar .site-header { top: 46px; } }

a { color: var(--navy-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4 { font-family: 'Playfair Display', serif; color: var(--navy); line-height: 1.25; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ── Layout ──────────────────────────────────── */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main    { flex: 1; padding: 48px 0 64px; }
.container    { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: var(--navy);
    border-bottom: 2px solid var(--gold);
    box-shadow: var(--shadow-md);
    /* Critical: flex centering on the header itself */
    display: flex;
    align-items: center;
}

.header-inner {
    width: 100%;
    /* height must be auto — NOT 100% — so flex centering works */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Branding */
.site-branding { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.site-branding:hover { text-decoration: none; }

.brand-emblem {
    width: 42px; height: 42px;
    background: var(--gold);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 20px; font-weight: 700;
    color: var(--navy);
    flex-shrink: 0;
    line-height: 1;
}

.brand-text    { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.brand-name    { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--white); line-height: 1; letter-spacing: .3px; }
.brand-tagline { font-size: 10px; color: var(--gold-light); font-weight: 500; letter-spacing: 2px; text-transform: uppercase; line-height: 1; }

/* ── Navigation — vertically centered ───────── */
.site-nav {
    display: flex;
    align-items: center;   /* centers items vertically */
    gap: 4px;
    height: auto;          /* not 100% */
}

/* All nav links — white text, centered */
.site-nav a,
.site-nav a:link,
.site-nav a:visited {
    display: inline-flex !important;
    align-items: center !important;
    padding: 9px 18px !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,.85) !important;
    text-decoration: none !important;
    transition: background var(--transition);
    white-space: nowrap;
    line-height: 1;
}
.site-nav a:hover { color: var(--white) !important; background: rgba(255,255,255,.1); }

/* Register / CTA button — gold, stays gold on ALL states */
.site-nav a:last-child,
.site-nav .nav-cta,
.site-nav a.nav-cta {
    background-color: var(--gold) !important;
    color: var(--navy) !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    margin-left: 6px;
}
.site-nav a:last-child:link,
.site-nav a:last-child:visited,
.site-nav a:last-child:hover,
.site-nav a:last-child:focus,
.site-nav a:last-child:active,
.site-nav .nav-cta:link,
.site-nav .nav-cta:visited,
.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus,
.site-nav .nav-cta:active,
.site-nav a.nav-cta:link,
.site-nav a.nav-cta:visited,
.site-nav a.nav-cta:hover,
.site-nav a.nav-cta:focus,
.site-nav a.nav-cta:active {
    background-color: var(--gold) !important;
    color: var(--navy) !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: all var(--transition); }

/* Mobile nav */
.mobile-nav { display: none; background: var(--navy); border-top: 1px solid rgba(201,168,76,.3); padding: 12px 0; }
.mobile-nav.open { display: block; }
.mobile-nav a,
.mobile-nav a:link,
.mobile-nav a:visited {
    display: block; padding: 13px 24px;
    color: rgba(255,255,255,.85) !important;
    font-size: 15px; font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: all var(--transition);
    text-decoration: none !important;
}
.mobile-nav a:hover { color: var(--gold) !important; background: rgba(255,255,255,.04); }
.mobile-nav a:last-child { border-bottom: none; }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.site-footer { background: var(--navy); border-top: 2px solid var(--gold); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand-name { font-family: 'Playfair Display', serif; font-size: 16px; color: var(--white); font-weight: 600; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,.45); }
.footer-links { display: flex; gap: 20px; }
.footer-links a,
.footer-links a:link,
.footer-links a:visited { font-size: 13px; color: rgba(255,255,255,.55) !important; text-decoration: none !important; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold) !important; }

/* ══════════════════════════════════════════════
   PAGE CONTENT
══════════════════════════════════════════════ */
.page-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%); padding: 36px 0 32px; margin-bottom: 40px; position: relative; overflow: hidden; }
.page-hero::before { content:''; position:absolute; top:-60px; right:-60px; width:220px; height:220px; border:36px solid rgba(201,168,76,.07); border-radius:50%; }
.page-hero h1 { font-size: clamp(20px,4vw,30px); color: var(--white); position: relative; z-index: 1; }
.page-hero .breadcrumb { font-size: 12px; color: var(--gold-light); margin-bottom: 8px; position: relative; z-index: 1; }

.entry-content { max-width: 780px; margin: 0 auto; }
.entry-content h2 { font-size: 22px; margin: 28px 0 14px; }
.entry-content h3 { font-size: 18px; margin: 22px 0 10px; }
.entry-content p  { color: var(--gray-600); margin-bottom: 16px; }

/* ══════════════════════════════════════════════
   HOME PAGE
══════════════════════════════════════════════ */
.home-hero {
    background: linear-gradient(135deg, var(--navy) 0%, #1e4d8c 50%, var(--navy-mid) 100%);
    padding: 80px 0 72px; text-align: center; position: relative; overflow: hidden;
}
.home-hero::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.home-hero-content { position: relative; z-index: 1; }
.home-hero .badge { display: inline-block; background: rgba(201,168,76,.15); border: 1px solid rgba(201,168,76,.35); color: var(--gold-light); font-size: 11px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; padding: 6px 16px; border-radius: 20px; margin-bottom: 20px; }
.home-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(30px,5vw,50px); color: var(--white); line-height: 1.15; margin-bottom: 18px; }
.home-hero h1 span { color: var(--gold); }
.home-hero p { font-size: 16px; color: rgba(255,255,255,.72); max-width: 500px; margin: 0 auto 36px; }
.home-hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; border-radius: 8px; font-size: 15px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; border: none; transition: all var(--transition); text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,168,76,.35); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.4); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); color: var(--white); }

.home-features { padding: 64px 0; background: var(--white); }
.section-label { font-size: 12px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(20px,3vw,28px); color: var(--navy); margin-bottom: 40px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 24px; }
.feature-card { background: var(--off-white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 28px 24px; transition: all var(--transition); border-top: 3px solid var(--navy-mid); }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-top-color: var(--gold); }
.feature-icon { font-size: 30px; margin-bottom: 12px; }
.feature-card h3 { font-size: 15px; font-family: 'DM Sans', sans-serif; font-weight: 600; margin-bottom: 8px; color: var(--navy); }
.feature-card p  { font-size: 14px; color: var(--gray-600); margin: 0; }

/* ══════════════════════════════════════════════
   PLUGIN OVERRIDES — ensure white card headers
   and correct colors throughout
══════════════════════════════════════════════ */
.mfm-wrap .mfm-card { border-radius: 12px; box-shadow: var(--shadow-md); border: 1px solid var(--gray-200); overflow: hidden; }

/* Force ALL content inside card header to be white */
.mfm-wrap .mfm-card-header,
.mfm-wrap .mfm-card-header *,
.mfm-wrap .mfm-card-header h1,
.mfm-wrap .mfm-card-header h2,
.mfm-wrap .mfm-card-header h3,
.mfm-wrap .mfm-card-header p,
.mfm-wrap .mfm-card-header span {
    color: #ffffff !important;
}

.mfm-wrap .mfm-btn-primary { background: linear-gradient(135deg, var(--navy), var(--navy-light)); font-family: 'DM Sans', sans-serif; }
.mfm-wrap .mfm-btn-primary:hover { box-shadow: 0 4px 14px rgba(15,35,64,.3); }
.mfm-wrap .mfm-form-group input:focus,
.mfm-wrap .mfm-form-group select:focus { border-color: var(--navy-mid); box-shadow: 0 0 0 3px rgba(26,60,94,.1); }
.mfm-wrap .mfm-table th { background: var(--navy); color: var(--white) !important; }

/* ── Responsive ─────────────────────────────── */
@media (max-width:768px) {
    .site-nav { display: none; }
    .nav-toggle { display: flex; }
    .home-hero { padding: 56px 0 48px; }
    .footer-inner { flex-direction: column; text-align: center; gap: 14px; }
    .footer-links { justify-content: center; }
    .site-main { padding: 32px 0 48px; }
}
@media (max-width:480px) {
    :root { --header-h: 62px; }
    .brand-tagline { display: none; }
    .home-hero-btns { flex-direction: column; align-items: center; }
}
