/* ═══════════════════════════════════════════════════════════
   K9 ATF — Civilian Portal CSS
   Design inspired by k9atf.com with modern premium upgrade
   Colors: Deep blue night palette + warm green/gold accents
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;600;700;800;900&display=swap');

:root {
    /* Core palette */
    --navy: #0f172a;
    --navy-light: #1e293b;
    --slate: #334155;
    --slate-light: #475569;
    --text-white: #f8fafc;
    --text-grey: #94a3b8;
    --text-light: #cbd5e1;

    /* Brand accents — matches k9atf.com */
    --green: #3E9E7A;
    --green-dark: #2d7a5e;
    --green-glow: rgba(62, 158, 122, 0.15);
    --red: #D35147;
    --red-dark: #b8433a;
    --gold: #facc15;
    --gold-dark: #eab308;

    /* Glass */
    --card-bg: rgba(30, 41, 59, 0.85);
    --card-border: rgba(71, 85, 105, 0.4);
    --glass: rgba(15, 23, 42, 0.92);

    /* Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    /* Spacing */
    --section-pad: 5rem 0;
    --container-max: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--navy);
    color: var(--text-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 90%;
    max-width: var(--container-max);
    margin: 0 auto;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--gold);
}

/* ═══════════════════════════════════════════
   HEADER / NAVIGATION
   Matches k9atf.com nav structure
   ═══════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1e3a5f 0%, #2a5080 50%, #1e3a5f 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.75rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-white);
}

.site-logo img {
    height: 44px;
    width: auto;
}

.site-logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.site-logo-text small {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-grey);
}

/* Nav links */
.main-nav {
    list-style: none;
    display: flex;
    gap: 0;
    align-items: center;
}

.main-nav li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.3s, background 0.3s;
    border-radius: 6px;
}

.main-nav li a:hover {
    color: var(--gold);
}

.main-nav li a.active {
    color: var(--gold);
    font-weight: 700;
}

.main-nav li a.nav-login {
    background: var(--green);
    color: white;
    font-weight: 600;
    margin-left: 0.5rem;
    padding: 0.5rem 1.25rem;
}

.main-nav li a.nav-login:hover {
    background: var(--green-dark);
    color: white;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: var(--text-white);
    border-radius: 2px;
    transition: 0.3s;
}

/* ═══════════════════════════════════════════
   PAGE HERO
   ═══════════════════════════════════════════ */
.page-hero {
    position: relative;
    width: 100%;
    min-height: 550px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 2rem 0;
    
    /* Clean gradient wave background */
    background:
        radial-gradient(ellipse 120% 80% at 20% 80%, rgba(30,41,59,0.7) 0%, transparent 60%),
        radial-gradient(ellipse 100% 60% at 80% 20%, rgba(30,41,59,0.5) 0%, transparent 50%),
        radial-gradient(ellipse 140% 50% at 50% 100%, rgba(45,55,72,0.4) 0%, transparent 70%),
        linear-gradient(135deg, #0f172a 0%, #1a2332 40%, #1e293b 60%, #0f172a 100%);
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 15%;
    right: -2%;
    width: 400px;
    height: 400px;
    background-image: url('/assets/images/logos/k9atf_logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.06;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 1;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 5%;
    left: -3%;
    width: 300px;
    height: 300px;
    background-image: url('/assets/images/logos/k9atf_logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.035;
    transform: rotate(20deg);
    pointer-events: none;
    z-index: 1;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.page-hero .container {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
}

.hero-split {
    display: flex;
    align-items: center;
    gap: 4rem;
    justify-content: space-between;
}

.hero-text-content {
    flex: 1;
    max-width: 600px;
}

.hero-image-content {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 4px solid rgba(255,255,255,0.05);
    background: #000;
}

.hero-image-actual {
    display: block;
    width: 100%;
    max-width: 550px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    opacity: 0.95;
    transition: opacity 0.3s, transform 0.5s;
}

.hero-image-wrapper:hover .hero-image-actual {
    opacity: 1;
    transform: scale(1.02);
}

@media (max-width: 900px) {
    .hero-split {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-text-content {
        max-width: 100%;
    }
    
    .hero-image-content {
        justify-content: center;
    }
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.page-hero h1 span {
    color: var(--gold);
}

.page-hero p {
    font-size: 1.15rem;
    color: var(--text-white);
    max-width: 600px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    font-weight: 500;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-grey);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--green);
}

.breadcrumb span {
    opacity: 0.5;
}

/* ═══════════════════════════════════════════
   CONTENT SECTIONS
   ═══════════════════════════════════════════ */
.content-section {
    padding: var(--section-pad);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--green);
    border-radius: 4px;
}

.section-title span {
    color: var(--green);
}

/* Content Card */
.content-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, border-color 0.3s;
}

.content-card:hover {
    transform: translateY(-2px);
    border-color: var(--green);
}

.content-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--green);
}

.content-card p,
.content-card div {
    color: var(--text-light);
    line-height: 1.8;
}

/* CMS Content Area — rendered from sitepages */
.cms-content {
    color: var(--cms-text, var(--text-light));
    line-height: 1.9;
    font-size: 1.05rem;
}

.cms-content h1,
.cms-content h2,
.cms-content h3 {
    color: var(--text-white);
    margin: 1.5rem 0 0.75rem;
}

.cms-content font {
    color: inherit !important;
}

.dark-contrast {
    color: var(--text-white) !important;
}

.dark-contrast p, .dark-contrast li, .dark-contrast div {
    color: var(--text-white) !important;
}

.cms-content p {
    margin-bottom: 1rem;
}

.cms-content ul,
.cms-content ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text-light);
}

.cms-content li {
    margin-bottom: 0.5rem;
}

.bg-light-grey {
    background: #ffffff !important;
    color: var(--navy) !important;
}

.bg-light-grey .section-title {
    color: var(--navy) !important;
}

.bg-light-grey .content-card {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06) !important;
    padding: 2rem !important;
    color: var(--navy) !important;
    border-radius: 10px !important;
}

.bg-light-grey .cms-content, 
.bg-light-grey .cms-content p, 
.bg-light-grey .cms-content li,
.bg-light-grey .cms-content strong,
.bg-light-grey .cms-content b {
    color: var(--navy) !important;
}

.bg-light-grey .cms-content h1,
.bg-light-grey .cms-content h2,
.bg-light-grey .cms-content h3 {
    color: var(--navy-light) !important;
}

.title-full-underline {
    display: block !important;
    width: 100%;
}

.title-full-underline::after {
    width: 100% !important;
}

.cms-content strong {
    color: var(--text-white);
}

.cms-content a {
    color: var(--green);
}

.cms-content a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   CLASS SCHEDULE CARDS
   ═══════════════════════════════════════════ */
.class-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 5px solid var(--green);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    transition: transform 0.3s, border-color 0.3s;
}

.class-card:hover {
    transform: translateY(-2px);
    border-left-color: var(--gold);
}

.class-card h3 {
    font-size: 1.2rem;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.class-card .class-time {
    color: var(--green);
    font-weight: 600;
    font-size: 0.95rem;
}

.class-card .class-desc {
    color: var(--text-grey);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════
   SERVICE / FEATURE GRID
   ═══════════════════════════════════════════ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--green);
}

.feature-card .card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-glow);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.25rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-grey);
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════
   GALLERY GRID
   ═══════════════════════════════════════════ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--green);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.9));
    color: var(--text-white);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   OWNER / TEAM BIOS
   ═══════════════════════════════════════════ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.team-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    border-top: 4px solid var(--green);
}

.team-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--green);
    margin-bottom: 1rem;
}

.team-card p {
    color: var(--text-light);
    line-height: 1.9;
}

/* ═══════════════════════════════════════════
   LINKS PAGE CARDS
   ═══════════════════════════════════════════ */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.link-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: transform 0.3s, border-color 0.3s;
    display: block;
    text-decoration: none;
}

.link-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
}

.link-card h3 {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.link-card p {
    color: var(--text-grey);
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════
   CONTACT FORM
   ═══════════════════════════════════════════ */
.contact-form {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2.5rem;
    border-top: 4px solid var(--green);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--navy);
    border: 1px solid var(--slate);
    color: var(--text-white);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: var(--green);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    width: 100%;
    justify-content: center;
}

.btn-submit:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   SIDEBAR (News + Events widget like old site)
   ═══════════════════════════════════════════ */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-widget {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--green);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--green);
}

.sidebar-widget p,
.sidebar-widget a {
    font-size: 0.9rem;
    color: var(--text-grey);
    line-height: 1.7;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
    background: var(--navy-light);
    border-top: 1px solid var(--card-border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.footer-col a {
    display: block;
    color: var(--text-grey);
    font-size: 0.9rem;
    padding: 0.25rem 0;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--green);
}

.footer-col p {
    color: var(--text-grey);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 36px;
}

.footer-logo span {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
}

.footer-bottom {
    border-top: 1px solid var(--card-border);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--slate-light);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--glass);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--card-border);
    }

    .main-nav.nav-open {
        display: flex;
    }

    .main-nav li a {
        padding: 0.75rem 1rem;
        width: 100%;
    }

    .page-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .class-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.content-card,
.feature-card,
.class-card,
.gallery-item,
.team-card,
.link-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.content-card:nth-child(1),
.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.content-card:nth-child(2),
.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.content-card:nth-child(3),
.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.content-card:nth-child(4),
.feature-card:nth-child(4) {
    animation-delay: 0.4s;
}

.content-card:nth-child(5),
.feature-card:nth-child(5) {
    animation-delay: 0.5s;
}

.content-card:nth-child(6),
.feature-card:nth-child(6) {
    animation-delay: 0.6s;
}