/* Job Application Platform - Custom Styles */

/* Global Styles */
:root {
    --primary-color: #F5A623;
    --primary-dark: #E09515;
    --secondary-color: #135E69;
    --secondary-light: #1A7A88;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    --footer-color: #135E69;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: #333;
    line-height: 1.6;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--card-hover-shadow);
}

.job-card {
    cursor: pointer;
    height: 100%;
}

.job-card .card-body {
    padding: 1.5rem;
}

.job-card .card-title {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.job-meta .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
}

/* Form Styles */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.form-section h3 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    color: #555;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(19, 94, 105, 0.25);
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Alert Styles */
.alert-permanent {
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(245, 166, 35, 0);
    }
}

.alert .alert-link {
    font-weight: 700;
    text-decoration: underline;
}

/* Submit Button Hover Effect */
.submit-btn:hover {
    background-color: #E09515 !important;
    border-color: #E09515 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 160, 58, 0.4) !important;
}

.submit-btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(244, 160, 58, 0.5) !important;
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(244, 160, 58, 0.3) !important;
}

/* Form Validation */
.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

/* Navbar Styles */
.navbar {
    background-color: #F4A03A !important;
}

.navbar-brand {
    font-size: 1.4rem;
    color: #fff !important;
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

.nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.95) !important;
    position: relative;
    padding: 0.5rem 1rem;
}

.nav-link:hover {
    opacity: 0.8;
    color: #fff !important;
}

/* Active Navigation Link Styling - Higher specificity to override Bootstrap */
.navbar .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(244, 160, 58, 0.3) !important;
    color: #F4A03A !important;
    font-weight: 700 !important;
    border-radius: 0.375rem;
    border-left: 4px solid #F4A03A !important;
    padding-left: calc(1rem - 4px) !important;
    box-shadow: 0 2px 8px rgba(244, 160, 58, 0.3);
    text-shadow: 0 0 1px rgba(244, 160, 58, 0.5);
}

.navbar .navbar-nav .nav-link.active:hover,
.navbar-dark .navbar-nav .nav-link.active:hover {
    background-color: rgba(244, 160, 58, 0.4) !important;
    color: #F4A03A !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-section .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.hero-section .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

/* Application Form Cards */
.application-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    border-left: 4px solid var(--secondary-color);
}

.application-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Conditional Fields */
.conditional-field {
    display: none;
    animation: fadeIn 0.3s ease;
}

.conditional-field.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dynamic Row Styles */
.dynamic-row {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    position: relative;
}

.remove-row-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Table Styles */
.table-responsive {
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 1rem;
}

.table thead {
    background-color: var(--secondary-color);
    color: white;
}

.table thead th {
    font-weight: 600;
    border: none;
}

/* Status Badges */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-new {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-under-review {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-pending {
    background-color: #fff8e1;
    color: #f9a825;
}

.status-interview {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.status-rejected {
    background-color: #ffebee;
    color: #d32f2f;
}

.status-hired {
    background-color: #e0f2f1;
    color: #00796b;
}

/* Dashboard Stats */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-card .stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Alert Customization */
.alert {
    border-radius: 8px;
    border: none;
}

/* Pagination */
.pagination .page-link {
    color: var(--secondary-color);
    border-radius: 4px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading-spinner.show {
    display: block;
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: var(--warning-color);
}

.char-counter.error {
    color: var(--danger-color);
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.5rem;
    background-color: #e0e0e0;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
}

.strength-weak {
    width: 33%;
    background-color: var(--danger-color);
}

.strength-medium {
    width: 66%;
    background-color: var(--warning-color);
}

.strength-strong {
    width: 100%;
    background-color: var(--success-color);
}

/* Footer Styles */
footer {
    background-color: var(--footer-color) !important;
}

footer h5 {
    color: var(--primary-color);
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer a {
    color: rgba(255, 255, 255, 0.9);
}

footer a:hover {
    color: var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .form-section,
    .application-card {
        padding: 1.5rem;
    }
    
    .job-meta {
        flex-direction: column;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Hero Banner Styles */
.hero-banner {
    background: linear-gradient(135deg, #135E69 0%, #1A7A88 50%, #20c997 100%);
    min-height: 75vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.min-vh-75 {
    min-height: 75vh;
}

.z-2 {
    z-index: 2;
}

.hero-banner h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-banner .lead {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Hero Button Styles */
.hero-btn {
    background-color: #F4A03A;
    border-color: #F4A03A;
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

.hero-btn:hover,
.hero-btn:focus {
    background-color: #E09515;
    border-color: #E09515;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 160, 58, 0.4);
}

.hero-btn:active {
    transform: translateY(0);
}

/* Benefit Cards */
.benefit-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.benefit-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, #F4A03A 0%, #E09515 100%);
}

.benefit-card:hover .benefit-icon i {
    color: white !important;
}

/* Benefits List - Compact Vertical Layout */
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.benefit-item:last-child {
    border-bottom: none;
}

.benefit-item:hover {
    background-color: #f8f9fa;
}

.benefit-icon-small {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.benefit-icon-small i {
    font-size: 1.5rem;
}

.benefit-content {
    flex: 1;
}

.benefit-title {
    font-size: 1rem;
    font-weight: 600;
    color: #135E69;
    margin-bottom: 0.25rem;
}

/* Profile Page Styles - Compact */
.profile-header {
    padding: 1.5rem 0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Tab Navigation */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: #F4A03A;
    color: #F4A03A;
}

.nav-tabs .nav-link.active {
    border-color: #135E69;
    color: #135E69;
    background: transparent;
}

/* Compact Table Styles */
.table {
    font-size: 0.875rem;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Animation */
.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small Action Buttons */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn-xs.btn-outline-primary {
    border-width: 1px;
}

/* ============================================
   Profile Page Mobile Responsiveness
   ============================================ */

/* Prevent horizontal overflow on profile page */
.profile-page,
.profile-page .container,
.profile-page .card {
    max-width: 100%;
    overflow-x: hidden;
}

/* Card header responsive layout */
.profile-page .card-header {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.profile-page .card-header .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

/* Email text wrapping */
.profile-page .card-header .text-white {
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    font-size: 0.85rem;
}

/* Responsive buttons in card header */
.profile-page .card-header .btn {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Table responsive improvements */
.profile-page .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.profile-page .table {
    min-width: 600px; /* Ensures table doesn't squish too much */
}

/* Job title text wrapping */
.profile-page .table td strong {
    word-break: break-word;
    overflow-wrap: break-word;
    display: inline-block;
    max-width: 100%;
}

/* Mobile-specific styles */
@media (max-width: 767.98px) {
    /* Container adjustments */
    .profile-page .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Card adjustments */
    .profile-page .card {
        margin-left: -5px;
        margin-right: -5px;
        border-radius: 0;
    }
    
    /* Card header mobile layout */
    .profile-page .card-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .profile-page .card-header > h6 {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .profile-page .card-header .d-flex {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    /* Email full width on mobile */
    .profile-page .card-header .text-white {
        width: 100%;
        text-align: left;
        margin-bottom: 0.5rem;
        padding: 0.25rem 0;
    }
    
    /* Buttons full width on mobile */
    .profile-page .card-header .btn {
        width: 100%;
        margin-bottom: 0.25rem;
        white-space: nowrap;
    }
    
    /* Profile header mobile adjustments */
    .profile-page .profile-header h1 {
        font-size: 1.25rem;
    }
    
    .profile-page .profile-header i {
        font-size: 2.5rem !important;
    }
    
    /* Table mobile improvements */
    .profile-page .table-responsive {
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Smaller font sizes on mobile */
    .profile-page .table {
        font-size: 0.8rem;
    }
    
    .profile-page .table th,
    .profile-page .table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Action buttons easier to tap on mobile */
    .profile-page .btn-xs {
        padding: 0.375rem 0.5rem;
        font-size: 0.85rem;
        min-width: 36px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Extra small devices */
@media (max-width: 575.98px) {
    .profile-page .container {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .profile-page .card {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .profile-page .profile-header h1 {
        font-size: 1.1rem;
    }
    
    .profile-page .profile-header .btn {
        font-size: 0.85rem;
        padding: 0.375rem 0.75rem;
    }
}
