/* ==========================================================================
   TNAADO Careers Page - Corporate Design (Matching Team Page)
   ========================================================================== */

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

:root {
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg-white: #ffffff;
    --bg-subtle: #f8fafc;
    --accent: #A01D26;
    --accent-dark: #8b1920;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 120px 24px 64px;
    background: linear-gradient(135deg, var(--text-primary) 0%, #1e293b 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(160, 29, 38, 0.2);
    color: #f87171;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 24px;
    border: 1px solid rgba(160, 29, 38, 0.3);
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

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

.hero-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.hero-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    margin-bottom: 40px;
}

.section-header.center {
    text-align: center;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ===== WHY JOIN SECTION ===== */
.why-join-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.benefit-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.benefit-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(160, 29, 38, 0.1);
}

.benefit-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 20px;
}

.benefit-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.benefit-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== CULTURE SECTION ===== */
.culture-section {
    padding: 80px 0;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.culture-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 64px;
    align-items: start;
}

.culture-text h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.culture-text p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.culture-values {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.culture-value {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.culture-value-icon {
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.culture-value-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.culture-value-text p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ===== TEAM SECTION ===== */
.team-section {
    padding: 80px 0;
    background: var(--bg-white);
}

/* Founder Card */
.founder-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 40px;
    background: linear-gradient(135deg, var(--text-primary) 0%, #1e293b 100%);
    border-radius: 16px;
    margin-bottom: 40px;
    align-items: center;
}

.founder-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.founder-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-initials {
    font-size: 48px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.founder-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.founder-title {
    font-size: 16px;
    color: #f87171;
    font-weight: 500;
    margin-bottom: 20px;
}

.founder-bio p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 12px;
}

.founder-links {
    margin-top: 20px;
}

.founder-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #f87171;
    text-decoration: none;
    transition: color 0.2s ease;
}

.founder-link:hover {
    color: white;
}

/* Leadership Grid */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.leader-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.leader-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(160, 29, 38, 0.08);
}

.leader-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
}

.leader-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leader-initials {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-muted);
}

.leader-info h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.leader-role {
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.leader-bio {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.team-cta {
    text-align: center;
}

/* ===== DEPARTMENTS SECTION ===== */
.departments-section {
    padding: 80px 0;
    background: var(--bg-subtle);
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.department-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.department-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(160, 29, 38, 0.1);
}

.dept-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto 16px;
}

.department-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.department-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== POSITIONS SECTION ===== */
.positions-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.positions-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.position-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.position-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(160, 29, 38, 0.1);
    transform: translateY(-2px);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.position-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.position-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(160, 29, 38, 0.1);
    padding: 4px 10px;
    border-radius: 50px;
    white-space: nowrap;
}

.position-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.position-meta span {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.position-meta i {
    color: var(--accent);
    font-size: 12px;
}

.position-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

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

.position-salary {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.position-salary i {
    color: var(--accent);
    margin-right: 4px;
}

.position-apply {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
}

/* ===== APPLICATION SECTION ===== */
.application-section {
    padding: 80px 0;
    background: var(--bg-subtle);
}

.application-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.application-header {
    background: linear-gradient(135deg, var(--text-primary) 0%, #1e293b 100%);
    padding: 40px;
    text-align: center;
}

.application-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.application-header p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.application-body {
    padding: 40px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.required {
    color: var(--accent);
}

.form-input,
.form-select,
.form-textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    background: var(--accent-dark);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alert */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--text-primary) 0%, #1e293b 100%);
    padding: 80px 0;
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.cta-container h2 {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cta-container > p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-block;
    padding: 14px 28px;
    background: var(--accent);
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: var(--bg-subtle);
}

.btn-outline {
    display: inline-block;
    padding: 14px 28px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===== JOB MODAL ===== */
.job-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.job-modal.active {
    display: flex;
}

.job-modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.job-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-subtle);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.job-modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.job-detail {
    padding: 40px;
}

.job-detail-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.job-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.job-tag {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.job-tag i {
    color: var(--accent);
    font-size: 12px;
}

.job-detail-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.job-detail-body h3:first-child {
    margin-top: 0;
}

.job-detail-body p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.job-detail-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ===== LOADING & EMPTY STATES ===== */
.loading-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
    margin: 0 auto 20px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state > p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 24px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .departments-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .hero-section {
        padding: 100px 24px 48px;
    }

    .hero-section h1 {
        font-size: 36px;
    }

    .hero-stats {
        gap: 32px;
    }

    .hero-stat-value {
        font-size: 28px;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .culture-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .founder-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .founder-photo {
        margin: 0 auto;
    }

    .departments-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .positions-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 600px) {
    .hero-section {
        padding: 90px 16px 40px;
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

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

    .hero-actions a {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 24px;
    }

    .benefits-grid,
    .departments-grid {
        grid-template-columns: 1fr;
    }

    .founder-card {
        padding: 24px;
    }

    .founder-photo {
        width: 120px;
        height: 120px;
    }

    .founder-initials {
        font-size: 36px;
    }

    .founder-content h3 {
        font-size: 24px;
    }

    .positions-filters {
        gap: 6px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .application-header,
    .application-body {
        padding: 24px;
    }

    .cta-container h2 {
        font-size: 28px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons a {
        width: 100%;
        text-align: center;
    }

    .job-detail {
        padding: 24px;
    }

    .job-detail-header h2 {
        font-size: 22px;
    }

    .why-join-section,
    .culture-section,
    .team-section,
    .departments-section,
    .positions-section,
    .application-section {
        padding: 48px 0;
    }
}
