/**
 * Styles CSS - hotelsdakhla.com
 * Plateforme touristique pour Dakhla
 */

/* Variables CSS */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --font-family: 'Poppins', sans-serif;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: #fff;
}

/* Mobile-first defaults */
html { -webkit-text-size-adjust: 100%; }
img, video, canvas, svg { max-width: 100%; height: auto; }
iframe { max-width: 100%; }

/* Ensure tap targets are large enough */
.btn, .nav-link, .dropdown-toggle, button, [role="button"] {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

/* Prevent iOS zoom on inputs */
input, select, textarea, button { font-size: 16px; }

/* Containers breathing room on small screens */
@media (max-width: 576px) {
    .container, .container-fluid { padding-left: 16px; padding-right: 16px; }
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Top Bar */
.top-bar {
    background: var(--gray-800);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    position: relative; /* ensure stacking context */
    z-index: 1040; /* above most content, below modals */
}

/* Ensure dropdown menus are above other elements */
.top-bar .dropdown-menu,
.navbar .dropdown-menu {
    z-index: 1100;
}

.top-info span {
    margin-right: 1.5rem;
}

.top-info i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.top-links {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.language-selector .btn {
    background: none;
    border: 1px solid var(--gray-600);
    color: white;
    font-size: 0.875rem;
}

.social-links a {
    color: var(--gray-400);
    margin-left: 0.5rem;
    transition: var(--transition);   
}

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

/* Top bar specific social icons: smaller, no circular background */
.top-bar .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    color: var(--gray-400);
}

.top-bar .social-links a:hover {
    background: transparent;
    color: var(--primary-color);
}

.top-bar .social-links i {
    font-size: 20px;
    line-height: 1;
}

/* Navigation */
.navbar {
    background: white !important;
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
}

/* Collapse nav paddings on small screens for better fit */
@media (max-width: 576px) {
    .navbar { padding: .5rem 0; }
    .navbar-nav .nav-link { padding: .5rem .75rem !important; }
}

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

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--gray-700) !important;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link i {
    margin-right: 0.5rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.9);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-pattern.svg') repeat;
    opacity: 0.1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons .btn {
    margin-right: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
}

.hero-image img {
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Ensure readability on small screens */
@media (max-width: 767.98px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
}

/* Avoid heavy hover effects on touch devices */
@media (hover: none) {
    .hotel-card:hover, .service-card:hover { transform: none; box-shadow: var(--box-shadow); }
}

/* Search Section */
.search-section {
    margin-top: -3rem;
    position: relative;
    z-index: 3;
}

.search-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.search-tabs .nav-tabs {
    border-bottom: none;
    background: var(--gray-100);
}

.search-tabs .nav-link {
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-weight: 500;
    padding: 1rem 1.5rem;
    transition: var(--transition);
}

.search-tabs .nav-link.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.search-tabs .nav-link i {
    margin-right: 0.5rem;
}

.search-form {
    padding: 2rem;
}

.search-form .form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.search-form .form-control,
.search-form .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: var(--transition);
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Services Section */
.services-section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 3rem;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Featured Section */
.featured-section {
    padding: 5rem 0;
}

.hotel-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.hotel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.hotel-image {
    position: relative;
    overflow: hidden;
}

.hotel-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.hotel-card:hover .hotel-image img {
    transform: scale(1.05);
}

.hotel-rating {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.hotel-rating i {
    color: var(--warning-color);
    margin-right: 0.25rem;
}

.hotel-info {
    padding: 1.5rem;
}

.hotel-info h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.hotel-info p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.hotel-info i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.hotel-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 1rem;
}

.hotel-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.hotel-price .period {
    color: var(--gray-500);
    margin-left: 0.5rem;
}

/* Why Choose Section */
.why-choose-section {
    padding: 5rem 0;
}

.feature-list {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--success-color);
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.feature-item h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Newsletter Section */
.newsletter-section {
    background: var(--primary-color);
    color: white;
}

.newsletter-form .input-group {
    max-width: 400px;
    margin-left: auto;
}

.newsletter-form .form-control {
    border: none;
    padding: 0.75rem 1rem;
}

.newsletter-form .btn {
    background: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

/* Footer */
.footer {
    background: var(--gray-900) !important;
}

.footer-section h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
}

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

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    color: var(--gray-400);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
}

.footer-info span {
    margin-right: 1.5rem;
    color: var(--gray-400);
}

.footer-info i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Weather Widget */
.weather-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    z-index: 1000;
    min-width: 120px;
}

.weather-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.weather-icon i {
    font-size: 1.5rem;
    color: var(--warning-color);
}

.temperature {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.weather-widget .location {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Improve legibility on very small screens */
@media (max-width: 360px) {
    .section-title { font-size: 1.75rem; }
    .service-card h4 { font-size: 1.125rem; }
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gray-800);
    color: white;
    padding: 1rem 0;
    transform: translateY(100%);
    transition: var(--transition);
    z-index: 1050;
}

.cookie-consent.show {
    transform: translateY(0);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

body > div.top-bar.d-none.d-lg-block > div > div > div.col-md-6.text-end > div > div.dropdown.d-inline-block.ms-3 > button > i {
    color: rgb(218, 216, 216) !important;
}

body > div.top-bar.d-none.d-lg-block > div > div > div.col-md-6.text-end > div > div.dropdown.d-inline-block.ms-3 > button > span {
    color: white !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .search-form {
        padding: 1rem;
    }
    
    .weather-widget {
        bottom: 1rem;
        right: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        left: 1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .services-section,
    .featured-section,
    .why-choose-section {
        padding: 3rem 0;
    }
    
    .search-section {
        margin-top: -2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

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

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .weather-widget,
    .back-to-top,
    .cookie-consent {
        display: none !important;
    }
}
