/* Styles responsifs pour Oman Expat Services - SOLUTION MENU DÉROULANT */

/* Tablettes et petits écrans */
@media (max-width: 992px) {
  .header-container {
    flex-direction: column;
    padding: 10px;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  nav ul li {
    margin: 0.5rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .about-section,
  .service-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .service-detail:nth-child(even) {
    direction: ltr;
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding: 0 0 0 60px;
    text-align: left;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-dot {
    left: 30px;
  }
}

/* Mobiles */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .services-grid,
  .features-grid,
  .team-grid,
  .blog-grid,
  .invest-benefits {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Petits mobiles */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .cta-button {
    padding: 10px 20px;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .instagram-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-cta h2 {
    font-size: 1.8rem;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 15px;
    right: 15px;
  }
}

/* Support RTL pour l'arabe */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .section-title::after {
  margin: 0 auto;
}

[dir="rtl"] nav ul li {
  margin-right: 1.5rem;
  margin-left: 0;
}

[dir="rtl"] .read-more::after {
  content: '←';
  margin-right: 5px;
  margin-left: 0;
  transition: margin-right 0.3s ease;
}

[dir="rtl"] .read-more:hover::after {
  margin-right: 10px;
  margin-left: 0;
}

[dir="rtl"] .contact-info i {
  margin-left: 10px;
  margin-right: 0;
}

[dir="rtl"] .service-features li {
  padding-right: 30px;
  padding-left: 0;
  position: relative;
}

[dir="rtl"] .service-features li::before {
  right: 0;
  left: auto;
}

/* SOLUTION MENU DÉROULANT MOBILE */

/* Cacher le menu hamburger défaillant */
.mobile-menu-toggle {
  display: none !important;
}

/* Menu déroulant mobile - SOLUTION FIABLE */
.mobile-nav-dropdown {
  display: none;
  position: relative;
  z-index: 1003;
}

@media (max-width: 768px) {
  /* Header en mode mobile */
  .header-container {
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    padding: 1rem;
    position: relative;
  }
  
  /* Logo en mobile */
  .logo {
    margin-bottom: 0;
  }
  
  .logo img {
    max-height: 40px;
  }
  
  /* Cacher la navigation normale en mobile */
  nav {
    display: none !important;
  }
  
  /* Afficher le menu déroulant en mobile */
  .mobile-nav-dropdown {
    display: block !important;
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1003;
  }
  
  /* Style du select déroulant */
  .mobile-nav-select {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 50px;
    max-width: 50px;
    text-align: center;
  }
  
  .mobile-nav-select:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
  }
  
  .mobile-nav-select:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--sand-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
  }
  
  /* Options du select */
  .mobile-nav-select option {
    background-color: var(--primary-blue);
    color: var(--text-light);
    padding: 8px;
    font-weight: 500;
  }
  
  .mobile-nav-select option:first-child {
    font-weight: bold;
    color: var(--sand-color);
  }
  
  .mobile-nav-select option:hover {
    background-color: var(--secondary-blue);
  }
  
  /* Sélecteur de langue repositionné */
  .language-switcher {
    position: absolute;
    top: 15px;
    right: 15px; /* Repositionné à droite */
    margin: 0;
    z-index: 1002;
  }
  
  .language-switcher select {
    font-size: 0.8rem;
    padding: 6px 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: var(--text-light);
    min-width: 55px;
    max-width: 55px;
  }
  
  .language-switcher select:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }
}

/* Styles spécifiques pour très petits écrans */
@media (max-width: 375px) {
  .mobile-nav-dropdown {
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .mobile-nav-select {
    font-size: 0.85rem;
    padding: 5px 6px;
    min-width: 45px;
    max-width: 45px;
  }
  
  .language-switcher {
    right: 10px;
    top: 12px;
  }
  
  .language-switcher select {
    font-size: 0.7rem;
    padding: 5px 6px;
    min-width: 45px;
    max-width: 45px;
  }
}

/* Animation de chargement */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-light);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Amélioration de l'accessibilité */
:focus {
  outline: 3px solid var(--secondary-blue);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--primary-blue);
  color: var(--text-light);
  padding: 8px;
  z-index: 1001;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* Styles pour les formulaires en arabe */
[dir="rtl"] .form-group label {
  text-align: right;
}

[dir="rtl"] .submit-button {
  float: left;
}

/* Styles pour l'impression */
@media print {
  header, 
  footer, 
  .contact-cta, 
  .back-to-top, 
  .cta-button,
  .mobile-nav-dropdown {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background-color: #fff;
  }
  
  .container {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }
  
  a {
    text-decoration: none;
    color: #000;
  }
  
  .service-card, 
  .blog-card, 
  .team-member, 
  .testimonial-item {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .hero-banner {
    height: auto;
    background-image: none;
    color: #000;
  }
  
  .section-title::after {
    display: none;
  }
}

/* Styles pour les appareils avec hover (desktop) */
@media (hover: hover) {
  .mobile-nav-select:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
}

