/* ==============================================
   1. VARIABLES & GLOBAL SETTINGS
   ============================================== */
:root {
  --primary: #077c8c;
  --primary-hover: #056674;
  --secondary: #dfedf1;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --radius: 12px;
  --border-color: #e0e6f1;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(to bottom, rgba(223, 237, 241, 0.5) 0%, rgba(255, 255, 255, 0) 100%) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  padding-top: 80px;
  padding-bottom: 70px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: 0.3s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Utility Color Classes */
.text-theme {
  color: var(--primary) !important;
}

.bg-theme {
  background-color: var(--primary) !important;
}

/* ==============================================
   2. BUTTONS & INPUTS
   ============================================== */
.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  font-weight: 600;
  color: white !important;
  border-radius: 8px;
}

.btn-primary:hover,
.btn-primary:active {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  background-color: transparent !important;
  border-radius: 8px;
}

.btn-outline-primary:hover,
.btn-outline-primary:active {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.btn-cancel-custom {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #ced4da;
  font-weight: 500;
  transition: 0.3s ease;
  border-radius: 8px;
}

.btn-cancel-custom:hover {
  background-color: #e2e6ea;
  color: #495057;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  /* box-shadow: 0 0 0 0.25rem rgba(7, 124, 140, 0.25) !important; */
  outline: none;
}

.form-control,
.form-select {
  border-radius: 8px;
  padding: 10px 12px;
}

/* ==============================================
   3. PROFILE CARD COMPONENTS
   ============================================== */
.profile-card {
  background-color: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  margin-bottom: 1.5rem;
  width: 100%;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.card-body {
  padding: 1.5rem;
}

.card-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: #fff;
}

.card-section-title h5 {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.btn-edit {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: rgba(7, 124, 140, 0.08);
  padding: 5px 12px;
  border-radius: 12px;
  transition: 0.3s;
}

.btn-edit:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.saving-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
}

/* ==============================================
   4. SIDEBAR & QUICK LINKS
   ============================================== */
.profile-pic-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 1rem;
}

.profile-pic {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--secondary);
}

.profile-pic-upload-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 38px;
  height: 38px;
  background-color: var(--primary);
  color: #fff;
  border-radius: 50%;
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.profile-pic-upload-btn:hover {
  transform: scale(1.1);
}

.profile-completion-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #fff;
  border: 2px solid #ccc;
  color: #ccc;
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.profile-meta-list {
  list-style: none;
  padding-left: 0;
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

.profile-meta-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  color: #555;
}

.profile-meta-list i {
  width: 25px;
  margin-right: 10px;
  color: var(--primary);
  text-align: center;
}

.sticky-sidebar-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sticky-sidebar-item {
  position: sticky;
  top: 100px;
  z-index: 9;
}

.quick-links-card .list-group-item {
  border: none;
  padding: 0;
}

.quick-links-card .list-group-item a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-left: 3px solid transparent;
}

.quick-links-card .list-group-item a i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
  color: var(--text-light);
  transition: 0.3s;
}

.quick-links-card .list-group-item a:hover {
  color: var(--primary);
  background-color: #f8fcff;
  border-left-color: var(--primary);
}

.quick-links-card .list-group-item a:hover i {
  color: var(--primary);
}

/* ==============================================
   5. RESUME SECTION STYLING (IMPROVED)
   ============================================== */
.resume-list-wrapper {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Scroll Logic for "See More" */
.resume-list-scrollable {
  max-height: 280px;
  overflow-y: auto;
}

.resume-list-scrollable::-webkit-scrollbar {
  width: 6px;
}

.resume-list-scrollable::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.resume-list-scrollable::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.resume-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-bottom: 1px solid #dee2e6;
  padding: 15px 20px;
  transition: background 0.2s;
}

.resume-item:last-child {
  border-bottom: none;
}

.resume-item:hover {
  background-color: #f8f9fa;
}

.resume-info {
  display: flex;
  align-items: center;
  gap: 15px;
  overflow: hidden;
}

.resume-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  background-color: #fde8e8;
  color: #e74c3c;
  border-radius: 8px;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.resume-name {
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.resume-date {
  font-size: 0.75rem;
  color: #888;
}

.resume-actions {
  display: flex;
  gap: 12px;
}

.resume-actions a,
.resume-actions button {
  border: none;
  background: none;
  color: #95a5a6;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
  padding: 0;
}

.resume-actions .btn-view:hover {
  color: var(--primary);
}

.resume-actions .btn-download:hover {
  color: #27ae60;
}

.resume-actions .btn-delete:hover {
  color: #e74c3c;
}

/* Responsive text truncation */
@media (max-width: 500px) {
  .resume-name {
    max-width: 120px;
  }
}

/* ==============================================
   6. TAGS & VIEW GROUPS
   ============================================== */
.view-group {
  margin-bottom: 1.2rem;
}

.view-group small {
  color: #95a5a6;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.view-group p {
  font-weight: 500;
  margin-bottom: 0;
  color: var(--text-dark);
  font-size: 1.05rem;
}

.skill-tag {
  background-color: rgba(7, 124, 140, 0.1);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5em 1em;
  border-radius: 12px;
  margin-right: 8px;
  margin-bottom: 8px;
  display: inline-block;
  border: 1px solid rgba(7, 124, 140, 0.15);
}

.item-list-view .item {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.item-list-view .item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.btn-delete-item {
  background: white;
  border: 1px solid #e0e0e0;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-delete-item:hover {
  color: #e74c3c;
  border-color: #e74c3c;
  background-color: #fff5f5;
}

/* Address Label */
.address-section-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin: 10px 0 8px;
  border-bottom: 1px solid #eee;
  padding-bottom: 4px;
}

/* Tag Inputs */
.tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #fff;
  min-height: 50px;
  cursor: text;
  transition: border-color 0.2s;
}

.tag-input-wrapper:focus-within {
  border-color: var(--primary);
}

.tag-chip {
  background-color: var(--secondary);
  color: var(--primary);
  border: 1px solid rgba(7, 124, 140, 0.2);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-chip i {
  cursor: pointer;
  opacity: 0.6;
  transition: 0.2s;
}

.tag-chip i:hover {
  opacity: 1;
  color: #d63031;
}

.tag-input-field {
  border: none;
  outline: none;
  flex-grow: 1;
  min-width: 100px;
  font-size: 0.95rem;
  color: var(--text-dark);
  padding: 4px 0;
}

.add-tag-btn {
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
  opacity: 0.7;
  transition: 0.2s;
  padding: 0 5px;
}

.add-tag-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.suggestion-pill {
  display: inline-block;
  background-color: #fff;
  border: 1px solid #ddd;
  color: #555;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-right: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-pill:hover {
  background-color: var(--secondary);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==============================================
   7. MODAL FIXES
   ============================================== */
/* Fix double scrollbar */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  height: 100% !important;
  padding-right: 0 !important;
  margin-right: 0 !important;
}

.modal-backdrop {
  width: 100vw !important;
  height: 100vh !important;
}

/* Modal Sizing */
.modal-content {
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.modal-header {
  padding: 12px 20px !important;
  border-bottom: 1px solid #eee;
}

.modal-body {
  padding: 15px 20px !important;
  overflow-y: auto !important;
  max-height: 80vh !important;
}

.modal-footer {
  padding: 10px 20px !important;
  background: #f8f9fa;
}

.row.g-3 {
  --bs-gutter-y: 0.6rem !important;
}

/* Large Modals */
@media (min-width: 992px) {

  #personalModal .modal-dialog,
  #expModal .modal-dialog,
  #eduModal .modal-dialog,
  #skillsModal .modal-dialog {
    max-width: 650px;
    margin: 1.5rem auto;
  }
}

/* Small Modals */
@media (min-width: 576px) {

  #resumeModal .modal-dialog,
  #prefModal .modal-dialog {
    max-width: 450px;
    margin: 1.5rem auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .modal-dialog {
    max-width: 95% !important;
    margin: 10px auto !important;
  }
}