/**
 * EVVolve Website Stylesheet
 * 
 * Design System (from colors.png and uiwhite.png):
 * - Primary: Deep Teal (#2A5B5E)
 * - Accent: Soft Mint (#C3D0C5)
 * - Background: Cream (#F6F4EF) / UI White (#FAF9F6)
 * - Text: Charcoal Navy (#2A2F35)
 * 
 * Typography:
 * - Headings: Montserrat
 * - Body: Source Serif Pro
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
    /* Colors - Using style guide colors only */
    --color-primary: #2A5B5E;  /* Deep Teal */
    --color-primary-dark: #1D2328;  /* Deep Blue-Black */
    --color-primary-light: #4D5B60;  /* Slate Blue */
    --color-accent: #C3D0C5;  /* Soft Mint */
    --color-accent-dark: #4D5B60;  /* Slate Blue */
    --color-accent-light: #C3D0C5;  /* Soft Mint */
    
    --color-bg: #FAF9F6;  /* UI White */
    --color-bg-alt: #F6F4EF;  /* Cream */
    --color-surface: #FFFFFF;
    
    --color-text: #2A2F35;  /* Charcoal Navy */
    --color-text-muted: #4D5B60;  /* Slate Blue */
    --color-text-light: #4D5B60;  /* Slate Blue */
    --color-text-inverse: #FFFFFF;
    
    --color-border: #E0DED8;
    --color-border-light: #EEEDEA;
    
    /* Success/Error states */
    --color-success: #2D7D46;
    --color-error: #C53030;
    
    /* Typography - Style Guide */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Source Serif Pro', serif;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --header-height: 80px;
    
    /* Borders & Shadows */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-light);
}

ul, ol {
    list-style: none;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
    color: var(--color-text-inverse);
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-16) 0;
}

.section-lg {
    padding: var(--space-24) 0;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #F9F4EB; /* Logo background color */
    border-bottom: 1px solid var(--color-border-light);
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.logo-image {
    height: 60px;
    width: auto;
    display: block;
}


.logo-text {
    font-family: 'Montserrat', var(--font-heading), sans-serif;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--sg-charcoal-navy);
    letter-spacing: -0.02em;
}

/* Hide logo text when using transparent logo (contains full logo with text) */
.logo img[src*="logotransparent.png"] + .logo-text,
.logo img[src*="logo.png"] + .logo-text {
    display: none;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-list a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
    padding: var(--space-2) 0;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--color-primary);
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    z-index: 101;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: transform var(--transition-fast);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    bottom: -7px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-text-inverse);
}

.btn-accent {
    background: var(--color-text-inverse);
    color: var(--color-primary);
    border-color: var(--color-text-inverse);
}

.btn-accent:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: var(--space-20) 0;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 100%
    );
    color: var(--color-text-inverse);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
}

.hero h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-6);
    color: var(--color-text-inverse);
}

.hero h1 .accent-text {
    color: var(--color-accent);
    display: block;
}

.hero-lead {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
}

/* Hero with Company Name */
.hero h1.hero-company-name,
.hero .hero-company-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 6rem !important;
    font-weight: 700;
    color: var(--sg-ui-white) !important;
    margin: 0 0 var(--space-6);
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .hero h1.hero-company-name,
    .hero .hero-company-name {
        font-size: 3rem !important;
    }
}

.hero-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: var(--text-4xl);
    font-weight: 600;
    color: var(--sg-ui-white);
    margin: 0 0 var(--space-6);
    text-align: center;
}

.hero-heading .accent-text {
    color: var(--sg-soft-mint);
    display: block;
}

/* ============================================
   FEATURE CARDS
   ============================================ */

.features {
    background: var(--color-surface);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-header h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.section-header p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
}

.feature-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    font-size: var(--text-2xl);
}

.feature-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    text-align: center;
}

.cta-section h2 {
    color: var(--color-text-inverse);
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* White outline button variant for CTA sections */
.btn-outline-white {
    background: transparent;
    color: var(--color-text-inverse);
    border-color: var(--color-text-inverse);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-text-inverse);
    color: var(--color-text-inverse);
}

/* Hero actions centering */
.hero-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
}

.hero-actions.center {
    justify-content: center;
}

/* Benefit lists with checkmarks */
.benefit-list {
    margin-top: var(--space-4);
    padding-left: var(--space-5);
    list-style: none;
}

.benefit-list li {
    margin-bottom: var(--space-2);
    display: flex;
    align-items: start;
}

.benefit-list .checkmark {
    color: var(--color-primary);
    margin-right: var(--space-2);
    flex-shrink: 0;
}

.benefit-list-large {
    margin-top: var(--space-6);
    list-style: none;
    padding: 0;
}

.benefit-list-large li {
    margin-bottom: var(--space-4);
    display: flex;
    align-items: start;
}

.benefit-list-large .checkmark {
    color: var(--color-primary);
    margin-right: var(--space-3);
    font-size: var(--text-xl);
    flex-shrink: 0;
}

/* Content image styling */
.content-image-logo {
    background: transparent;
    padding: var(--space-8);
}

.content-image-logo img {
    max-width: 100%;
    height: auto;
    border: 2px solid var(--sg-slate-blue);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-text-inverse);
    padding: var(--space-16) 0;
    text-align: center;
}

.page-header h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
    color: var(--color-text-inverse);
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-lg);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
    padding: var(--space-16) 0;
}

.content-section:nth-child(even) {
    background: var(--color-surface);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.content-grid.reverse {
    direction: rtl;
}

.content-grid.reverse > * {
    direction: ltr;
}

.content-text h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

.content-text p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.content-image {
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: var(--text-sm);
}

/* ============================================
   SERVICES LIST
   ============================================ */

.services-list {
    display: grid;
    gap: var(--space-6);
}

.service-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-6);
    transition: all var(--transition-base);
}

.service-item:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.service-number {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.service-content h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.service-content p {
    color: var(--color-text-muted);
}

/* ============================================
   CONTACT FORM
   ============================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
}

.contact-info h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

.contact-info > p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

.contact-details {
    display: grid;
    gap: var(--space-6);
}

.contact-item {
    display: flex;
    gap: var(--space-4);
}

.contact-item-icon {
    width: 48px;
    height: 48px;
    background: var(--sg-deep-teal);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--text-xl);
    color: var(--sg-ui-white);
}

.contact-item-icon svg {
    width: 24px;
    height: 24px;
    color: var(--sg-ui-white);
}

.contact-item-text h3 {
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
}

.contact-item-text p,
.contact-item-text a {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.contact-form-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(42, 91, 94, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    width: 100%;
}

/* Form messages */
.form-message {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
}

.form-message.success {
    background: #E6F4EA;
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.form-message.error {
    background: #FDECEA;
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

/* ============================================
   TEAM SECTION
   ============================================ */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
}

.team-card {
    text-align: center;
}

.team-photo {
    width: 160px;
    height: 160px;
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    margin: 0 auto var(--space-5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: var(--text-sm);
}

.team-card h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-1);
}

.team-card .role {
    color: var(--color-accent-dark);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-3);
}

.team-card p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-brand .logo-text {
    color: var(--color-text-inverse);
    margin-bottom: var(--space-4);
    display: block;
}

.footer-tagline {
    opacity: 0.8;
    font-size: var(--text-sm);
}

.footer-links h3,
.footer-contact h3 {
    color: var(--color-text-inverse);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-5);
}

.footer-links ul,
.footer-contact ul {
    display: grid;
    gap: var(--space-3);
}

.footer-links a,
.footer-contact a {
    color: var(--color-text-inverse);
    opacity: 0.8;
    font-size: var(--text-sm);
    transition: opacity var(--transition-fast);
}

.footer-links a:hover,
.footer-contact a:hover {
    opacity: 1;
    color: var(--color-text-inverse);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-8);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--text-sm);
    opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    :root {
        --text-5xl: 2.75rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .content-grid.reverse {
        direction: ltr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .logo-text {
        font-size: var(--text-lg);
    }
    
    .hero {
        padding: var(--space-12) 0;
    }
    
    .hero h1 {
        font-size: var(--text-3xl);
    }
    
    .section {
        padding: var(--space-12) 0;
    }
    
    .section-lg {
        padding: var(--space-16) 0;
    }
    
    /* Mobile navigation */
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: var(--color-surface);
        flex-direction: column;
        align-items: stretch;
        padding: calc(var(--header-height) + var(--space-8)) var(--space-6) var(--space-8);
        gap: var(--space-6);
        transform: translateX(100%);
        transition: transform var(--transition-base);
        box-shadow: var(--shadow-xl);
    }
    
    .main-nav.is-open {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-1);
    }
    
    .nav-list a {
        display: block;
        padding: var(--space-3) var(--space-4);
        border-radius: var(--radius-md);
    }
    
    .nav-list a:hover,
    .nav-list a.active {
        background: var(--color-bg-alt);
    }
    
    .nav-list a::after {
        display: none;
    }
    
    .nav-cta {
        margin-top: auto;
    }
    
    /* Mobile hamburger animation */
    .mobile-menu-toggle[aria-expanded="true"] .hamburger {
        background: transparent;
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .hamburger::before {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .hamburger::after {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .service-item {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* ============================================
   ADMIN MODAL STYLES
   ============================================ */

.hidden {
    display: none !important;
}

/* Modal overlay */
#createModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

#createModal.hidden {
    display: none !important;
}

/* Modal content */
#createModal > div {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: var(--color-bg-alt);
}

table th {
    padding: var(--space-3);
    text-align: left;
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table td {
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

table tbody tr:hover {
    background: var(--color-bg-alt);
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* Form grid for filters */
.form-grid {
    display: grid;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* ============================================
   ENHANCED UI COMPONENTS
   ============================================ */

/* Enhanced Service Cards with Icon Backgrounds */
.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-8);
}

.service-card-enhanced {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid var(--color-border-light);
    position: relative;
    overflow: hidden;
}

.service-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.service-card-enhanced:hover::before {
    transform: scaleX(1);
}

.service-icon-wrapper {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
    box-shadow: 0 4px 6px rgba(42, 91, 94, 0.2);
    transition: transform 0.3s ease;
}

.service-card-enhanced:hover .service-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.service-icon {
    width: 32px;
    height: 32px;
    color: var(--color-text-inverse);
    stroke-width: 2;
}

.service-card-enhanced h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
    line-height: 1.3;
}

.service-card-enhanced p {
    color: var(--color-text-muted);
    line-height: 1.7;
    font-size: var(--text-base);
}

/* Enhanced Feature Cards */
.features-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-8);
}

.feature-card-enhanced {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid var(--color-border-light);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}


.feature-card-enhanced h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
    line-height: 1.3;
}

.feature-card-enhanced p {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-6);
    flex-grow: 1;
}

.benefit-list-enhanced {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-list-enhanced li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    color: var(--color-text);
    line-height: 1.6;
}

.benefit-list-enhanced li:last-child {
    margin-bottom: 0;
}

.check-icon {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Typography Examples */
.typography-examples {
    max-width: 800px;
    margin: 0 auto;
}

.typography-examples h1 {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.typography-examples h2 {
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
    line-height: 1.3;
}

.typography-examples h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-text);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
    line-height: 1.4;
}

.typography-examples h4 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text);
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
    line-height: 1.4;
}

.typography-examples p {
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

.typography-examples .lead {
    font-size: var(--text-lg);
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: var(--space-6);
}

.typography-examples .text-muted {
    color: var(--color-text-muted);
    font-size: var(--text-base);
}

/* Button Examples */
.button-examples {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
    justify-content: center;
}

/* Enhanced Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 91, 94, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 91, 94, 0.2);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    border-color: var(--color-accent);
}

.btn-accent:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(195, 208, 197, 0.3);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

/* Section Alt Background */
.section-alt {
    background: var(--color-bg);
}

/* Style Guide Section Backgrounds */
.section.style-guide-cream {
    background: var(--sg-cream);
}

.section.style-guide-mint {
    background: var(--sg-soft-mint);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-cards-grid,
    .features-grid-enhanced {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .service-card-enhanced,
    .feature-card-enhanced {
        padding: var(--space-6);
    }
    
    .button-examples {
        flex-direction: column;
        align-items: stretch;
    }
    
    .button-examples .btn {
        width: 100%;
    }
}

/* ============================================
   STYLE GUIDE SPECIFIC STYLES
   ============================================ */

/* Style Guide Colors (from colors.png and uiwhite.png) */
:root {
    --sg-cream: #F6F4EF;             /* Cream - background */
    --sg-deep-teal: #2A5B5E;         /* Deep Teal - primary brand color */
    --sg-soft-mint: #C3D0C5;         /* Soft Mint - accent/background */
    --sg-slate-blue: #4D5B60;        /* Slate Blue - secondary text */
    --sg-charcoal-navy: #2A2F35;     /* Charcoal Navy - primary text */
    --sg-deep-blue-black: #1D2328;   /* Deep Blue-Black - deep accent */
    --sg-ui-white: #FAF9F6;          /* UI White - clean white background */
}

/* Style Guide Typography */
.style-guide-header {
    background: linear-gradient(135deg, var(--sg-deep-blue-black) 0%, var(--sg-slate-blue) 100%);
    color: var(--color-text-inverse);
}

.style-guide-title {
    font-family: 'Montserrat', var(--font-heading), sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sg-charcoal-navy);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.style-guide-subtitle {
    font-family: 'Montserrat', var(--font-body), sans-serif;
    font-size: 1.25rem;
    color: var(--sg-slate-blue);
    margin-bottom: 0.5rem;
}

.style-guide-tagline {
    font-family: 'Source Serif Pro', serif;
    font-size: 1.125rem;
    font-style: italic;
    color: var(--sg-charcoal-navy);
    margin-top: 1rem;
}

/* Color Palette Display */
.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.color-swatch {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border-light);
}

.color-box {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-info h4 {
    font-family: 'Montserrat', var(--font-heading), sans-serif;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--sg-charcoal-navy);
    margin-bottom: var(--space-2);
}

.color-code {
    font-family: 'Montserrat', monospace;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--sg-slate-blue);
    margin-bottom: var(--space-1);
}

.color-rgb {
    font-family: 'Montserrat', var(--font-body), sans-serif;
    font-size: var(--text-sm);
    color: var(--sg-slate-blue);
}

/* Style Guide Typography Examples */
.typography-examples h1,
.typography-examples h2,
.typography-examples h3,
.typography-examples h4 {
    font-family: 'Montserrat', var(--font-heading), sans-serif;
}

.typography-examples h1 {
    color: var(--sg-charcoal-navy);
    margin-bottom: 2.5rem; /* 40px equivalent */
}

.typography-examples h2 {
    color: var(--sg-charcoal-navy);
    margin-top: 2.25rem; /* 36px equivalent */
    margin-bottom: 1.5rem;
}

.typography-examples .lead {
    font-family: 'Source Serif Pro', serif;
    color: var(--sg-charcoal-navy);
    margin-bottom: 2rem; /* 32px equivalent */
}

/* Style Guide Service Cards */
.service-card-enhanced.style-guide {
    border-top: 4px solid var(--sg-deep-teal);
    background: var(--sg-cream);
}

.service-card-enhanced.style-guide .service-icon-wrapper {
    background: var(--sg-deep-teal);
    box-shadow: 0 4px 6px rgba(42, 91, 94, 0.2);
}

/* Feature cards use exact same icon styling as service cards */
.feature-card-enhanced .service-icon-wrapper {
    background: var(--sg-deep-teal);
    box-shadow: 0 4px 6px rgba(42, 91, 94, 0.2);
}

.feature-card-enhanced:hover .service-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.feature-card-enhanced h3 {
    color: var(--sg-charcoal-navy);
    font-family: 'Montserrat', var(--font-heading), sans-serif;
    font-weight: 600;
}

.feature-card-enhanced p {
    font-family: 'Source Serif Pro', serif;
    color: var(--sg-slate-blue);
    line-height: 1.7;
}

.service-card-enhanced.style-guide:hover {
    border-color: var(--sg-deep-teal);
    box-shadow: 0 10px 25px rgba(42, 91, 94, 0.15), 0 4px 10px rgba(42, 91, 94, 0.1);
    background: var(--color-surface);
}

.service-card-enhanced.style-guide:hover::before {
    background: linear-gradient(90deg, var(--sg-deep-teal), var(--sg-slate-blue));
}

.service-card-enhanced.style-guide h3 {
    color: var(--sg-charcoal-navy);
    font-family: 'Montserrat', var(--font-heading), sans-serif;
    font-weight: 600;
}

.service-card-enhanced.style-guide p {
    font-family: 'Source Serif Pro', serif;
    color: var(--sg-slate-blue);
    line-height: 1.7;
}

/* Style Guide Buttons */
.btn-style-guide {
    background: var(--sg-deep-teal);
    color: var(--color-text-inverse);
    border-color: var(--sg-deep-teal);
    font-family: 'Montserrat', var(--font-body), sans-serif;
}

.btn-style-guide:hover {
    background: var(--sg-slate-blue);
    border-color: var(--sg-slate-blue);
    box-shadow: 0 4px 12px rgba(42, 91, 94, 0.3);
}

.btn-style-guide-outline {
    background: transparent;
    color: var(--sg-deep-teal);
    border-color: var(--sg-deep-teal);
    font-family: 'Montserrat', var(--font-body), sans-serif;
}

.btn-style-guide-outline:hover {
    background: var(--sg-deep-teal);
    color: var(--color-text-inverse);
    box-shadow: 0 4px 12px rgba(42, 91, 94, 0.2);
}

/* Soft Mint accent button for CTAs */
.btn-style-guide-accent {
    background: var(--sg-soft-mint);
    color: var(--sg-charcoal-navy);
    border-color: var(--sg-soft-mint);
    font-family: 'Montserrat', var(--font-body), sans-serif;
}

.btn-style-guide-accent:hover {
    background: var(--sg-deep-teal);
    color: var(--color-text-inverse);
    border-color: var(--sg-deep-teal);
    box-shadow: 0 4px 12px rgba(42, 91, 94, 0.3);
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .page-header h1 {
        font-size: var(--text-2xl);
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
