/* ============================================
   MCMI Digital Platform - Corporate Design System
   Marriage Counselling Ministry International
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    /* MCMI Brand Palette - derived from logo */
    --teal-900: #0d3d3b;
    --teal-800: #145c58;
    --teal-700: #1a7a6d;
    --teal-600: #1f9185;
    --teal-500: #2ab0a0;
    --teal-400: #4dc9b9;
    --teal-300: #7addd0;
    --teal-200: #b0ede5;
    --teal-100: #daf7f3;
    --teal-50:  #f0fcfa;

    --gold-700: #8a6d1b;
    --gold-600: #a8872a;
    --gold-500: #c4a35a;
    --gold-400: #d4b87a;
    --gold-300: #e3cd9e;
    --gold-200: #f0e2c4;
    --gold-100: #faf3e5;

    --slate-900: #1a1e2e;
    --slate-800: #252a3a;
    --slate-700: #353b4f;
    --slate-600: #4a5168;
    --slate-500: #636b83;
    --slate-400: #8790a5;
    --slate-300: #b0b7c8;
    --slate-200: #d4d9e4;
    --slate-100: #eceef3;
    --slate-50:  #f7f8fa;

    --white: #ffffff;
    --error: #c0392b;
    --success: #1a7a6d;
    --warning: #d4a017;
    --info: #2980b9;

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(13, 61, 59, 0.06);
    --shadow-md: 0 4px 12px rgba(13, 61, 59, 0.08);
    --shadow-lg: 0 8px 30px rgba(13, 61, 59, 0.12);
    --shadow-xl: 0 16px 50px rgba(13, 61, 59, 0.16);

    /* Layout */
    --max-width: 1280px;
    --header-height: 80px;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--slate-800);
    background: var(--white);
    line-height: 1.65;
    font-weight: 400;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--slate-900);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h4 { font-size: 1.15rem; }

a {
    color: var(--teal-700);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--teal-500); }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-100);
    height: var(--header-height);
    transition: box-shadow 0.3s;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo img {
    height: 52px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--teal-800);
    letter-spacing: 0.02em;
}

.logo-tagline {
    font-size: 0.65rem;
    color: var(--slate-500);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.main-nav a {
    padding: var(--space-sm) var(--space-md);
    color: var(--slate-700);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--teal-700);
    background: var(--teal-50);
}

.nav-cta {
    background: var(--teal-700) !important;
    color: var(--white) !important;
    padding: var(--space-sm) var(--space-lg) !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: var(--teal-800) !important;
    color: var(--white) !important;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--slate-700);
    margin: 5px 0;
    transition: all 0.3s;
    border-radius: 2px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--teal-900);
    margin-top: var(--header-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-800) 40%, var(--teal-700) 100%);
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(42, 176, 160, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(196, 163, 90, 0.1) 0%, transparent 50%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(13, 61, 59, 0.6), transparent);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,0.5) 35px, rgba(255,255,255,0.5) 36px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.hero-text {
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: var(--space-xs) var(--space-md);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--teal-200);
    margin-bottom: var(--space-xl);
    backdrop-filter: blur(8px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold-400);
}

.hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    color: var(--white);
    margin-bottom: var(--space-lg);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero h1 em {
    font-style: italic;
    color: var(--gold-400);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: var(--space-2xl);
    max-width: 480px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -12px; right: -12px;
    width: 100%; height: 100%;
    border: 2px solid var(--gold-500);
    border-radius: var(--radius-xl);
    opacity: 0.3;
    z-index: -1;
}

.hero-stat-bar {
    position: absolute;
    bottom: -30px; left: 30px; right: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    justify-content: space-around;
    box-shadow: var(--shadow-lg);
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--teal-700);
}

.hero-stat-label {
    font-size: 0.75rem;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    letter-spacing: 0.01em;
    line-height: 1;
}

.btn-primary {
    background: var(--teal-700);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--teal-800);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-color: rgba(255,255,255,0.6);
}

.btn-outline {
    background: transparent;
    color: var(--teal-700);
    border: 1.5px solid var(--teal-700);
}
.btn-outline:hover {
    background: var(--teal-700);
    color: var(--white);
}

.btn-gold {
    background: var(--gold-500);
    color: var(--white);
}
.btn-gold:hover {
    background: var(--gold-600);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 1rem 2.2rem;
    font-size: 1rem;
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: var(--space-4xl) 0;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto var(--space-3xl);
}

.section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--teal-600);
    margin-bottom: var(--space-sm);
    position: relative;
    padding: 0 var(--space-lg);
}

.section-label::before,
.section-label::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: var(--teal-300);
}
.section-label::before { left: -10px; }
.section-label::after { right: -10px; }

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--slate-500);
    font-size: 1.05rem;
}

.section-alt {
    background: var(--slate-50);
}

.section-teal {
    background: var(--teal-900);
    color: var(--white);
}

.section-teal h2,
.section-teal h3,
.section-teal .section-label {
    color: var(--white);
}

.section-teal p {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   SERVICES GRID
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.service-card {
    background: var(--white);
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--teal-500), var(--gold-400));
    transform: scaleX(0);
    transition: transform 0.4s;
    transform-origin: left;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    border-color: var(--teal-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-icon {
    width: 52px; height: 52px;
    background: var(--teal-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    color: var(--teal-700);
    font-size: 1.4rem;
}

.service-card h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.2rem;
}

.service-card p {
    color: var(--slate-500);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ============================================
   TESTIMONIALS
   ============================================ */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.testimonial-card {
    background: var(--white);
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--teal-200);
    position: absolute;
    top: 10px; left: 20px;
    line-height: 1;
}

.testimonial-content {
    font-size: 0.95rem;
    color: var(--slate-600);
    line-height: 1.75;
    margin-bottom: var(--space-lg);
    padding-top: var(--space-lg);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.testimonial-name {
    font-weight: 600;
    color: var(--slate-800);
    font-size: 0.9rem;
}

.testimonial-category {
    font-size: 0.78rem;
    color: var(--teal-600);
}

/* ============================================
   BLOG CARDS
   ============================================ */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.blog-card-image {
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-body {
    padding: var(--space-xl);
}

.blog-card-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--teal-600);
    background: var(--teal-50);
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: var(--space-sm);
}

.blog-card h3 {
    font-size: 1.15rem;
    margin-bottom: var(--space-sm);
}

.blog-card h3 a {
    color: var(--slate-900);
}
.blog-card h3 a:hover {
    color: var(--teal-700);
}

.blog-card p {
    color: var(--slate-500);
    font-size: 0.9rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--slate-100);
    font-size: 0.78rem;
    color: var(--slate-400);
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    background: linear-gradient(135deg, var(--teal-800) 0%, var(--teal-900) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(196, 163, 90, 0.08) 0%, transparent 60%);
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: var(--space-4xl) 0;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.cta-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: var(--space-2xl);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--slate-900);
    color: rgba(255, 255, 255, 0.6);
    padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.footer-brand p {
    margin-top: var(--space-md);
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer-brand .logo img {
    height: 48px;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--teal-400);
}

.footer-contact-item {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: 0.88rem;
    align-items: flex-start;
}

.footer-contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--teal-400);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--teal-700);
    border-color: var(--teal-700);
    color: var(--white);
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: var(--space-xs);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--slate-800);
    background: var(--white);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(26, 122, 109, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234a5168' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ============================================
   FLASH MESSAGES
   ============================================ */

.flash-messages {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 420px;
}

.flash {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
    position: relative;
    padding-right: 40px;
}

.flash-success { background: #e8f5e8; color: #1a5c1a; border-left: 4px solid var(--success); }
.flash-error { background: #fde8e8; color: #8b1a1a; border-left: 4px solid var(--error); }
.flash-warning { background: #fef3cd; color: #856404; border-left: 4px solid var(--warning); }
.flash-info { background: #d4edfc; color: #1a4971; border-left: 4px solid var(--info); }

.flash-close {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   PAGE HEADERS (Inner pages)
   ============================================ */

.page-header {
    background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-800) 100%);
    padding: var(--space-4xl) 0 var(--space-3xl);
    margin-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,0.5) 35px, rgba(255,255,255,0.5) 36px);
}

.page-header h1 {
    color: var(--white);
    position: relative;
}

.page-header p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.05rem;
    margin-top: var(--space-sm);
    position: relative;
}

.breadcrumb {
    display: flex;
    gap: var(--space-sm);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: var(--space-md);
    position: relative;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
}
.breadcrumb a:hover { color: var(--teal-300); }

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.mission-box {
    background: var(--teal-50);
    border-left: 4px solid var(--teal-500);
    padding: var(--space-xl);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: var(--space-xl) 0;
}

.mission-box p {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--teal-800);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.team-card {
    text-align: center;
    padding: var(--space-xl);
}

.team-card img {
    width: 140px; height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--space-md);
    border: 4px solid var(--teal-100);
}

.team-card h4 {
    margin-bottom: var(--space-xs);
}

.team-card .role {
    font-size: 0.82rem;
    color: var(--teal-600);
    font-weight: 500;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
}

.contact-info-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--slate-50);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.contact-info-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--teal-700);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-card h4 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.contact-info-card p {
    font-size: 0.88rem;
    color: var(--slate-500);
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--teal-900), var(--teal-800));
    padding: var(--space-xl);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,0.5) 35px, rgba(255,255,255,0.5) 36px);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 460px;
    padding: var(--space-3xl);
    position: relative;
}

.auth-logo {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-logo img {
    height: 64px;
    margin: 0 auto var(--space-md);
}

.auth-logo h2 {
    font-size: 1.4rem;
    color: var(--slate-900);
}

.auth-logo p {
    font-size: 0.88rem;
    color: var(--slate-500);
    margin-top: var(--space-xs);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    font-size: 0.88rem;
    color: var(--slate-500);
}

/* ============================================
   PANEL TOPBAR (replaces public nav in panel)
   ============================================ */

.panel-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--slate-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-topbar-inner {
    max-width: 100%;
    height: 100%;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-topbar .logo img {
    height: 42px;
}

.panel-topbar .logo-name {
    color: var(--white);
    font-size: 0.95rem;
}

.panel-topbar .logo-tagline {
    color: var(--slate-400);
    font-size: 0.62rem;
}

.panel-topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.panel-topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.panel-topbar-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.panel-topbar-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.panel-topbar-name {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
}

.panel-topbar-role {
    font-size: 0.65rem;
    color: var(--teal-400);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.panel-topbar-link {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-400);
    transition: all 0.2s;
}

.panel-topbar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.panel-topbar-logout:hover {
    background: rgba(192, 57, 43, 0.15);
    color: var(--error);
}

/* ============================================
   PANEL / DASHBOARD
   ============================================ */

.panel-layout {
    display: flex;
    min-height: 100vh;
    margin-top: var(--header-height);
}

.panel-sidebar {
    width: 260px;
    background: var(--slate-900);
    color: var(--white);
    padding: var(--space-xl) 0;
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-nav {
    list-style: none;
    padding: 0 var(--space-md);
}

.sidebar-nav-section {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--slate-500);
    padding: var(--space-lg) var(--space-md) var(--space-sm);
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.6rem var(--space-md);
    color: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 400;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.sidebar-nav li a.active {
    background: var(--teal-700);
    color: var(--white);
    font-weight: 500;
}

.sidebar-nav li a svg {
    width: 18px; height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-nav li a.active svg {
    opacity: 1;
}

.panel-main {
    flex: 1;
    margin-left: 260px;
    padding: var(--space-2xl);
    background: var(--slate-50);
    min-height: calc(100vh - var(--header-height));
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.panel-header h1 {
    font-size: 1.6rem;
    font-family: var(--font-body);
    font-weight: 700;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
}

.stat-card:nth-child(1)::after { background: var(--teal-500); }
.stat-card:nth-child(2)::after { background: var(--gold-500); }
.stat-card:nth-child(3)::after { background: var(--info); }
.stat-card:nth-child(4)::after { background: var(--success); }
.stat-card:nth-child(5)::after { background: var(--warning); }
.stat-card:nth-child(6)::after { background: var(--error); }

.stat-card-label {
    font-size: 0.78rem;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.stat-card-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: var(--space-xs) 0;
}

/* Panel tables */
.panel-card {
    background: var(--white);
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.panel-card-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--slate-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-card-header h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
}

.panel-card-body {
    padding: var(--space-xl);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate-500);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 2px solid var(--slate-100);
    background: var(--slate-50);
}

.data-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.88rem;
    color: var(--slate-700);
}

.data-table tr:hover td {
    background: var(--teal-50);
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-teal { background: var(--teal-100); color: var(--teal-800); }
.badge-gold { background: var(--gold-100); color: var(--gold-700); }
.badge-green { background: #e8f5e8; color: #1a5c1a; }
.badge-red { background: #fde8e8; color: #8b1a1a; }
.badge-blue { background: #d4edfc; color: #1a4971; }
.badge-gray { background: var(--slate-100); color: var(--slate-600); }

/* ============================================
   BLOG DETAIL
   ============================================ */

.blog-detail {
    max-width: 780px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-xl);
}

.blog-detail-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-2xl);
    max-height: 420px;
}

.blog-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-detail h1 {
    font-size: 2.2rem;
    margin-bottom: var(--space-md);
}

.blog-detail-meta {
    display: flex;
    gap: var(--space-xl);
    color: var(--slate-500);
    font-size: 0.85rem;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--slate-200);
}

.blog-detail-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--slate-700);
}

.blog-detail-content p {
    margin-bottom: var(--space-lg);
}

/* ============================================
   FILTER TABS
   ============================================ */

.filter-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.45rem 1.2rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--slate-600);
    background: var(--white);
    border: 1px solid var(--slate-200);
    text-decoration: none;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: var(--teal-400);
    color: var(--teal-700);
}

.filter-tab.active {
    background: var(--teal-700);
    color: var(--white);
    border-color: var(--teal-700);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    color: var(--slate-400);
}

.empty-state svg {
    width: 64px; height: 64px;
    margin-bottom: var(--space-lg);
    color: var(--slate-300);
}

.empty-state h3 {
    color: var(--slate-500);
    margin-bottom: var(--space-sm);
}

.empty-state p {
    font-size: 0.92rem;
}

/* ============================================
   PANEL SIDEBAR TOGGLE (mobile)
   ============================================ */

.panel-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.panel-sidebar-toggle:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.open {
    display: block;
}

/* ============================================
   TABLE SCROLL WRAPPER (mobile-friendly)
   ============================================ */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* --- Tablet (1024px) --- */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; gap: var(--space-2xl); }
    .hero-image { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }

    /* Panel: sidebar as slide-over */
    .panel-sidebar-toggle { display: flex; }

    .panel-sidebar {
        position: fixed;
        left: -280px;
        top: var(--header-height);
        bottom: 0;
        width: 270px;
        z-index: 200;
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .panel-sidebar.open {
        left: 0;
        box-shadow: var(--shadow-xl);
    }

    .panel-main {
        margin-left: 0;
    }

    /* Two-column grids in panel pages → stack */
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
}

/* --- Mobile (768px) --- */
@media (max-width: 768px) {
    :root { --header-height: 58px; }

    /* Public site header */
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-sm) var(--space-md);
        border-bottom: 1px solid var(--slate-100);
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 0.7rem var(--space-md); font-size: 0.92rem; }
    .mobile-toggle { display: block; }

    .logo img { height: 40px !important; }
    .logo-name { font-size: 0.85rem !important; }
    .logo-tagline { font-size: 0.58rem !important; }

    /* Hero */
    .hero { min-height: auto; padding-bottom: var(--space-2xl); }
    .hero h1 { font-size: 1.75rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-content { padding: var(--space-2xl) var(--space-md); }
    .hero-badge { font-size: 0.68rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }

    .hero-stat-bar {
        position: relative;
        bottom: 0;
        left: 0; right: 0;
        margin: var(--space-xl) var(--space-md) 0;
        flex-direction: row;
        gap: 0;
        padding: var(--space-md);
    }
    .hero-stat { flex: 1; }
    .hero-stat-number { font-size: 1.3rem; }
    .hero-stat-label { font-size: 0.65rem; }

    /* Sections */
    .section { padding: var(--space-2xl) 0; }
    .section-header { margin-bottom: var(--space-2xl); }
    .section-header h2 { font-size: 1.4rem; }
    .section-header p { font-size: 0.9rem; }
    .section-label { font-size: 0.65rem; }

    /* Grids */
    .services-grid { grid-template-columns: 1fr; gap: var(--space-md); }
    .services-grid .service-card { padding: var(--space-lg); }
    .testimonials-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }

    /* Blog cards */
    .blog-card-image { height: 180px; }

    /* Contact */
    .contact-grid { grid-template-columns: 1fr; }

    /* Page header */
    .page-header { padding: var(--space-2xl) 0 var(--space-xl); }
    .page-header h1 { font-size: 1.5rem; }

    /* CTA */
    .cta-content { padding: var(--space-2xl) 0; }
    .cta-content h2 { font-size: 1.4rem; }
    .cta-actions { flex-direction: column; align-items: stretch; }
    .cta-actions .btn { width: 100%; justify-content: center; }

    /* Blog detail */
    .blog-detail { padding: var(--space-xl) var(--space-md); }
    .blog-detail h1 { font-size: 1.5rem; }
    .blog-detail-meta { flex-wrap: wrap; gap: var(--space-sm); font-size: 0.78rem; }

    /* Footer */
    .footer-bottom { flex-direction: column; gap: var(--space-md); text-align: center; }

    /* Auth pages */
    .auth-card { padding: var(--space-xl); max-width: 100%; }
    .auth-page { padding: var(--space-md); }
    .auth-logo img { height: 52px; }
    .auth-logo h2 { font-size: 1.2rem; }

    /* ---- PANEL MOBILE ---- */

    /* Panel topbar */
    .panel-topbar-info { display: none; }
    .panel-topbar .logo-text { display: none; }
    .panel-topbar-inner { padding: 0 var(--space-md); }

    /* Panel sidebar */
    .panel-sidebar { width: 260px; left: -270px; }

    /* Panel main */
    .panel-main { padding: var(--space-md); }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        margin-bottom: var(--space-lg);
    }

    .panel-header h1 { font-size: 1.25rem; }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

    .stat-card {
        padding: var(--space-md);
    }

    .stat-card-value { font-size: 1.5rem; }
    .stat-card-label { font-size: 0.68rem; }

    /* Panel cards */
    .panel-card { border-radius: var(--radius-md); margin-bottom: var(--space-md); }
    .panel-card-header { padding: var(--space-md); }
    .panel-card-header h3 { font-size: 0.9rem; }
    .panel-card-body { padding: var(--space-md); }

    /* Data tables → horizontal scroll */
    .panel-card { overflow: hidden; }
    .data-table {
        font-size: 0.78rem;
        min-width: 600px;
    }
    .data-table th, .data-table td {
        padding: var(--space-sm) var(--space-md);
        white-space: nowrap;
    }

    /* Wrap panel-card around tables for scrolling */
    .panel-card:has(.data-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Filter tabs */
    .filter-tabs { gap: var(--space-xs); margin-bottom: var(--space-lg); }
    .filter-tab { padding: 0.35rem 0.8rem; font-size: 0.75rem; }

    /* Buttons */
    .btn-sm { padding: 0.4rem 0.8rem; font-size: 0.78rem; }
    .btn { padding: 0.65rem 1.25rem; font-size: 0.85rem; }
    .btn-lg { padding: 0.8rem 1.5rem; font-size: 0.9rem; }

    /* Forms on mobile */
    .form-control { padding: 0.65rem 0.85rem; font-size: 0.88rem; }
    .form-label { font-size: 0.82rem; }

    /* Two-column layouts in session detail, client detail, etc. → stack */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Reports 4-col grid → 2-col */
    [style*="grid-template-columns:repeat(4,1fr)"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Flash messages */
    .flash-messages {
        left: var(--space-md);
        right: var(--space-md);
        max-width: none;
    }

    /* Testimonial card */
    .testimonial-card { padding: var(--space-lg); }
    .testimonial-content { font-size: 0.88rem; }

    /* Service cards inline grids → stack */
    .services-grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* About mission box */
    .mission-box { padding: var(--space-md); }
    .mission-box p { font-size: 1rem; }

    /* Empty state */
    .empty-state { padding: var(--space-2xl) var(--space-md); }
}

/* --- Small Mobile (480px) --- */
@media (max-width: 480px) {
    .container { padding: 0 var(--space-md); }

    .hero h1 { font-size: 1.5rem; }

    .stats-grid { grid-template-columns: 1fr; gap: var(--space-sm); }

    .hero-stat-bar { flex-direction: column; gap: var(--space-sm); }

    .footer-contact-item { font-size: 0.82rem; }

    /* Session detail 3-col form grids → stack */
    [style*="grid-template-columns: 1fr 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns:2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Blog edit max-width → full */
    .panel-card[style*="max-width"] {
        max-width: 100% !important;
    }

    /* Contact info cards */
    .contact-info-card { flex-direction: column; gap: var(--space-sm); }

    /* Auth two-col name fields → stack */
    .auth-card [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* --- Touch-friendly interactions --- */
@media (hover: none) and (pointer: coarse) {
    .btn { min-height: 44px; }
    .sidebar-nav li a { padding: 0.75rem var(--space-md); min-height: 44px; }
    .filter-tab { min-height: 36px; display: inline-flex; align-items: center; }
    .data-table td, .data-table th { padding: var(--space-md); }
    .form-control { min-height: 44px; }
}
