/**
 * SAP Career Portal Styles
 * SAP branded career site with official colors and styling
 */

/* SAP Brand Colors */
:root {
    --sap-gold: #F0AB00;
    --sap-gold-dark: #D49400;
    --sap-blue: #0A6ED1;
    --sap-blue-dark: #0854A0;
    --sap-dark-blue: #354A5F;
    --sap-navy: #1B2D45;
    --sap-light-gray: #F5F6F7;
    --sap-text: #32363A;
    --sap-text-light: #6A6D70;
    --sap-white: #FFFFFF;
    --sap-success: #107E3E;
    --sap-border: #E5E5E5;
}

/* Base styles */
body {
    font-family: '72', 'SAP 72', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--sap-light-gray);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--sap-text);
}

/* Navigation - SAP Style */
.navbar {
    background: var(--sap-white) !important;
    border-bottom: 1px solid var(--sap-border);
    padding: 12px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--sap-navy) !important;
}

.navbar-brand img {
    height: 32px;
}

.navbar .badge {
    background-color: var(--sap-gold) !important;
    color: var(--sap-navy);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 8px 16px;
    border-radius: 4px;
}

/* Hero Section - SAP Gradient */
.career-hero {
    background: linear-gradient(135deg, var(--sap-navy) 0%, var(--sap-dark-blue) 50%, var(--sap-blue) 100%);
    color: var(--sap-white);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.career-hero::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");
    opacity: 0.5;
}

.career-hero .container {
    position: relative;
    z-index: 1;
}

.career-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.career-hero .lead {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.career-hero .sap-tagline {
    display: inline-block;
    background: var(--sap-gold);
    color: var(--sap-navy);
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .career-hero {
        padding: 40px 15px;
    }

    .career-hero h1 {
        font-size: 1.85rem;
    }

    .career-hero .lead {
        font-size: 1rem;
    }
}

/* Search & Filter Bar - SAP Card Style */
.career-search-bar {
    background: var(--sap-white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: -35px;
    margin-bottom: 28px;
    position: relative;
    z-index: 10;
    border: 1px solid var(--sap-border);
}

.career-search-bar .form-control,
.career-search-bar .form-select {
    border-radius: 4px;
    border: 1px solid var(--sap-border);
    padding: 10px 14px;
    font-size: 0.95rem;
    color: var(--sap-text);
}

.career-search-bar .form-control:focus,
.career-search-bar .form-select:focus {
    border-color: var(--sap-blue);
    box-shadow: 0 0 0 3px rgba(10, 110, 209, 0.15);
}

.career-search-bar .form-control::placeholder {
    color: var(--sap-text-light);
}

.career-search-bar .input-group-text {
    background: var(--sap-light-gray);
    border: 1px solid var(--sap-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: var(--sap-text-light);
}

.career-search-bar .btn-outline-secondary {
    border-color: var(--sap-border);
    color: var(--sap-text);
    border-radius: 4px;
}

.career-search-bar .btn-outline-secondary:hover {
    background: var(--sap-light-gray);
    border-color: var(--sap-blue);
    color: var(--sap-blue);
}

.job-type-filters {
    padding-top: 16px;
    border-top: 1px solid var(--sap-border);
    margin-top: 16px;
}

.job-type-filters .form-check-input:checked {
    background-color: var(--sap-blue);
    border-color: var(--sap-blue);
}

@media (max-width: 768px) {
    .career-search-bar {
        margin-top: -25px;
        padding: 18px;
    }

    .job-type-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Job Cards - Clean Professional Design */
.job-card {
    background: var(--sap-white);
    border: 1px solid var(--sap-border);
    border-radius: 8px;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--sap-blue);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(27, 45, 69, 0.12);
    border-color: var(--sap-blue);
}

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

.job-card .card-body {
    padding: 20px;
}

/* Clean badges - all same subtle style */
.job-card .badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.job-card .badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: var(--sap-light-gray);
    color: var(--sap-text-light);
    border: 1px solid var(--sap-border);
}

.job-card .badge.dept-badge {
    background: rgba(10, 110, 209, 0.08);
    color: var(--sap-blue);
    border-color: rgba(10, 110, 209, 0.15);
}

.job-card .badge.new-badge {
    background: var(--sap-blue);
    color: white;
    border-color: var(--sap-blue);
}

.job-card .job-title {
    color: var(--sap-navy);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 8px;
    transition: color 0.2s;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-card:hover .job-title {
    color: var(--sap-blue);
}

.job-card .job-location {
    font-size: 0.85rem;
    color: var(--sap-text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.job-card .job-location svg {
    width: 14px;
    height: 14px;
    color: var(--sap-text-light);
    flex-shrink: 0;
}

/* Job description snippet */
.job-card .job-snippet {
    font-size: 0.85rem;
    color: var(--sap-text-light);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Job meta info */
.job-card .job-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--sap-border);
    font-size: 0.8rem;
    color: var(--sap-text-light);
}

.job-card .job-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.job-card .job-meta-item svg {
    width: 13px;
    height: 13px;
    opacity: 0.6;
}

/* Clean Button Style */
.job-card .btn-view-job {
    background: var(--sap-blue);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
}

.job-card .btn-view-job:hover {
    background: var(--sap-blue-dark);
}

.job-card .btn-view-job svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.job-card:hover .btn-view-job svg {
    transform: translateX(2px);
}

/* Empty State */
.empty-icon {
    font-size: 4rem;
    color: var(--sap-border);
}

/* Pagination - SAP Style */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 24px 0;
}

.pagination-controls .btn {
    border-radius: 4px;
    padding: 8px 20px;
    font-weight: 600;
}

.pagination-controls .btn-outline-primary {
    border-color: var(--sap-blue);
    color: var(--sap-blue);
}

.pagination-controls .btn-outline-primary:hover {
    background: var(--sap-blue);
    border-color: var(--sap-blue);
    color: var(--sap-white);
}

.pagination-controls .btn:disabled {
    opacity: 0.4;
}

/* Job Detail Modal - SAP Fiori Style */
#jobDetailModal .modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 16px 48px rgba(27, 45, 69, 0.2);
}

#jobDetailModal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

#jobDetailModal .modal-body {
    padding: 20px 28px 28px;
}

.job-detail h3 {
    font-weight: 700;
    color: var(--sap-navy);
    margin-bottom: 8px;
}

.job-detail .badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 6px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.job-detail .badge.bg-primary {
    background: var(--sap-blue) !important;
}

.job-detail .badge.bg-secondary {
    background: var(--sap-dark-blue) !important;
}

.job-detail .badge.bg-success-subtle {
    background: rgba(16, 126, 62, 0.1) !important;
    color: var(--sap-success) !important;
}

.job-detail h6 {
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--sap-text-light);
    font-size: 0.75rem;
    margin-top: 24px;
}

.job-description,
.job-qualifications,
.job-company {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--sap-text);
}

.job-description ul,
.job-qualifications ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.job-description li,
.job-qualifications li {
    margin-bottom: 8px;
}

/* Apply Button - SAP Gold Accent */
.job-detail .btn-primary.btn-lg {
    background: var(--sap-blue);
    border-color: var(--sap-blue);
    border-radius: 4px;
    font-weight: 600;
    padding: 14px 24px;
    font-size: 1rem;
}

.job-detail .btn-primary.btn-lg:hover {
    background: var(--sap-blue-dark);
    border-color: var(--sap-blue-dark);
}

@media (max-width: 576px) {
    #jobDetailModal .modal-body {
        padding: 16px 20px 24px;
    }

    .job-detail h3 {
        font-size: 1.2rem;
    }
}

/* Footer - SAP Dark Style */
.career-footer {
    background: var(--sap-navy);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 28px 20px;
    margin-top: auto;
}

.career-footer p {
    font-size: 0.85rem;
    margin: 0;
}

.career-footer .sap-footer-logo {
    height: 24px;
    margin-bottom: 12px;
    opacity: 0.9;
}

/* Utility classes */
.bg-primary-subtle {
    background-color: rgba(10, 110, 209, 0.1) !important;
}

.bg-success-subtle {
    background-color: rgba(16, 126, 62, 0.1) !important;
}

.text-sap-gold {
    color: var(--sap-gold) !important;
}

.text-sap-blue {
    color: var(--sap-blue) !important;
}

/* Results info */
#resultsInfo {
    font-size: 0.9rem;
    color: var(--sap-text-light);
}

/* Scrollbar styling */
#jobDetailModal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#jobDetailModal .modal-body::-webkit-scrollbar-track {
    background: var(--sap-light-gray);
    border-radius: 3px;
}

#jobDetailModal .modal-body::-webkit-scrollbar-thumb {
    background: var(--sap-border);
    border-radius: 3px;
}

#jobDetailModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--sap-text-light);
}

/* Card Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-card {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.col-lg-4:nth-child(1) .job-card,
.col-md-6:nth-child(1) .job-card { animation-delay: 0.03s; }
.col-lg-4:nth-child(2) .job-card,
.col-md-6:nth-child(2) .job-card { animation-delay: 0.06s; }
.col-lg-4:nth-child(3) .job-card,
.col-md-6:nth-child(3) .job-card { animation-delay: 0.09s; }
.col-lg-4:nth-child(4) .job-card,
.col-md-6:nth-child(4) .job-card { animation-delay: 0.12s; }
.col-lg-4:nth-child(5) .job-card,
.col-md-6:nth-child(5) .job-card { animation-delay: 0.15s; }
.col-lg-4:nth-child(6) .job-card,
.col-md-6:nth-child(6) .job-card { animation-delay: 0.18s; }
.col-lg-4:nth-child(7) .job-card { animation-delay: 0.21s; }
.col-lg-4:nth-child(8) .job-card { animation-delay: 0.24s; }
.col-lg-4:nth-child(9) .job-card { animation-delay: 0.27s; }
.col-lg-4:nth-child(10) .job-card { animation-delay: 0.3s; }
.col-lg-4:nth-child(11) .job-card { animation-delay: 0.33s; }
.col-lg-4:nth-child(12) .job-card { animation-delay: 0.36s; }

/* Loading spinner - SAP Blue */
.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--sap-blue) !important;
}

/* Focus states for accessibility */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--sap-gold);
    outline-offset: 2px;
}

/* ========================================
   PARALLAX HERO SECTION
   ======================================== */
.career-hero-parallax {
    background:
        linear-gradient(135deg, rgba(27, 45, 69, 0.85) 0%, rgba(53, 74, 95, 0.8) 50%, rgba(10, 110, 209, 0.75) 100%),
        url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1920&q=80');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    min-height: 280px;
}

.career-hero-parallax .hero-overlay {
    display: none;
}

@media (max-width: 768px) {
    .career-hero-parallax {
        background-attachment: scroll;
        min-height: 220px;
    }
}

/* ========================================
   COMPANY CULTURE SECTION
   ======================================== */
.culture-section {
    padding: 40px 0 20px;
    background: var(--sap-white);
    margin-top: -20px;
    position: relative;
    z-index: 5;
}

.culture-card {
    text-align: center;
    padding: 28px 20px;
    background: var(--sap-light-gray);
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
}

.culture-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(27, 45, 69, 0.1);
}

.culture-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--sap-blue) 0%, var(--sap-dark-blue) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.culture-icon i {
    font-size: 1.5rem;
    color: white;
}

.culture-card h4 {
    font-weight: 600;
    color: var(--sap-navy);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.culture-card p {
    color: var(--sap-text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .culture-section {
        padding: 30px 0 15px;
    }

    .culture-card {
        padding: 20px 16px;
    }
}

/* ========================================
   BENEFITS OVERVIEW SECTION
   ======================================== */
.benefits-section {
    padding: 50px 0;
    background: var(--sap-light-gray);
    margin-top: 40px;
}

.benefits-section .section-title {
    font-weight: 700;
    color: var(--sap-navy);
    font-size: 1.75rem;
}

.benefit-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--sap-white);
    border-radius: 8px;
    border: 1px solid var(--sap-border);
    transition: all 0.25s ease;
    height: 100%;
}

.benefit-card:hover {
    border-color: var(--sap-blue);
    box-shadow: 0 4px 12px rgba(10, 110, 209, 0.1);
}

.benefit-card i {
    font-size: 1.5rem;
    color: var(--sap-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.benefit-card h5 {
    font-weight: 600;
    color: var(--sap-navy);
    font-size: 1rem;
    margin-bottom: 4px;
}

.benefit-card p {
    color: var(--sap-text-light);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .benefits-section {
        padding: 35px 0;
        margin-top: 30px;
    }

    .benefits-section .section-title {
        font-size: 1.4rem;
    }

    .benefit-card {
        padding: 16px;
    }
}

/* ========================================
   COOKIE CONSENT BANNER
   ======================================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sap-navy);
    color: white;
    z-index: 9999;
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease;
}

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

.cookie-consent.hiding {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.cookie-text i {
    font-size: 1.3rem;
    color: var(--sap-gold);
    flex-shrink: 0;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-actions .btn {
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 4px;
}

.cookie-actions .btn-outline-light {
    border-color: rgba(255,255,255,0.4);
}

.cookie-actions .btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.cookie-actions .btn-light {
    background: var(--sap-gold);
    border-color: var(--sap-gold);
    color: var(--sap-navy);
}

.cookie-actions .btn-light:hover {
    background: var(--sap-gold-dark);
    border-color: var(--sap-gold-dark);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-text {
        flex-direction: column;
        gap: 8px;
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   SOCIAL SHARE ON JOB CARDS
   ======================================== */
.job-card .share-buttons {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--sap-border);
}

.job-card .share-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--sap-border);
    background: var(--sap-white);
    color: var(--sap-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.85rem;
}

.job-card .share-btn:hover {
    border-color: var(--sap-blue);
    color: var(--sap-blue);
    background: rgba(10, 110, 209, 0.05);
}

.job-card .share-btn.copied {
    border-color: var(--sap-success);
    color: var(--sap-success);
    background: rgba(16, 126, 62, 0.05);
}

.job-card .share-btn i {
    font-size: 0.9rem;
}
