/**
 * ============================================================================
 * PROJECT 3 - CALIFORNIA INHERITANCE GROUP
 * Luke Carr, Peter Kennedy, Tanner Nielson, Luke Miller
 *
 * public/css/main.css - Main Stylesheet
 * Contains all styling for the California Inheritance Group employee portal
 * including navigation, hero sections, forms, tables, and responsive design.
 * ============================================================================
 */

/* ================================
   California Inheritance Group
   Main Stylesheet
   ================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ================================
   Navigation
   ================================ */
nav {
    position: fixed;
    width: 100%;
    background: #00396B;
    padding: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    height: 45px;
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    display: inline-block;
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.nav-links a:hover {
    color: #7FB3D5;
}

.nav-links a.nav-btn {
    background: #ffffff;
    color: #00396B;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.nav-links a.nav-btn:hover {
    background: #f0f0f0;
    color: #00396B;
}

/* ================================
   Hero Section
   ================================ */
.hero {
    min-height: 100vh;
    background: #00396B;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 70px;
    overflow: hidden;
}

/* Background Video */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

/* Semi-transparent blue overlay on top of video */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 57, 107, 0.85) 0%, rgba(0, 77, 140, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: #fff;
    z-index: 1;
    max-width: 900px;
    padding: 0 2rem;
    animation: fadeIn 0.8s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: #7FB3D5;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #ffffff;
    color: #00396B;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.cta-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* Page Hero (smaller) */
.page-hero {
    background: #00396B;
    padding: 8rem 2rem 4rem;
    text-align: center;
    color: #fff;
}

.page-hero-small {
    padding: 6rem 2rem 3rem;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.page-hero .hero-subtitle {
    font-size: 1.1rem;
    color: #7FB3D5;
}

/* ================================
   Features Section
   ================================ */
.features {
    padding: 6rem 2rem;
    background: #ffffff;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #00396B;
    font-weight: 300;
    letter-spacing: -0.01em;
}

.section-subtitle {
    text-align: center;
    color: #666666;
    margin-bottom: 4rem;
    font-size: 1.1rem;
    font-weight: 400;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #ffffff;
    padding: 2.5rem;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #00396B;
    box-shadow: 0 4px 20px rgba(0, 57, 107, 0.08);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: #00396B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #00396B;
    font-weight: 600;
}

.feature-card p {
    color: #555555;
    line-height: 1.7;
}

/* ================================
   Stats Section
   ================================ */
.stats {
    padding: 5rem 2rem;
    background: #f7f7f7;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-item h2 {
    font-size: 3rem;
    color: #00396B;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.stat-item p {
    font-size: 1rem;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* ================================
   Contact Section
   ================================ */
.contact {
    padding: 6rem 2rem;
    background: #ffffff;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content>p {
    color: #555555;
    margin-bottom: 2rem;
}

.contact-info {
    background: #00396B;
    padding: 3rem;
    color: #fff;
    margin-top: 2rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.phone {
    font-size: 2rem;
    font-weight: 300;
    color: #fff;
    margin: 1.5rem 0;
    letter-spacing: 0.05em;
}

.email {
    color: #7FB3D5;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.email:hover {
    color: #ffffff;
}

/* ================================
   Team Image
   ================================ */
.team-image {
    padding: 4rem 2rem;
    background: #f7f7f7;
}

.group-photo {
    width: 100%;
    max-width: 1000px;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* ================================
   Footer
   ================================ */
footer {
    background: #00396B;
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    letter-spacing: 0.02em;
}

/* ================================
   Testimonials
   ================================ */
.testimonials-section {
    padding: 4rem 2rem;
    background: #ffffff;
}

.testimonials-header {
    text-align: center;
    margin-bottom: 4rem;
}

.testimonials-image {
    max-width: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: #f9f9f9;
    border-left: 4px solid #00396B;
    padding: 2rem;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: #444;
    line-height: 1.8;
    font-size: 0.95rem;
}

.testimonial-author strong {
    color: #00396B;
    font-weight: 600;
}

/* ================================
   Login Page
   ================================ */
.login-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #00396B 0%, #004d8c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 2rem 2rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: #ffffff;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-box h1 {
    color: #00396B;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.login-footer a {
    color: #00396B;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ================================
   Forms
   ================================ */
.form-section {
    padding: 4rem 2rem;
    background: #f7f7f7;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00396B;
    box-shadow: 0 0 0 3px rgba(0, 57, 107, 0.1);
}

.form-hint {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-group {
    margin-bottom: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.checkbox-text {
    color: #555;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ================================
   Buttons
   ================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    text-align: center;
}

.btn-primary {
    background: #00396B;
    color: #fff;
}

.btn-primary:hover {
    background: #004d8c;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e5e5e5;
    color: #333;
}

.btn-secondary:hover {
    background: #d5d5d5;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ================================
   Alerts
   ================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-error {
    background: #fde8e8;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-success {
    background: #e6fffa;
    color: #234e52;
    border: 1px solid #81e6d9;
}

/* ================================
   Employees Section
   ================================ */
.employees-section {
    padding: 4rem 2rem;
    background: #f7f7f7;
    min-height: 50vh;
}

.employees-actions {
    margin-bottom: 2rem;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #00396B;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.data-table tr:hover {
    background: #f9f9f9;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.inline-form {
    display: inline;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 20px;
}

.badge-admin {
    background: #00396B;
    color: #fff;
}

.badge-user {
    background: #e5e5e5;
    color: #555;
}

/* Employee Card (User View) */
.employee-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

.employee-card-header {
    background: #00396B;
    color: #fff;
    padding: 2rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.employee-card-header h2 {
    font-weight: 400;
    font-size: 1.5rem;
}

.employee-card-header .badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.employee-card-body {
    padding: 2rem;
}

.employee-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.info-item label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.info-item p {
    font-size: 1.1rem;
    color: #333;
}

.employee-card-footer {
    padding: 1.5rem 2rem;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
    text-align: center;
}

/* User Profile Container (centers the card) */
.user-profile-container {
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* User Directory Section (for regular users) */
.user-directory-section {
    margin-top: 2rem;
    max-width: 100%;
}

.user-directory-section .section-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.user-directory-section .section-subtitle {
    margin-bottom: 2rem;
}

.user-directory-section .data-table td a {
    color: #00396B;
    text-decoration: none;
}

.user-directory-section .data-table td a:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #888;
}

/* ================================
   Table Controls (Search/Filter/Sort)
   ================================ */
.table-controls {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.search-container {
    flex: 1;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #00396B;
    box-shadow: 0 0 0 3px rgba(0, 57, 107, 0.1);
}

.search-input::placeholder {
    color: #999;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filter-select {
    padding: 0.75rem 2rem 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: #00396B;
    box-shadow: 0 0 0 3px rgba(0, 57, 107, 0.1);
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-filter label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.date-filter span {
    color: #888;
    font-size: 0.9rem;
}

.filter-date {
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
}

.filter-date:focus {
    outline: none;
    border-color: #00396B;
    box-shadow: 0 0 0 3px rgba(0, 57, 107, 0.1);
}

.controls-actions {
    display: flex;
    gap: 0.5rem;
}

.results-count {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Sortable Headers */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: #003357;
}

.sort-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    vertical-align: middle;
}

.sortable.sort-asc .sort-icon::after {
    content: '▲';
    font-size: 0.65rem;
}

.sortable.sort-desc .sort-icon::after {
    content: '▼';
    font-size: 0.65rem;
}

/* Responsive adjustments for controls */
@media (max-width: 992px) {
    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        width: 100%;
    }

    .filters-container {
        justify-content: flex-start;
    }

    .date-filter {
        flex-wrap: wrap;
        width: 100%;
    }
}

/* ================================
   Error Page
   ================================ */
.error-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 2rem 2rem;
    background: #f7f7f7;
}

.error-content {
    text-align: center;
    max-width: 500px;
}

.error-code {
    font-size: 8rem;
    font-weight: 300;
    color: #00396B;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.error-description {
    color: #666;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .nav-links {
        display: none;
    }

    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .employee-info-grid {
        grid-template-columns: 1fr;
    }

    .error-code {
        font-size: 5rem;
    }

    .actions-cell {
        flex-direction: column;
    }
}