/* =============================================================
   Manx Club — Main Stylesheet
   Shared across all pages of the new site.
   ============================================================= */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #2c2c2c;
    background: #faf8f5;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== DESIGN TOKENS ===== */
:root {
    --sand:   #f5e6c8;
    --rust:   #c8551a;
    --sky:    #4a9ebe;
    --dark:   #1e2330;
    --text:   #2c2c2c;
    --light:  #faf8f5;
    --mid:    #6b6b6b;
    --border: #e0d8cc;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dark);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img {
    height: 42px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}
.nav-links { display: flex; list-style: none; gap: 0.25rem; }
.nav-links a {
    color: #ccc;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: var(--rust);
}
.nav-social { display: flex; gap: 0.6rem; align-items: center; }
.nav-social a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #aaa;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #444;
    transition: all 0.2s;
}
.nav-social a:hover { color: #fff; border-color: #888; background: rgba(255,255,255,0.08); }
.nav-social img { height: 16px; width: auto; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #ccc; margin: 5px 0; border-radius: 2px; transition: 0.3s; }

/* ===== HERO SLIDER ===== */
.hero {
    position: relative;
    height: 540px;
    overflow: hidden;
    background: var(--dark);
}
.slides { display: flex; height: 100%; transition: transform 0.7s cubic-bezier(.77,0,.18,1); will-change: transform; }
.slide { min-width: 100%; height: 100%; position: relative; overflow: hidden; }
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.75;
}
.hero-headline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    pointer-events: none;
    z-index: 2;
    width: 90%;
}
.hero-headline h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-shadow: 0 2px 20px rgba(0,0,0,0.7);
    letter-spacing: -0.01em;
    line-height: 1.15;
}
.hero-headline p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-top: 0.75rem;
    text-shadow: 0 1px 8px rgba(0,0,0,0.7);
    color: var(--sand);
}
.hero-cta {
    display: inline-block;
    margin-top: 1.5rem;
    background: var(--rust);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    pointer-events: all;
    transition: background 0.2s;
    box-shadow: 0 4px 20px rgba(200,85,26,0.4);
}
.hero-cta:hover { background: #a84416; }
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    z-index: 5;
    backdrop-filter: blur(4px);
}
.slider-btn:hover { background: rgba(255,255,255,0.3); }
.slider-btn.prev { left: 1.25rem; }
.slider-btn.next { right: 1.25rem; }
.slider-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.dot.active { background: #fff; transform: scale(1.3); }

/* ===== BRAND BAR ===== */
.brand-bar {
    background: var(--sand);
    border-bottom: 3px solid var(--rust);
    padding: 0.75rem 1.5rem;
}
.brand-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.brand-inner img.devedeal { height: 70px; width: auto; }
.brand-text h2 { font-size: 1.6rem; font-weight: 800; color: var(--dark); }
.brand-text p { font-size: 0.88rem; color: var(--mid); }

/* ===== LAYOUT SECTIONS ===== */
.section { padding: 4rem 1.5rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 1.75rem; font-weight: 800; color: var(--dark); margin-bottom: 0.4rem; }
.section-title span { color: var(--rust); }
.section-subtitle { color: var(--mid); font-size: 1rem; margin-bottom: 2.5rem; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}
.btn-rust { background: var(--rust); color: #fff; }
.btn-rust:hover { background: #a84416; }
.btn-outline { border: 2px solid var(--rust); color: var(--rust); background: transparent; }
.btn-outline:hover { background: var(--rust); color: #fff; }
.btn-sky { background: var(--sky); color: #fff; }
.btn-sky:hover { background: #3a8aaa; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #111820; }
.btn-sand { background: var(--sand); color: var(--dark); }
.btn-sand:hover { background: #e8d4a8; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; border-radius: 6px; font-weight: 700; text-align: center; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.8rem; }

/* ===== EVENT CARDS ===== */
.events-section { background: #fff; }
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.event-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.event-card-img {
    height: 160px;
    background: var(--dark);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-card-img img { width: 100%; height: 100%; object-fit: cover; }
.event-card-body { padding: 1.25rem; }
.event-badge {
    display: inline-block;
    background: var(--sky);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}
.event-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--dark); }
.event-card .meta { font-size: 0.85rem; color: var(--mid); margin-bottom: 1rem; }
.event-card .meta span { display: block; }

/* ===== MEMBERSHIP BANNER ===== */
.membership-banner {
    background: linear-gradient(135deg, var(--dark) 0%, #2d3a50 100%);
    color: #fff;
    padding: 4rem 1.5rem;
}
.membership-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}
.membership-inner h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.membership-inner h2 span { color: var(--rust); }
.membership-inner p { color: #aab; font-size: 1rem; max-width: 580px; }
.membership-perks { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.perk {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    font-size: 0.82rem;
    color: #dde;
}
.membership-ctas { display: flex; flex-direction: column; gap: 0.75rem; min-width: 180px; }

/* ===== RESOURCES GRID ===== */
.resources-section { background: var(--sand); }
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.resource-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.resource-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.resource-icon { font-size: 2rem; }
.resource-card h3 { font-size: 1rem; font-weight: 700; color: var(--dark); }
.resource-card p { font-size: 0.85rem; color: var(--mid); flex: 1; }
.resource-link { font-size: 0.85rem; font-weight: 600; color: var(--rust); margin-top: 0.5rem; }

/* ===== STORE SECTION ===== */
.store-section { background: #fff; }
.store-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.store-text h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.store-text h2 span { color: var(--rust); }
.store-text p { color: var(--mid); margin-bottom: 1.5rem; }
.store-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.store-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--light);
    text-align: center;
    padding-bottom: 0.75rem;
}
.store-item-img {
    height: 100px;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}
.store-item p { font-size: 0.78rem; font-weight: 600; padding: 0.4rem 0.5rem 0; color: var(--dark); }

/* ===== COMMUNITY BAR ===== */
.community-bar {
    background: var(--rust);
    padding: 2rem 1.5rem;
    text-align: center;
}
.community-bar h2 { color: #fff; font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.community-bar p { color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; }
.community-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.community-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.community-link:hover { background: rgba(255,255,255,0.25); }
.community-link img { height: 20px; filter: brightness(0) invert(1); }

/* ===== FOOTER ===== */
footer {
    background: var(--dark);
    color: #aaa;
    padding: 3rem 1.5rem 1.5rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-brand img { height: 40px; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: 0.7; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; }
.footer-col h4 {
    color: var(--sand);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col ul a { font-size: 0.85rem; color: #999; transition: color 0.2s; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}
.footer-bottom span { color: var(--rust); }

/* ===== PAGE HEADER (inner pages) ===== */
.page-header {
    background: linear-gradient(135deg, var(--dark), #2d3a50);
    color: #fff;
    padding: 3rem 1.5rem;
    text-align: center;
}
.page-header h1 { font-size: 2rem; font-weight: 800; }
.page-header p { color: #aab; margin-top: 0.5rem; }

/* ===== ADMIN STYLES ===== */
.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 60px);
}
.admin-sidebar {
    background: #1a1f2e;
    padding: 1.5rem 0;
    border-right: 1px solid #2a3040;
}
.admin-sidebar h3 {
    color: #666;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 1.25rem;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}
.admin-sidebar h3:first-child { margin-top: 0; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #999;
    padding: 0.6rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.admin-nav a.active { color: #fff; border-left-color: var(--rust); background: rgba(200,85,26,0.1); }
.admin-nav .icon { font-size: 1rem; width: 20px; text-align: center; }
.admin-content {
    padding: 2rem;
    background: #f4f6f9;
    overflow-y: auto;
}
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.admin-topbar h1 { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.admin-topbar p { color: var(--mid); font-size: 0.88rem; }
.admin-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.admin-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-card .card-desc { color: var(--mid); font-size: 0.85rem; margin-bottom: 1.25rem; }
.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-stat {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    text-align: center;
}
.admin-stat .num { font-size: 2rem; font-weight: 800; color: var(--rust); }
.admin-stat .label { font-size: 0.8rem; color: var(--mid); font-weight: 500; }

/* Slider image grid in admin */
.slider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.slider-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    background: #eee;
    aspect-ratio: 4/3;
}
.slider-thumb:hover { transform: scale(1.02); }
.slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.slider-thumb.enabled  { border-color: #22c55e; }
.slider-thumb.disabled { opacity: 0.45; border-color: #e2e8f0; }
.slider-thumb .thumb-check {
    position: absolute;
    top: 6px; right: 6px;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}
.slider-thumb.enabled  .thumb-check { background: #22c55e; color: #fff; }
.slider-thumb.disabled .thumb-check { background: #cbd5e1; color: #fff; }
.slider-thumb .thumb-name {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
    font-size: 0.65rem;
    padding: 0.75rem 0.4rem 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== ALERTS / FLASH ===== */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--dark); margin-bottom: 0.4rem; }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(74,158,190,0.15);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .store-inner { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-links, .nav-social { display: none; }
    .nav-toggle { display: block; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px; left: 0; right: 0;
        background: var(--dark);
        padding: 1rem;
        z-index: 99;
    }
    .hero { height: 400px; }
    .membership-inner { grid-template-columns: 1fr; }
    .membership-ctas { flex-direction: row; flex-wrap: wrap; }
    .brand-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
    .hero { height: 320px; }
    .footer-grid { grid-template-columns: 1fr; }
    .store-items { grid-template-columns: repeat(2, 1fr); }
    .slider-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
