/* Professional Egypt Tour Guide Platform - Main Stylesheet */

:root {
    /* Egypt-themed Color Palette */
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #1a202c;
    
    /* Egyptian Heritage Colors */
    --gold-color: #d4af37;
    --deep-gold: #c9991f;
    --egypt-blue: #1e3a8a;
    --pharaoh-blue: #2563eb;
    --nile-blue: #3b82f6;
    --desert-sand: #f5deb3;
    --warm-sand: #e8d5b7;
    --papyrus: #fff8dc;
    --sunset-orange: #f97316;
    --royal-purple: #6366f1;
    
    /* Professional Neutrals */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-accent: #edf2f7;
    --border-color: #e2e8f0;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px -4px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    /* Offset for fixed-top navbar to prevent content being hidden underneath */
    padding-top: 84px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Navigation - Professional Design */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--egypt-blue) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    color: var(--gold-color);
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-color), var(--sunset-orange));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--egypt-blue) !important;
    background: var(--bg-accent);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

.navbar-nav .nav-link.active {
    color: var(--egypt-blue) !important;
    background: var(--bg-accent);
}

/* Hero Section - Egyptian Inspired */
.hero-section {
    position: relative;
    min-height: 85vh;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(37, 99, 235, 0.90) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="pyramid" patternUnits="userSpaceOnUse" width="120" height="120"><path d="M60 0 L120 120 L0 120 Z" fill="rgba(212,175,55,0.1)"/></pattern></defs><rect fill="url(%23pyramid)" width="1200" height="600"/></svg>');
    background-size: cover, 120px 120px;
    background-position: center, center;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.min-vh-50 {
    min-height: 50vh;
}

/* Professional Card Styles */
.card {
    border: none;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-color), var(--sunset-orange));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-img-top {
    border-radius: 0;
    transition: transform 0.5s ease;
    object-fit: cover;
    height: 250px;
}

.card:hover .card-img-top {
    transform: scale(1.08);
}

.card-body {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Professional Button Styles */
.btn {
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--egypt-blue), var(--pharaoh-blue));
    color: white;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--pharaoh-blue), var(--egypt-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gold-color), var(--deep-gold));
    color: var(--dark-color);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--deep-gold), var(--gold-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    color: var(--dark-color);
}

.btn-outline-primary {
    border: 2px solid var(--egypt-blue);
    color: var(--egypt-blue);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--egypt-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.3);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 14px;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 10px;
}

/* Form Enhancements */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badge Styles */
.badge {
    font-weight: 500;
    border-radius: 6px;
}

/* Rating Stars */
.text-warning .fa-star {
    color: var(--gold-color) !important;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Sticky Elements */
.sticky-top {
    top: 90px !important;
}

/* Image Enhancements */
.cursor-pointer {
    cursor: pointer;
}

.img-fluid {
    border-radius: 8px;
}

/* Social Links */
.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Professional Footer */
footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-color), transparent);
}

footer h5, footer h6 {
    color: var(--gold-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

footer a {
    color: #cbd5e1;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--gold-color);
    transform: translateX(5px);
    display: inline-block;
}

footer p {
    color: #cbd5e1 !important;
}

footer .text-muted {
    color: #94a3b8 !important;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    margin-right: 0.75rem;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--gold-color), var(--sunset-orange));
    color: var(--dark-color);
    transform: translateY(-5px);
}

/* Contact Info Styles */
footer .contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

footer .contact-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
    font-size: 0.95rem;
}

footer .contact-item span {
    flex: 1;
}

footer .contact-item:hover {
    color: var(--gold-color);
    border-left-color: var(--gold-color);
    padding-left: 1rem;
    transform: translateX(5px);
}

footer .contact-item i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

footer .contact-item:hover i {
    transform: scale(1.2);
}

footer .contact-item:not(a) {
    cursor: default;
}

footer .contact-item:not(a):hover {
    transform: none;
    border-left-color: transparent;
}

/* Tour Detail Enhancements */
.tour-hero-image {
    position: relative;
    overflow: hidden;
}

.breadcrumb-item a {
    text-decoration: none;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 10px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: rgba(25, 135, 84, 0.1);
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: rgba(13, 202, 240, 0.1);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .display-6 {
        font-size: 1.6rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .sticky-top {
        position: relative !important;
        top: auto !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 50vh;
        padding: 2rem 0;
    }
    /* Slightly smaller offset on mobile due to condensed navbar */
    body {
        padding-top: 72px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--egypt-blue);
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn-primary {
        background: var(--dark-color);
        border-color: var(--dark-color);
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--egypt-blue), var(--pharaoh-blue));
    color: white;
    border: none;
    font-size: 1.25rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--pharaoh-blue), var(--egypt-blue));
}

/* Badge Styles */
.badge {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-gold {
    background: linear-gradient(135deg, var(--gold-color), var(--deep-gold));
    color: var(--dark-color);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-header h2 {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-color), var(--sunset-orange));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* Stats Counter */
.stats-box {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stats-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stats-box .stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-box .stat-label {
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
}

/* Feature Box */
.feature-box {
    text-align: center;
    padding: 2.5rem;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-box .feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--egypt-blue), var(--pharaoh-blue));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.feature-box:hover .feature-icon {
    transform: rotate(5deg) scale(1.1);
    background: linear-gradient(135deg, var(--gold-color), var(--sunset-orange));
}

.feature-box h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-box p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
