/* ============================================= */
/* == 1. DYNAMIC THEME & COLOR SYSTEM == */
/* ============================================= */

/* Define CSS variables with fallback default colors */
:root {
  --primary-color: #0d6efd; /* Default Bootstrap Blue */
  --secondary-color: #6c757d; /* Default Bootstrap Gray */
  --success-color: #198754; /* Default Bootstrap Green */
  --dark-color: #212529; /* Default Bootstrap Dark */
  --light-color: #f8f9fa; /* Default Bootstrap Light Gray */
}

/* Apply CSS variables to override Bootstrap's default theme colors */
.bg-primary { background-color: var(--primary-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background-color: color-mix(in srgb, var(--primary-color) 85%, black); border-color: color-mix(in srgb, var(--primary-color) 85%, black); }
.btn-outline-primary { color: var(--primary-color); border-color: var(--primary-color); }
.btn-outline-primary:hover { background-color: var(--primary-color); color: white; }

.bg-success { background-color: var(--success-color) !important; }
.btn-success { background-color: var(--success-color); border-color: var(--success-color); }
.btn-success:hover { background-color: color-mix(in srgb, var(--success-color) 85%, black); border-color: color-mix(in srgb, var(--success-color) 85%, black); }

.bg-dark { background-color: var(--dark-color) !important; }
.bg-light { background-color: var(--light-color) !important; }


/* ============================================= */
/* == 2. PUBLIC-FACING PAGES & COMPONENTS == */
/* ============================================= */

/* --- Homepage Hero Section --- */
.hero-section {
    padding: 6rem 0;
    background-color: #343a40;
    position: relative;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}
.hero-section .container {
    position: relative;
    z-index: 2;
}

/* --- General Card Styling --- */
.tour-card .card-img-top {
    height: 200px;
    object-fit: cover;
}
.tour-details-img {
    height: 500px;
    object-fit: cover;
}

/* --- Review Carousel on Homepage --- */
.review-carousel-item {
    padding: 2rem 4rem;
}
.review-card {
    background-color: #ffffff;
    border-radius: .5rem;
    padding: 2rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
}
.review-carousel .carousel-control-prev-icon,
.review-carousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 1.2rem;
}

/* --- Social Share Buttons --- */
.social-share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 8px;
    color: #fff !important; /* Force white color for icons */
    text-decoration: none;
    transition: transform 0.2s ease;
}
.social-share-buttons a:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}
.share-facebook { background-color: #1877F2; }
.share-twitter { background-color: #1DA1F2; }
.share-pinterest { background-color: #BD081C; }
.share-linkedin { background-color: #0077B5; }
.share-telegram { background-color: #26A5E4; }
.share-whatsapp { background-color: #25D366; }
.share-email { background-color: #777; }

/* --- Blog Comment Section --- */
#comments .avatar-initial {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.5rem !important;
}


/* ============================================= */
/* == 3. DASHBOARD-SPECIFIC STYLES == */
/* ============================================= */

/* --- General Dashboard Layout --- */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 56px 0 0; /* Match navbar height */
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

/* --- Avatar/Initial Styling --- */
.avatar-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- Verified Partner Badge --- */
.verified-badge {
    font-size: 0.8em;
    font-weight: bold;
    color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 20px;
    padding: 0.25em 0.6em;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.verified-badge .bi {
    margin-right: 4px;
}

/* --- KPI Summary Cards --- */
.kpi-card {
    transition: all 0.3s ease;
    border: 0;
    border-left: 5px solid var(--primary-color);
}
.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}
.kpi-card .card-title {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--primary-color);
}
.kpi-card .card-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #555;
}
.kpi-card .kpi-icon {
    font-size: 3.5rem;
    color: #e9ecef;
}

/* --- Equal Height Card Rows --- */
.row-deck {
    display: flex;
    flex-wrap: wrap;
}
.row-deck > [class*="col-"] {
    display: flex;
    flex-direction: column;
}
.row-deck > [class*="col-"] .card {
    flex: 1 1 auto;
}

/* --- Customer Dashboard Adventure Card --- */
.adventure-card {
    background-size: cover;
    background-position: center;
    min-height: 300px;
}
.quick-action-btn {
    font-size: 1.1rem;
    padding: 1.25rem;
    text-align: left;
}


/* ============================================= */
/* == 4. ADMIN-SPECIFIC STYLES == */
/* ============================================= */

/* --- Admin Sidebar --- */
.admin-sidebar {
    padding: 0;
}
.admin-sidebar .sidebar-heading {
    font-size: 1.1rem;
}
.admin-sidebar .nav-link {
    font-weight: 500;
}
.admin-sidebar .nav-link.text-white-50:hover {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* --- Admin KPI Card Overrides --- */
.card.border-left-primary { border-left: .25rem solid var(--primary-color) !important; }
.card.border-left-success { border-left: .25rem solid var(--success-color) !important; }
.card.border-left-info { border-left: .25rem solid #17a2b8 !important; }
.card.border-left-danger { border-left: .25rem solid #dc3545 !important; }
.text-xs { font-size: .7rem; }
.font-weight-bold { font-weight: 700!important; }
.text-gray-300 { color: #dddfeb!important; }
.text-gray-800 { color: #5a5c69!important; }

/* --- Admin Autocomplete --- */
.autocomplete-container {
    position: relative;
}
.autocomplete-suggestions {
    position: absolute;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 1050; /* Higher than modals */
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.autocomplete-suggestions div {
    padding: 10px;
    cursor: pointer;
}
.autocomplete-suggestions div:hover {
    background-color: #f1f1f1;
}


/* --- Ensure card rows have equal height items --- */
.row-deck {
    display: flex;
    flex-wrap: wrap;
}
.row-deck > [class*="col-"] {
    display: flex;
}
.row-deck > [class*="col-"] .card {
    flex-grow: 1;
}
