/* ================================
   Modern Attorney Job Board CSS
   Pure HTML/CSS Design
   ================================ */

/* CSS Variables */
:root {
    /* Colors */
    --navy-deep: #0a1e3d;
    --navy-primary: #1a365d;
    --navy-medium: #2d4a6f;
    --gold-accent: #c9a668;
    --gold-light: #e4d4b4;
    --cream: #f8f6f1;
    --white: #ffffff;
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --green:#031b1d;
    
    /* Shadows */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-hard: 0 8px 24px rgba(0, 0, 0, 0.25);
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Container */
    --container-width: 1200px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy-deep);
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

/* ================================
   HEADER
   ================================ */

.site-header {
    background: #031b1d;
    border-bottom: 1px solid #333;
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy-deep);
    margin: 0;
}

.main-nav {
    display: flex;
    gap: var(--space-md);
}

.nav-link {
    color: var(--gold-accent);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--gold-accent);
    background: var(--cream);
}

@media (max-width: 768px) {
    .main-nav {
        gap: var(--space-xs);
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 14px;
    }
}

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

.hero {
    background: #031b1d;
    color: var(--white);
    padding: var(--space-2xl) 0;
    text-align: center;
    
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    color: var(--white);
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--space-sm);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--gold-light);
    margin-bottom: var(--space-lg);
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    font-size: 16px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 4px 20px rgba(201, 166, 104, 0.3);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

/* ================================
   FILTERS SECTION
   ================================ */

.filters-section {
    background: #031b1d;
    padding: var(--space-lg) 0;
   
}

.filters-section h3 {
    color: var(--white);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    color: var(--gold-accent);
    font-weight: 600;
    font-size: 14px;
}

.filter-select {
    padding: 10px 12px;
    border: 2px solid #333;
    border-radius: var(--radius-md);
    background: #031b1d;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--gold-accent);
}

.filter-select option {
    background: #031b1d;
    color: var(--white);
}

.clear-btn {
    padding: 10px 24px;
    background: var(--gold-accent);
    color: #000;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
}

.filter-chip {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--navy-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-chip:hover {
    background: var(--cream);
    border-color: var(--gold-accent);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--gold-accent) 0%, #d4b57a 100%);
    color: var(--white);
    border-color: transparent;
}

/* ================================
   JOBS SECTION
   ================================ */

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

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    margin-bottom: var(--space-xs);
}

.section-subtitle {
    color: var(--text-medium);
    font-size: 1.1rem;
}

/* Jobs Grid */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (max-width: 768px) {
    .jobs-grid {
        grid-template-columns: 1fr;
    }
}

/* Job Card */
.job-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold-accent), #d4b57a);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.job-card:hover {
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

.job-card:hover::before {
    opacity: 1;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xs);
}

.job-title {
    font-size: 1.25rem;
    color: var(--navy-deep);
    margin: 0;
    flex: 1;
}

.job-badge {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.remote-badge {
    background: var(--gold-light);
    color: var(--navy-deep);
}

.job-firm {
    font-size: 16px;
    color: var(--text-medium);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.job-meta {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 14px;
    color: var(--text-medium);
}

.job-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.job-tag {
    padding: 4px 12px;
    background: var(--cream);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-primary);
}

.salary-tag {
    background: var(--gold-light);
    border-color: var(--gold-accent);
}

.job-description {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
}

.job-posted {
    font-size: 13px;
    color: var(--text-light);
}

.btn-apply {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--navy-deep), var(--navy-primary));
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.btn-contact {
    padding: 10px 20px;
    background: #d4b57a;
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-contact:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.job-card {
    cursor: pointer;
}

/* ================================
   MODAL
   ================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--white);
    margin: 3% auto;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: var(--shadow-hard);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 32px;
    font-weight: bold;
    color: var(--text-medium);
    cursor: pointer;
    line-height: 1;
    z-index: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--gold-accent);
}

.modal-header {
    margin-bottom: var(--space-lg);
    padding-right: 40px;
}

.modal-header h2 {
    color: var(--navy-deep);
    margin-bottom: var(--space-sm);
    font-size: 2rem;
}

.modal-subtitle {
    color: var(--gold-accent);
    font-size: 1.1rem;
    font-weight: 600;
    margin: var(--space-xs) 0;
}

.modal-description {
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.6;
}

.modal-job-details {
    background: var(--cream);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border-left: 4px solid var(--gold-accent);
}

.modal-job-details h3 {
    color: var(--navy-deep);
    margin-bottom: var(--space-sm);
    font-size: 1.5rem;
}

.modal-job-details p {
    margin-bottom: var(--space-xs);
    color: var(--text-dark);
    font-size: 15px;
}

.modal-job-details strong {
    color: var(--navy-deep);
    font-weight: 600;
}

.job-description-full {
    color: var(--text-dark);
    line-height: 1.8;
    white-space: pre-wrap;
    margin: var(--space-md) 0;
    font-size: 15px;
}

.modal-section {
    margin-bottom: var(--space-lg);
}

.modal-section h4 {
    color: var(--navy-deep);
    margin-bottom: var(--space-sm);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--gold-accent);
    padding-bottom: 8px;
}

.modal-disclaimer {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border-left: 4px solid var(--gold-accent);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
    box-shadow: 0 2px 8px rgba(201, 166, 104, 0.15);
}

.modal-disclaimer p {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 15px;
}

.modal-disclaimer p:last-child {
    margin-bottom: 0;
}

.modal-disclaimer strong {
    color: var(--navy-deep);
    font-weight: 600;
    font-size: 16px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    color: var(--navy-deep);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(201, 166, 104, 0.1);
}

.submit-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--gold-accent), #d4b57a);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--space-sm);
    box-shadow: 0 2px 8px rgba(201, 166, 104, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 166, 104, 0.4);
}

/* ================================
   PAGINATION
   ================================ */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: var(--space-xl);
    padding: 0 20px;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--navy-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: var(--cream);
    border-color: var(--gold-accent);
    transform: translateY(-2px);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--gold-accent), #d4b57a);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(201, 166, 104, 0.3);
}

@media (max-width: 768px) {
    .pagination {
        gap: 6px;
        margin-top: var(--space-md);
    }
    
    .page-btn {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
}

.page-ellipsis {
    color: var(--text-light);
    padding: 0 4px;
}

/* ================================
   LOADING & STATES
   ================================ */

.loading {
    text-align: center;
    padding: var(--space-2xl) 0;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--gold-accent);
    border-radius: 50%;
    margin: 0 auto var(--space-sm);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: var(--space-2xl) 0;
    color: var(--text-medium);
    font-size: 1.1rem;
}

.error-message {
    text-align: center;
    padding: var(--space-2xl) 0;
    color: var(--text-medium);
}

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

.site-footer {
    background: #031b1d;
    color: var(--white);
    padding: var(--space-xl) 0 var(--space-md);
    margin-top: var(--space-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-section h3,
.footer-section h4 {
    color: var(--gold-accent);
    margin-bottom: var(--space-sm);
}

.footer-section p,
.footer-section a {
    color: var(--cream);
    opacity: 0.9;
}

.footer-section a {
    display: block;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--gold-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--cream);
    opacity: 0.8;
}

/* ================================
   ACCESSIBILITY
   ================================ */

*:focus-visible {
    outline: 3px solid var(--gold-accent);
    outline-offset: 2px;
}

::selection {
    background: var(--gold-accent);
    color: var(--white);
}

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

@media (max-width: 768px) {
    .hero {
        padding: var(--space-lg) 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    .jobs-section {
        padding: var(--space-lg) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-md);
    }
    
    .job-card {
        padding: var(--space-sm);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* ================================
   ANIMATIONS
   ================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-card {
    animation: fadeIn 0.6s ease-out;
}

/* Stagger animation for grid items */
.job-card:nth-child(1) { animation-delay: 0.05s; }
.job-card:nth-child(2) { animation-delay: 0.1s; }
.job-card:nth-child(3) { animation-delay: 0.15s; }
.job-card:nth-child(4) { animation-delay: 0.2s; }
.job-card:nth-child(5) { animation-delay: 0.25s; }
.job-card:nth-child(6) { animation-delay: 0.3s; }

/* Smooth scrolling for modern browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
    }
    
    .job-card {
        border-width: 3px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--navy-medium);
    border-radius: 6px;
    border: 3px solid var(--cream);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-accent);
}

.search-highlight {
            background-color: #ffd700;
            color: #1a1a2e;
            font-weight: 600;
            padding: 2px 4px;
            border-radius: 3px;
            box-shadow: 0 1px 3px rgba(255, 215, 0, 0.3);
        }
        
        /* Hamburger Menu Styles */
        .hamburger {
            display: none;
            flex-direction: column;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 10px;
            z-index: 1001;
        }
        
        .hamburger span {
            display: block;
            width: 28px;
            height: 3px;
            background-color: white;
            transition: all 0.3s ease;
            border-radius: 3px;
        }
        
        .hamburger.active span:nth-child(1) {
            transform: rotate(45deg) translate(8px, 8px);
        }
        
        .hamburger.active span:nth-child(2) {
            opacity: 0;
        }
        
        .hamburger.active span:nth-child(3) {
            transform: rotate(-45deg) translate(7px, -7px);
        }
        
        /* Mobile Navigation Styles */
        @media (max-width: 768px) {
            .hamburger {
                display: flex;
            }
            
            .main-nav {
                position: fixed;
                top: 70px;
                right: -100%;
                width: 250px;
                height: calc(100vh - 70px);
                background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
                flex-direction: column;
                padding: 30px 20px;
                gap: 0;
                box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
                transition: right 0.3s ease;
                z-index: 1000;
            }
            
            .main-nav.active {
                right: 0;
            }
            
            .main-nav .nav-link {
                padding: 15px 20px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                width: 100%;
                text-align: left;
            }
            
            .main-nav .nav-link:hover {
                background: rgba(201, 166, 104, 0.1);
            }
            
            .main-nav .nav-link.active {
                background: rgba(201, 166, 104, 0.2);
                border-left: 4px solid var(--gold-accent);
            }
        }

        /* Prevent zoom on input focus (iOS) and horizontal scroll */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;     /* No horizontal scroll */
        width: 100%;            /* Fixed width */
        position: relative;
    }
    
    .search-input,
    input,
    textarea,
    select {
        font-size: 16px !important;  /* Prevents iOS auto-zoom */
    }
    
    .container {
        overflow-x: hidden;
        max-width: 100%;
    }
}