:root {
    --teal: #00555a;
    --mimosa: #ffc94b;
    --bg-light: #f4f7f6;
}
body {
    background-color: var(--bg-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.text-teal { color: var(--teal) !important; }
.bg-teal { background-color: var(--teal) !important; color: white; }
.text-mimosa { color: var(--mimosa) !important; }

/* Action Buttons */
.btn-mimosa {
    background-color: var(--mimosa);
    color: #000;
    font-weight: 600;
    border: none;
    transition: background-color 0.2s ease;
}
.btn-mimosa:hover {
    background-color: #e5b443;
}

/* Tourism Cards */
.tourism-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    height: 100%;
    min-height: 295px; /* Aligns all cards globally */
    display: flex;
    flex-direction: column;
}
.tourism-card:hover {
    /* Kept the soft shadow overlay accentuation but completely halted spatial movement */
    transform: none !important;
    box-shadow: 0 12px 20px rgba(0,85,90,0.1);
}
.news-img-top {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.action-icons button {
    background: none;
    border: none;
    color: var(--teal);
    font-size: 1.2rem;
    transition: color 0.2s;
}
.action-icons button:hover { color: var(--mimosa); }

/* Breadcrumbs */
.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}
.breadcrumb-item a {
    color: var(--teal);
    text-decoration: none;
}
.breadcrumb-item a:hover {
    text-decoration: underline;
}
.breadcrumb-item.active {
    color: #6c757d;
}

/* Form Controls */
.form-select-sm, .form-control-sm {
    font-size: 0.875rem;
}

/* Unified Global Header for ALL Pages (Including Homepage) */
.hero-section, .page-header {
    background-color: var(--teal);
    background-image: linear-gradient(rgba(0, 85, 90, 0.9), rgba(0, 85, 90, 0.9)), url('https://images.unsplash.com/photo-1572252009286-268acec5ca0a?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    padding: 60px 0;
    color: white;
}

.hero-search-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom Navbar - Fixed to Top */
.navbar-custom {
    position: sticky !important;
    top: 0 !important;
    width: 100%;
    z-index: 1050 !important;
    background-color: var(--teal);
    padding: 15px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.navbar-custom .nav-link {
    color: #f4f7f6;
    font-weight: 500;
    transition: color 0.3s;
}
.navbar-custom .nav-link:hover {
    color: var(--mimosa);
}
.footer-custom {
    background-color: var(--teal);
    color: #fff;
    padding: 40px 0 20px;
}

/* Utility */
.btn-outline-teal {
    border: 2px solid var(--teal);
}
.btn-outline-teal:hover {
    background-color: var(--teal);
    color: white;
}

/* 1. Navbar & Sidebar Fix */
.navbar-custom {
    z-index: 1050 !important;
}
.sticky-top, .sticky-sidebar {
    top: 100px;
    z-index: 1020;
}

/* 2. Enhanced Action Icons (Star for Save & Share) - NO TRANSITIONS, NO GLOW */
.action-icon-btn {
    background-color: transparent;
    border: none;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}
.action-icon-btn.save-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    padding: 0;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}
.action-icon-btn.share-btn:hover {
    color: var(--teal);
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Unified Icon Button Class - No Movement, No Glow */
.icon-btn {
    width: 32px;
    height: 32px;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 28px 28px;
    border: none;
    background-color: transparent;
    color: #6c757d;
    /* Completely remove all transform, transition, and box-shadow effects */
    transition: none !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
}

/* Favorite Star - Modular Component (.star-icon) - With Hover Effect */
.star-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    /* SVG star - Hollow/Outlined by default */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cccccc' stroke-width='2'%3E%3Cpolygon points='12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 28px 28px;
    /* Smooth transition for hover effect */
    transition: all 0.2s ease;
}
/* Hover State: Scale up and color change */
.star-icon:hover {
    transform: scale(1.15);
    filter: brightness(1.1);
}
/* Active State: Solid filled gold star */
.star-icon.active {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD700'%3E%3Cpolygon points='12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26'/%3E%3C/svg%3E");
}

/* Share Button (.share-btn) - Consistent dark gray, no movement, no glow */
.share-btn {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    transition: none !important;
    transform: none !important;
    filter: none !important;
}
/* Hover state: darker teal color */
.share-btn:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300555a'%3E%3Cpath d='M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z'/%3E%3C/svg%3E");
    transition: none !important;
    transform: none !important;
    filter: none !important;
}

/* Arabic Language Support */
[lang="ar"] body,
body[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}
[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}
[dir="rtl"] .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}
[dir="rtl"] .text-start {
    text-align: right !important;
}
[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Newsletter Section Styles */
.newsletter-section {
    background-color: var(--teal);
    color: white;
    padding: 60px 0;
    text-align: center;
}
.newsletter-section .form-control {
    border: none;
    border-radius: 50px 0 0 50px;
    padding: 10px 20px;
}
.newsletter-section .btn-subscribe {
    background-color: var(--mimosa);
    color: #000;
    font-weight: 600;
    border: none;
    border-radius: 0 50px 50px 0;
    padding: 10px 25px;
}
.newsletter-section .btn-subscribe:hover {
    background-color: #e5b443;
}
.newsletter-section .nl-message {
    margin-top: 15px;
    font-weight: bold;
    font-size: 0.875rem;
}
.newsletter-section .text-success-msg {
    color: var(--mimosa);
}
.newsletter-section .text-error-msg {
    color: #ffc107;
}

/* Profile Avatar */
.profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

/* Sidebar Navigation */
.sidebar-nav .nav-link {
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 8px;
}
.sidebar-nav .nav-link.active {
    background-color: var(--teal);
    color: white;
}

/* Profile Sidebar */
.profile-sidebar {
    top: 90px;
}

/* Display Utilities */
.display-1.text-teal {
    font-size: 5rem;
    color: var(--teal);
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* SortableJS CV Sections */
.sortable-item {
    cursor: move;
    padding: 10px;
    border-radius: 8px;
    transition: none !important;
}
.sortable-item:hover {
    background-color: #f8f9fa;
}
.sortable-ghost {
    opacity: 0.4;
    background-color: #e9ecef;
}

/* Inactive Job Posts - Show with opacity */
.job-inactive {
    opacity: 0.6;
}

/* Layout Utilities */
.max-w-600 { max-width: 600px; margin-left: auto; margin-right: auto; }

/* News View Layout */
.news-hero-img { max-height: 400px; object-fit: cover; width: 100%; }
.news-content { line-height: 1.9; font-size: 1.1rem; color: #6c757d; }

/* Action Buttons Container - Prevents overlapping */
.action-buttons-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Email Template Overrides */
.email-container { font-family: Arial, sans-serif; max-width: 600px; margin: auto; }
.email-header { color: var(--teal); margin-bottom: 5px; }
.email-card { background: var(--bg-light); padding: 15px; margin-bottom: 15px; border-left: 4px solid var(--mimosa); }
.email-footer { font-size: 0.9em; color: #777; }
.promo-card { background: var(--bg-light); padding: 20px; border-left: 4px solid var(--teal); margin-top: 20px; }
.news-card { background: #fff; border: 1px solid #ddd; padding: 20px; margin-top: 20px; }
.btn-cta { display: inline-block; background: var(--mimosa); color: #000; padding: 10px 20px; text-decoration: none; font-weight: bold; border-radius: 5px; }

/* ============================================
   Responsive Profile Adjustments
   ============================================ */
@media (max-width: 768px) {
    /* Profile Header */
    .profile-header { 
        padding: 10px; 
    }
    
    /* Profile Avatar */
    .profile-avatar { 
        width: 60px; 
        height: 60px; 
        font-size: 1.5rem;
    }
    
    /* User Info */
    .user-info h4 { 
        font-size: 1rem; 
    }
    
    /* Profile Sidebar */
    .profile-sidebar {
        top: 0;
        position: relative;
    }
    
    /* Tourism Cards */
    .tourism-card {
        padding: 15px;
    }
    
    /* Action Buttons */
    .action-buttons-container {
        flex-direction: column;
        gap: 10px;
    }
    
/* Form Controls */
    .form-control, .form-select {
        font-size: 0.875rem;
    }
}

/* ============================================
   Profile Header Mobile (Updated)
   ============================================ */
@media (max-width: 768px) {
    .profile-header-container {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .profile-avatar-circle {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
        margin: 0 auto 10px auto;
    }
    .profile-user-name {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }
    .profile-user-email {
        font-size: 0.85rem;
    }
}

/* ============================================
   Inactive Job Styling
   ============================================ */
.job-card-inactive {
    opacity: 0.6;
    filter: grayscale(80%);
}
.btn-apply-dark {
    background-color: #333 !important;
    color: #fff !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   Newsletter Form Elements
   ============================================ */
#newsletterForm {
    max-width: 500px;
}

.honeypot {
    position: absolute;
    left: -9999px;
}

/* ============================================
   CV Text - Line Height Utilities
   (Decoupled from view_cv.php)
   ============================================ */
.cv-text {
    line-height: 1.8;
}
.cv-text-pre {
    white-space: pre-line;
    line-height: 1.8;
}

/* Filter Sidebar Sticky Position
   (Decoupled from jobs.php) */
.filter-sidebar {
    top: 90px;
}

/* Job Description Text
   (Decoupled from job_view.php) */
.job-description {
    line-height: 1.8;
}

/* ============================================
   Contact Employer Button Consistency
   ============================================ */
/* Keep button consistent size - override Bootstrap .btn sizing */
#showEmailBtn.btn-contactemployer,
#showEmailBtn {
    min-width: 180px !important;
    min-height: 52px !important;
    width: 180px !important;
    /* Prevent any size change on click */
    flex: 0 0 180px !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
}

/* When container is shown, maintain button size - matches JavaScript class */
.btn-contact-expanded {
    min-width: 180px !important;
    min-height: 52px !important;
    width: 180px !important;
    flex: 0 0 180px !important;
}

/* ============================================
   Utility Label - Small Clean Badge
   (Replaces inline badge styles like "Easy Apply")
   ============================================ */
.label-utility {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}
.label-utility.easy-apply {
    background-color: var(--mimosa);
    color: #000;
}

/* توحيد شكل الـ Easy Apply في كل الموقع */
.badge.bg-warning.text-dark {
    font-size: 0.75rem !important; /* حجم صغير وأنيق */
    padding: 4px 8px !important;    /* تباعد داخلي مناسب */
    border-radius: 4px !important;  /* حواف دائرية خفيفة */
    display: inline-block;
    font-weight: 700 !important;
    text-transform: uppercase;
}

/* Job Reference Number Styling
   (Smaller font for job reference/serial number) */
.job-reference {
    font-size: 0.75rem; /* 12px */
    font-weight: 700;
}

/* Job Title Layout Lock (2-line clamp) */
.custom-job-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3rem; /* Dynamic reservation for 2 lines */
    line-height: 1.5rem;
}

/* فرض توحيد شكل الـ Badge في كل الموقع */
.badge.bg-warning {
    display: inline-block !important;
    width: auto !important; /* يمنع التمدد */
    font-size: 0.75rem !important;
    padding: 0.3em 0.6em !important;
    vertical-align: middle;
}

/* ============================================
   Modal Fixes - Prevent flickering
   ============================================ */
/* Ensure only one modal-backdrop exists */
.modal-backdrop {
    z-index: 1040 !important;
}
/* Remove any duplicate backdrops */
body.modal-open > .modal-backdrop:nth-child(n+2) {
    display: none !important;
}
/* Smooth modal transitions */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out !important;
}
/* Prevent body scroll jump when modal opens */
.modal-open {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
