/* ==========================================
   MOBILE PAGES - CSS COMPLET PENTRU TOATE PAGINILE
   
   Versiune: 2.3 - FINALĂ (Fix Z-index, Hero & Video Modals)
   ========================================== */

@media (max-width: 900px) {
  
  /* ==========================================
     MOBILE HEADER - Bottom Bar + Sidebar
     ========================================== */
  
  /* Hide desktop sidebar */
  .sidebar {
    display: none !important;
  }
  
  /* Bottom Bar */
  .mobile-bottom-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 70px !important;
    background: #fff !important;
    border-top: 2px solid #f4a300 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 20px !important;
    z-index: 99999 !important; 
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
  }
  
  .mobile-logo {
    display: flex !important;
    align-items: center !important;
  }
  
  .mobile-logo img {
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Hamburger Button */
  .mobile-hamburger {
    width: 48px !important;
    height: 48px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 6px !important;
  }
  
  .mobile-hamburger span {
    width: 24px !important;
    height: 3px !important;
    background: #000 !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
  }
  
  .mobile-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px) !important;
  }
  
  .mobile-hamburger.active span:nth-child(2) {
    opacity: 0 !important;
  }
  
  .mobile-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px) !important;
  }
  
  /* Mobile Sidebar */
  .mobile-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: -300px !important;
    width: 300px !important;
    height: 100vh !important;
    background: #fff !important;
    z-index: 100000 !important;
    transition: right 0.3s ease !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2) !important;
  }
  
  .mobile-sidebar.open {
    right: 0 !important;
  }
  
  /* Sidebar Header */
  .mobile-sidebar-header {
    display: flex !important;
    align-items: center !important;
    padding: 20px !important;
    border-bottom: 2px solid #f4a300 !important;
    gap: 12px !important;
  }
  
  .mobile-sidebar-header img {
    width: 36px !important;
    height: 36px !important;
  }
  
  .mobile-brand {
    flex: 1 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #000 !important;
  }
  
  .mobile-close {
    width: 40px !important;
    height: 40px !important;
    background: transparent !important;
    border: none !important;
    font-size: 32px !important;
    line-height: 32px !important;
    cursor: pointer !important;
    color: #000 !important;
  }
  
  /* Mobile Menu */
  .mobile-menu {
    padding: 0 !important;
  }
  
  .mobile-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .mobile-item {
    border-bottom: 1px solid #eee !important;
  }
  
  .mobile-item > a,
  .mobile-accordion {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    text-decoration: none !important;
    color: #000 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
  }
  
  .mobile-accordion:hover,
  .mobile-item > a:hover {
    background: #f9f9f9 !important;
  }
  
  .mobile-arrow {
    font-size: 20px !important;
    transition: transform 0.3s ease !important;
  }
  
  .mobile-accordion.active .mobile-arrow {
    transform: rotate(90deg) !important;
  }
  
  /* Submenu */
  .mobile-submenu {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease !important;
    background: #f9f9f9 !important;
  }
  
  .mobile-submenu.open {
    max-height: 1000px !important;
  }
  
  .mobile-submenu li {
    border-bottom: 1px solid #eee !important;
  }
  
  .mobile-submenu li:last-child {
    border-bottom: none !important;
  }
  
  .mobile-submenu a {
    display: block !important;
    padding: 12px 20px 12px 40px !important;
    text-decoration: none !important;
    color: #333 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
  }
  
  .mobile-submenu a:hover {
    background: #efefef !important;
    color: #000 !important;
  }
  
  /* Mobile Footer */
  .mobile-footer {
    padding: 20px !important;
    border-top: 2px solid #f4a300 !important;
    margin-top: auto !important;
  }
  
  .mobile-social {
    display: flex !important;
    gap: 16px !important;
    justify-content: center !important;
    margin-bottom: 16px !important;
  }
  
  .mobile-social a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #f0f0f0 !important;
  }
  
  .mobile-social img {
    width: 20px !important;
    height: 20px !important;
  }
  
  .mobile-lang-switch {
    text-align: center !important;
    margin: 16px 0 !important;
    font-size: 14px !important;
  }
  
  .mobile-lang-switch a {
    color: #666 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
  }
  
  .mobile-lang-switch a.active {
    color: #f4a300 !important;
  }
  
  .mobile-lang-switch .sep {
    color: #ccc !important;
  }
  
  .mobile-credit {
    text-align: center !important;
    font-size: 12px !important;
    color: #666 !important;
    margin-top: 16px !important;
  }
  
  /* Mobile Overlay */
  .mobile-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 99998 !important; 
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
  }
  
  .mobile-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* iOS Safe Area */
  @supports (padding: max(0px)) {
    .mobile-bottom-bar {
      height: max(70px, calc(70px + env(safe-area-inset-bottom))) !important;
      padding-bottom: env(safe-area-inset-bottom) !important;
    }
    
    .mobile-sidebar {
      padding-bottom: env(safe-area-inset-bottom) !important;
    }
  }

  /* ==========================================
     PAGINA PRINCIPALĂ (INDEX.PHP) - HERO SECTION
     ========================================== */
     
  main.content {
    margin-left: 0 !important; 
    padding-bottom: 70px !important; 
  }

  .hero {
    min-height: calc(100vh - 70px) !important; 
    height: auto !important;
    background-position: center center !important;
    background-size: cover !important; 
    background-attachment: scroll !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .hero-overlay {
    position: relative !important; 
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.4) !important; 
  }

  .hero-title {
    font-size: 3.5rem !important; 
    line-height: 1.1 !important;
    text-align: center !important;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8) !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hero-title span {
    display: block !important; 
  }

  .hero-sub {
    font-size: 1.2rem !important;
    text-align: center !important;
    margin-top: 20px !important;
    padding: 0 15px !important;
  }
  
  .hero-sub .line {
    margin-bottom: 8px !important;
  }
  
  /* ==========================================
     RESETARE GENERALĂ
     ========================================== */
  
  .page {
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .page .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* ==========================================
     LAYOUT MOBIL - TOATE PAGINILE SIMPLE
     ========================================== */
  
  .coworking-mobile,
  .multi-function-mobile,
  .pillar-hall-mobile,
  .escape-room-mobile,
  .amphitheater-mobile,
  .skirt-bike-mobile,
  .craciun-mobile,
  .halloween-mobile,
  .martisor-mobile {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--yellow-light, #fcc861) !important;
  }
  
  /* ==========================================
     IMAGINE HERO - MOBILE (ALTE PAGINI)
     ========================================== */
  
  .mobile-hero-image {
    width: 100% !important;
    height: auto !important;
    max-height: 400px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    background: var(--yellow-light, #fcc861) !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .mobile-hero-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 400px !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
  }
  
  /* ==========================================
     CONTENT SECTION - MOBILE
     ========================================== */
  
  .mobile-content-section {
    flex: 1 !important;
    padding: 24px 20px !important;
    padding-bottom: 100px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: var(--yellow-light, #fcc861) !important;
  }
  
  /* ==========================================
     TYPOGRAPHY - MOBILE
     ========================================== */
  
  .mobile-title,
  .mobile-content-section h1,
  .mobile-content-section .title {
    font-size: 28px !important;
    line-height: 1.25 !important;
    margin: 0 0 16px 0 !important;
    font-weight: 900 !important;
    color: #000 !important;
    font-family: 'HPSimplified', system-ui, sans-serif !important;
  }
  
  .mobile-text,
  .mobile-content-section p {
    font-size: 16px !important;
    line-height: 1.7 !important;
    margin: 0 0 14px 0 !important;
    color: #000 !important;
    font-family: 'HPSimplified', system-ui, sans-serif !important;
  }
  
  .mobile-text:last-child,
  .mobile-content-section p:last-child {
    margin-bottom: 0 !important;
  }
  
  /* ==========================================
     RESPONSIVE - Ecrane Mici
     ========================================== */
  
  @media (max-width: 374px) {
    .mobile-hero-image,
    .mobile-hero-image img {
      max-height: 300px !important;
    }
    
    .mobile-content-section {
      padding: 20px 16px !important;
      padding-bottom: 90px !important;
    }
    
    .mobile-title,
    .mobile-content-section h1 {
      font-size: 24px !important;
    }
    
    .mobile-text,
    .mobile-content-section p {
      font-size: 15px !important;
    }
  }
  
  /* ==========================================
     RESPONSIVE - Tablete
     ========================================== */
  
  @media (min-width: 600px) {
    .mobile-hero-image,
    .mobile-hero-image img {
      max-height: 500px !important;
    }
    
    .mobile-content-section {
      padding: 30px !important;
      padding-bottom: 110px !important;
    }
    
    .mobile-title,
    .mobile-content-section h1 {
      font-size: 34px !important;
    }
    
    .mobile-text,
    .mobile-content-section p {
      font-size: 17px !important;
      line-height: 1.75 !important;
    }
  }
  
  /* ==========================================
     LANDSCAPE
     ========================================== */
  
  @media (orientation: landscape) {
    .mobile-hero-image,
    .mobile-hero-image img {
      max-height: 250px !important;
    }
    
    .mobile-content-section {
      padding: 20px !important;
      padding-bottom: 90px !important;
    }
    
    .mobile-title,
    .mobile-content-section h1 {
      font-size: 24px !important;
    }
    
    .mobile-text,
    .mobile-content-section p {
      font-size: 15px !important;
    }
  }
  
  /* ==========================================
     iOS SAFE AREA
     ========================================== */
  
  @supports (padding: max(0px)) {
    .mobile-content-section {
      padding-bottom: max(100px, calc(env(safe-area-inset-bottom) + 100px)) !important;
    }
  }
  
  /* ==========================================
     SMOOTH SCROLL
     ========================================== */
  
  .mobile-content-section {
    scroll-behavior: smooth !important;
  }
  
  /* ==========================================
     HIDE DESKTOP - SHOW MOBILE
     ========================================== */
  
  /* Hide desktop versions */
  .page.coworking.about,
  .page.multi-function.about,
  .page.pillar-hall.about,
  .page.escape-room.about,
  .page.amphitheater.about,
  .page.skirt-bike.about,
  .page.craciun.about,
  .page.haloween.about,
  .page.martisor.about {
    display: none !important;
  }
  
  /* Show mobile versions */
  .coworking-mobile,
  .multi-function-mobile,
  .pillar-hall-mobile,
  .escape-room-mobile,
  .amphitheater-mobile,
  .skirt-bike-mobile,
  .craciun-mobile,
  .halloween-mobile,
  .martisor-mobile {
    display: flex !important;
  }
  
  /* ==========================================
     PAGINI SPECIALE - ABOUT, MISSION
     ========================================== */
  
  .page.about .about-intro,
  .page.mission .about-intro {
    padding: 24px 20px !important;
    background: var(--yellow-light, #fcc861) !important;
  }
  
  .page.about .about-intro p,
  .page.mission .about-intro p {
    font-size: 16px !important;
    line-height: 1.7 !important;
    color: #000 !important;
  }
  
  .page.about .gallery-3,
  .page.about .mosaic-5 {
    padding: 20px !important;
    gap: 16px !important;
  }
  
  .page.about .gallery-3 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .page.about .gallery-3 figure,
  .page.about .mosaic-5 figure {
    margin: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }
  
  .page.about .gallery-3 img,
  .page.about .mosaic-5 img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page.about .about-text {
    padding: 20px !important;
    background: var(--yellow-light, #fcc861) !important;
  }
  
  .page.about .about-text p {
    font-size: 16px !important;
    line-height: 1.7 !important;
    margin-bottom: 14px !important;
    color: #000 !important;
  }
  
  .page.about .mosaic-5 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  
  .page.mission .mission-hero {
    padding: 20px !important;
  }
  
  .page.mission .mission-hero figure {
    margin: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }
  
  .page.mission .mission-hero img {
    width: 100% !important;
    height: auto !important;
  }
  
  /* ==========================================
     CONFERENCE HALLS
     ========================================== */
  
  .page.halls .halls-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
  }
  
  .page.halls .hall {
    display: flex !important;
    flex-direction: column !important;
    background: var(--yellow-light, #fcc861) !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .page.halls .hall .media {
    width: 100% !important;
    height: auto !important;
    max-height: 350px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  
  .page.halls .hall .media img {
    width: 100% !important;
    height: auto !important;
    max-height: 350px !important;
    object-fit: contain !important;
    display: block !important;
  }
  
  .page.halls .hall .copy {
    padding: 24px 20px !important;
    flex: 1 !important;
  }
  
  .page.halls .hall .title {
    font-size: 26px !important;
    margin: 0 0 12px 0 !important;
    color: #000 !important;
  }
  
  .page.halls .hall .copy p {
    font-size: 16px !important;
    line-height: 1.7 !important;
    color: #000 !important;
  }
  
  /* ==========================================
     SCHOOL PAGE
     ========================================== */
  
  .page.school .school-hero {
    padding: 24px 20px !important;
    background: var(--yellow-light, #fcc861) !important;
  }
  
  .page.school .school-title {
    font-size: 28px !important;
    text-align: center !important;
    margin-bottom: 16px !important;
    color: #000 !important;
  }
  
  .page.school .school-intro {
    padding: 16px !important;
    margin: 0 0 20px 0 !important;
  }
  
  .page.school .school-sections {
    padding: 0 !important;
  }
  
  .page.school .school-section {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
  }
  
  .page.school .school-section .media {
    margin: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }
  
  .page.school .school-section img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* ==========================================
     RESERVATIONS PAGE
     ========================================== */
  
  .page.reservations .res-hero {
    padding: 24px 20px !important;
    background: var(--yellow-light, #fcc861) !important;
    text-align: center !important;
  }
  
  .page.reservations .title {
    font-size: 28px !important;
    margin-bottom: 16px !important;
    color: #000 !important;
  }
  
  .page.reservations .intro {
    padding: 16px !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
  }
  
  .page.reservations .res-actions {
    margin: 20px 0 !important;
  }
  
  .page.reservations .forms-cta img {
    width: 60px !important;
    height: 60px !important;
  }
  
  .page.reservations .features {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 20px !important;
  }
  
  .page.reservations .feat {
    background: #fff !important;
    padding: 20px !important;
    border-radius: 12px !important;
  }
  
  .page.reservations .feat .icon {
    font-size: 40px !important;
    margin-bottom: 12px !important;
  }
  
  .page.reservations .feat .name {
    font-size: 20px !important;
    margin-bottom: 8px !important;
    color: #000 !important;
  }
  
  .page.reservations .feat .desc {
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #333 !important;
  }
  
  .page.reservations .help {
    padding: 20px !important;
  }
  
  .page.reservations .help-list {
    list-style: none !important;
    padding: 0 !important;
  }
  
  .page.reservations .help-list li {
    font-size: 16px !important;
    padding: 8px 0 !important;
    color: #000 !important;
  }
  
  .page.reservations .rooms {
    padding: 20px !important;
  }
  
  .page.reservations .rooms-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  
  .page.reservations .room {
    margin: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }
  
  .page.reservations .room img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* ==========================================
     RESIDENTS PAGE
     ========================================== */
  
  .page.residents .about-intro {
    padding: 24px 20px !important;
    background: var(--yellow-light, #fcc861) !important;
  }
  
  .page.residents .partners-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    padding: 20px !important;
  }
  
  .page.residents .partner-card {
    background: #fff !important;
    padding: 16px !important;
    border-radius: 12px !important;
    text-align: center !important;
  }
  
  .page.residents .partner-card .logo img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 80px !important;
  }
  
  .page.residents .videos {
    padding: 20px !important;
  }
  
  .page.residents .videos-title {
    font-size: 24px !important;
    margin-bottom: 16px !important;
    color: #000 !important;
  }
  
  .page.residents .videos-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .page.residents .video-thumb {
    width: 100% !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }

  /* ==========================================
     MODAL VIDEO & PARTENERI - MOBIL
     ========================================== */

  .video-modal, .resident-modal {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 1000000 !important;
    padding: 15px !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease !important;
  }
  
  .resident-modal {
    background: rgba(0, 0, 0, 0.75) !important;
  }

  .video-modal.show, .resident-modal.show {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .video-dialog, .resident-dialog {
    width: 100% !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
  }

  .resident-dialog {
    background: var(--yellow-light, #fcc861) !important;
    padding: 40px 20px 20px !important;
    border-radius: 12px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }

  /* Raport 16:9 forțat pentru videoclipuri pe mobil */
  .video-frame {
    position: relative !important;
    width: 100% !important;
    padding-top: 56.25% !important; 
    background: #000 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
  }

  .video-frame iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
  }

  /* Butonul X scos deasupra cadrului video pentru a putea fi apăsat ușor pe telefon */
  .video-close {
    position: absolute !important;
    top: -45px !important;
    right: 0 !important;
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    font-size: 40px !important;
    cursor: pointer !important;
    z-index: 10 !important;
  }

  .resident-close {
    position: absolute !important;
    top: 5px !important;
    right: 15px !important;
    background: transparent !important;
    color: #000 !important;
    border: none !important;
    font-size: 40px !important;
    cursor: pointer !important;
    z-index: 10 !important;
  }
  
  /* ==========================================
     BLOG PAGES
     ========================================== */
  
  .blog-list {
    padding: 20px !important;
  }
  
  .blog-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .blog-card {
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }
  
  .blog-image {
    height: 200px !important;
  }
  
  .blog-title {
    padding: 16px !important;
    font-size: 20px !important;
  }
  
  .blog-excerpt {
    padding: 0 16px 16px !important;
    font-size: 15px !important;
  }
  
  /* ==========================================
     CONTACT PAGE
     ========================================== */
  
  .contact-split {
    display: flex !important;
    flex-direction: column !important;
    min-height: auto !important;
  }
  
  .contact-split .split-left {
    padding: 24px 20px !important;
    min-height: auto !important;
    border-right: none !important;
  }
  
  .contact-split .split-right {
    min-height: 400px !important;
  }
  
  .contact-split #map {
    height: 400px !important;
  }
  
  /* ==========================================
     ONG SPACES (dacă există)
     ========================================== */
  
  .page.ong-spaces {
    padding: 20px !important;
  }
}

/* ==========================================
   DESKTOP - Hide mobile sections
   ========================================== */

@media (min-width: 901px) {
  .coworking-mobile,
  .multi-function-mobile,
  .pillar-hall-mobile,
  .escape-room-mobile,
  .amphitheater-mobile,
  .skirt-bike-mobile,
  .craciun-mobile,
  .halloween-mobile,
  .martisor-mobile {
    display: none !important;
  }
}