/* Ecrane Foarte Mici (Telefoane, sub 640) */
@media screen and (max-width: 640px) {
  .documente_mobil {
    display: block;
  }

  .revista-container {
    display: none;
  }

  .pagina-pacient .grid {
    grid-template-columns: 1fr;
  }

  .prezentare .stat-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.6rem;
  }
}

/* Ecrane Mici (Telefoane, sub 768px) */
@media screen and (max-width: 767px) {
  .documente_mobil {
    display: block;
  }

  .revista-container {
    display: none;
  }

  .pagina-pacient .grid {
    grid-template-columns: 1fr;
  }

  .prezentare .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* Ecrane Medii (Tablete, intre 768px si 980px) */
@media screen and (min-width: 768px) and (max-width: 980px) {
  .documente_mobil {
    display: block;
  }

  .revista-container {
    display: none;
  }

  .pagina-pacient .grid {
    grid-template-columns: 1fr;
  }
}

/* Ecrane Mari (Desktop, peste 981px) */
@media screen and (min-width: 981px) {
  .documente_mobil {
    display: none;
  }

  .revista-container {
    display: block;
  }
}

/* TABLETA SI CALCULATOR */
@media (min-width: 641px) {
  .harta-resize {
    height: 25em;
  }
}

@media (max-width: 980px) {
  .contact {
    grid-template-columns: none;
    grid-template-rows: auto auto;

  }
}


/************************************************** TELEFON ***********************************************/
@media (max-width: 640px) {
  .video-div {
    display: none;
  }

  .header_bottom_left img {
    width: 4rem;
    margin: auto;
  }

  /* =========================== Meniu Lateral Mobil (Slide-in) =============================== */
  .mobile-menu-btn {
    display: block !important;
    cursor: pointer;
    color: #ffffff;
    font-size: 2rem;
    position: absolute;
    left: 20px;
    /* Poziția inițială (în stânga paginii) */
    top: 20px;
    /* Sus */
    z-index: 1002;
    /* Această linie face mișcarea fluidă, la fel ca panoul */
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
  }

  .mobile-menu-btn.is-open {
    /* Glisează butonul în dreapta, deasupra panoului (care are lățimea de 300px) */
    left: 262px;
    top: -30px;
    z-index: 99999999;

    /* Opțional: o mică rotație când se transformă în X pentru un efect wow */
    transform: rotate(90deg);
  }

  .header_bottom_inner {
    justify-content: center;
    width: 100%;
    margin-left: 0;
    padding: 0 15px;
  }

  /* Panoul lateral (Sidebar) */
  .header_bottom_right {
    display: flex !important;
    position: fixed;
    top: 0;
    left: -320px;
    /* Ascuns în stânga */
    width: 300px;
    height: 100vh;
    background-color: #2b4b7c;
    flex-direction: column;
    margin-left: 0;
    padding: 70px 0 20px 0;
    /* Am lăsat loc fix sus pentru X */
    grid-template-columns: 1fr;
    overflow-y: auto;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }

  .header_bottom_right.active {
    left: 0;
  }

  .dropdown {
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Linkurile principale și textul lor */
  .dropbtn,
  .dropbtn a {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    color: #ffffff !important;
    /* Forțăm textul alb */
    font-size: 1.1rem;
    font-family: inherit;
  }

  /* Săgeata pentru submeniu */
  .dropbtn.has-submenu::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    color: #ffffff;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
  }

  .dropdown.active .dropbtn.has-submenu::after {
    transform: rotate(180deg);
  }

  .dropdown-content {
    position: static;
    display: none;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: none;
  }

  /* REZOLVAT: Text alb și indentare mai mică */
  .dropdown-content a {
    color: #ffffff !important;
    padding: 12px 20px 12px 25px;
    /* <--- Aici am corectat ieșirea din plan */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    font-size: 1rem;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }

  /* ========================================================================= */

  .lozinca {
    display: none;
  }

  .header_bottom_right {
    display: none;
  }

  .header_bottom_left a {
    font-size: 0.8rem;
  }

  .header_bottom_inner {
    justify-content: space-between;
  }

  .header_bottom_left {
    width: 70%;
    margin: auto;
  }

  .header_top_inner {
    width: 50%;
    display: inline-table;
  }

  .header_top_left {
    width: 100%;
    align-items: center;
    justify-self: center;
    margin: auto;
  }

  .header_top_outer {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .meta_wrap {
    line-height: 20px;
    position: relative;
    text-align: justify;
    margin: 0.2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-weight: 600;
  }

  .meta_wrap a {
    color: rgba(255, 255, 255, 0.87);
  }

  .side-icons {
    position: absolute;
    height: auto;
    left: 30%;
    display: inline-flex;
    justify-content: flex-end;
    margin: auto;
  }

  .asista-iconita {
    position: relative;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    padding: 0px 20px 0px 11px;
    border-radius: 8px;
    display: block;
    font-family: "Noto Sans Mono", monospace;
    top: 0;
    /* left: 17rem; */
  }

  #asistaclass p {
    color: rgba(255, 255, 255, 0.778);
    font-size: 0.5rem;
    width: 50%;
  }

  .asista-iconita p {
    color: rgba(255, 255, 255, 0.87);
    align-items: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
  }

  .asistadiv {
    height: 3rem;
    z-index: 1;
    filter: alpha(opacity=100);
    height: auto;
    background-color: #006600;
    color: rgba(255, 255, 255, 0.87);
    text-align: center;
    align-content: center;
    border-radius: 8px;
    position: absolute;
    top: 0;
    width: 100%;
  }

  .cta-book,
  .cta-book-blue {
    margin: auto;
  }

  .cta-book,
  .cta-book-blue {
    padding: 0.45rem 0.7rem;
    font-size: 80%;
  }

  .middle-row {
    display: inline-flex;
    width: 90%;
    /* margin: 1rem auto; */
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }

  .middle-row-outer {
    padding: 1rem 0;
    margin: 1rem auto;
    justify-content: center;
    display: flex;
  }

  .middle-row-inner {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 1rem;
  }

  p.apel {
    font-weight: 700;
    font-size: 1.1rem;
  }

  .colored-card img {
    width: 40%;
    height: auto;
    border-radius: 11px;
  }

  .icon-box-inner {
    font-size: 1rem;
    width: 100%;
    margin: 0 10px;
  }

  #userwayAccessibilityIcon {
    top: 40rem;
    bottom: 13px;
    right: 0px;
    left: auto;
  }

  .icon-box-heading {
    font-size: 0.7rem;
  }

  .icon-box-text span {
    font-size: 0.8rem;
  }

  .middle-icon {
    font-size: 2rem;
    line-height: 40px;
    width: 18%;
    color: #3eb8d7;
    background-color: rgba(255, 255, 255, 0);
    margin: 1rem auto;
  }

  #icon-box {
    display: inline-flex;
    justify-content: center;
    align-items: baseline;
  }

  .transport-medical {
    padding: 0;
    color: #21343a;
    font-size: 17px;
    line-height: 1.75;
    letter-spacing: .1px;
    width: 90%;
    margin: 1rem auto;
    text-align: justify;
  }

  .apel-112 {
    border: 1px solid rgba(230, 223, 197, 0.6);
    margin: 2rem auto;
    width: 60%;
    height: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
  }

  .apel-112 h2 {
    font-weight: 600;
    color: rgb(42, 45, 50);
    font-size: 1.5rem;
    margin: auto;
  }

  .despre-noi {
    width: 90%;
    padding: 1rem;
    margin: 1rem auto;
    background-color: #fbfbfb;
    text-align: justify;
  }

  .despre-noi p {
    text-indent: 30px;
    font-size: 1rem;
    color: #747474;
  }

  .despre-noi ul {
    list-style-type: square;
    color: #747474;
    margin: 0.5rem;
    text-align: left;
  }

  footer img {
    width: 50%;
  }

  .facebook-footer {
    display: inline-flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    justify-items: baseline;
  }

  .despre-noi ul li {
    font-size: 1rem;
  }

  .info-text {
    font-size: 0.9rem;
  }

  .btn {
    font-size: 0.5rem;
    font-weight: 600;
  }

  .section-title {
    font-size: 1rem;
  }

  .statie-card h4 {
    font-size: 0.9rem;
  }

  .card-text {
    font-size: 1rem;
  }

  .card-subtext {
    font-size: 1rem;
  }

  .membrii .name {
    margin: 0;
    font-size: 1.3rem;
  }



  /* _____________________________________________ */

  .facebook-iconita img {
    position: fixed;
    z-index: 2;
    right: 1.5rem;
    top: 37rem;
    width: 2.5rem;
  }

  .middle-cards {
    display: flex;
    width: 90%;
    margin: 1rem auto;
    flex-wrap: wrap;
  }

  .colored-card {
    height: auto;
    width: 100%;
    padding: 2rem;
  }

  .container {
    width: 90%;
    margin: 1rem auto;
    text-align: center;
  }

  .rapoarte .wrap {
    width: 90%;
    margin: 1rem auto;
    padding: 1rem;
  }

  .rapoarte .page-title {
    font-size: 1rem;
    font-weight: 900;
    color: #cc0000;
    /* color: #2C6E91; */
    text-align: left;
    margin: 1rem auto;
  }

  .page-title {
    font-size: 1.1rem;
  }

  .header_1 img {
    width: 100%;
    height: 12rem;
  }
}

/************************************************ TABLETA *********************************************************/
@media (min-width: 641px) and (max-width:980px) {
  .video-div {
    display: block;
  }

  #id_cover_mobil {
    display: none;
  }

  .asistadiv {
    height: 3rem;
    z-index: 1;
    filter: alpha(opacity=100);
    height: auto;
    background-color: #006600;
    color: white;
    text-align: center;
    align-content: center;
    border-radius: 8px;
    position: absolute;
    width: 140%;
    top: 1px;
  }

  #asistaclass p {
    font-size: 0.9rem;
  }

  .middle-icon {
    color: #3eb8d7;

  }

  .middle-row {
    display: flex;
    width: 90%;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }

  .middle-row-outer {
    width: 100%;
    justify-content: center;
    display: flex;
  }

  .middle-row-inner {
    width: 90%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .middle-cards {
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    align-items: normal;
    margin: 1rem auto;
    width: 90%;
    height: auto;
  }

  p.apel {
    font-weight: 700;
    font-size: 1.1rem;
  }

  .colored-card img {
    width: 80%;
    height: auto;
    border-radius: 11px;
  }

  .icon-box-inner {
    width: 100%;
  }

  .icon-box-heading {
    font-size: 100%;
  }

  .icon-box-text span {
    font-size: 70%;
  }

  .middle-icon {
    font-size: 25px;
    line-height: 40px;
    width: 18%;
    color: #3eb8d7;
    background-color: rgba(255, 255, 255, 0);
    margin: 1rem auto;
  }

  .colored-card {
    height: auto;
    width: 45%;
  }

  #icon-box {
    display: inline-flex;
    justify-content: center;
    align-items: baseline;
    width: 100%;
  }

  .transport-medical {
    padding: 0;
    color: #21343a;
    font-size: 17px;
    line-height: 1.75;
    letter-spacing: .1px;
    width: 90%;
    margin: 1rem auto;
    text-align: justify;
  }

  .apel-112 {
    border: 1px solid rgba(230, 223, 197, 0.6);
    margin: 2rem auto;
    width: 60%;
    height: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
  }

  .apel-112 h2 {
    font-weight: 600;
    color: rgb(42, 45, 50);
    font-size: 1.5rem;
    margin: auto;
  }

  .despre-noi {
    width: 90%;
    padding: 1rem;
    margin: 1rem auto;
    background-color: #fbfbfb;
    text-align: justify;
  }

  .despre-noi p {
    text-indent: 30px;
    font-size: 1rem;
    color: #747474;
  }

  .despre-noi ul {
    list-style-type: square;
    color: #747474;
    margin: 0.5rem;
    text-align: left;
  }

  footer .info {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-title {
    text-align: center;
    font-weight: 700;
    margin: 5% 0 40px 0;
    color: #1a365d;
    font-size: 1.5rem !important;
    text-transform: uppercase;
  }

  /* =========================== Meniu Lateral Mobil (Slide-in) =============================== */
  .mobile-menu-btn {
    display: block !important;
    cursor: pointer;
    color: #ffffff;
    font-size: 2rem;
    position: absolute;
    left: 20px;
    /* Poziția inițială (în stânga paginii) */
    top: 20px;
    /* Sus */
    z-index: 1002;
    /* Această linie face mișcarea fluidă, la fel ca panoul */
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
  }

  .mobile-menu-btn.is-open {
    /* Glisează butonul în dreapta, deasupra panoului (care are lățimea de 300px) */
    left: 262px;
    top: -30px;
    z-index: 99999999;

    /* Opțional: o mică rotație când se transformă în X pentru un efect wow */
    transform: rotate(90deg);
  }

  .header_bottom_inner {
    justify-content: center;
    width: 100%;
    margin-left: 0;
    padding: 0 15px;
  }

  /* Panoul lateral (Sidebar) */
  .header_bottom_right {
    display: flex !important;
    position: fixed;
    top: 0;
    left: -320px;
    /* Ascuns în stânga */
    width: 300px;
    height: 100vh;
    background-color: #2b4b7c;
    flex-direction: column;
    margin-left: 0;
    padding: 70px 0 20px 0;
    /* Am lăsat loc fix sus pentru X */
    grid-template-columns: 1fr;
    overflow-y: auto;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }

  .header_bottom_right.active {
    left: 0;
  }

  .dropdown {
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Linkurile principale și textul lor */
  .dropbtn,
  .dropbtn a {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    color: #ffffff !important;
    /* Forțăm textul alb */
    font-size: 1.1rem;
    font-family: inherit;
  }

  /* Săgeata pentru submeniu */
  .dropbtn.has-submenu::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    color: #ffffff;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
  }

  .dropdown.active .dropbtn.has-submenu::after {
    transform: rotate(180deg);
  }

  .dropdown-content {
    position: static;
    display: none;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: none;
  }

  /* REZOLVAT: Text alb și indentare mai mică */
  .dropdown-content a {
    color: #ffffff !important;
    padding: 12px 20px 12px 25px;
    /* <--- Aici am corectat ieșirea din plan */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    font-size: 1rem;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }

  /* ========================================================================= */

  .mobile-menu-btn {
    display: block !important;
    cursor: pointer;
    color: white;
    font-size: 1.8rem;
    margin-right: 20px;
    z-index: 101;
  }

  .header_top_left {
    height: 100%;
    width: 100%;
    margin: auto;
  }

  .header_bottom_right {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
    position: absolute;
    left: 25px;
    top: 30%;
  }

  .header_bottom_left img {
    width: 4rem;
  }

  .header_bottom_left {
    width: 80%;
  }

  .middle-icon {
    font-size: 30px;
    line-height: 40px;
    width: 30%;
    color: #3eb8d7;
    background-color: rgba(255, 255, 255, 0);
    margin: 1rem auto;
  }

  #userwayAccessibilityIcon {
    top: 40rem;
    right: 1px;
    left: auto;
  }

  .facebook-iconita img {
    position: fixed;
    z-index: 2;
    right: 1.4rem;
    top: 36rem;
    width: 2.5rem;
  }

  .facebook-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: auto;
  }

  .meta_wrap {
    width: 40%;
  }

  .side-icons {
    position: fixed;
    z-index: 2;
    left: 80%;
    top: 1%;
  }

  .lozinca {
    display: block;
    position: absolute;
    top: -3rem;
    left: 2rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 10;
  }


}

/************************************************* CALCULATOR **************************************************/
@media (min-width: 981px) {
  .video-div {
    display: block;
  }

  #id_cover_mobil {
    display: none;
  }

  .middle-icon {
    color: #3eb8d7;

  }

  .lozinca {
    display: block;
    position: absolute;
    top: -5rem;
    left: 2rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 10;
  }

  #asistaclass p {
    color: rgba(255, 255, 255, 0.778);
    font-size: 1rem;
    width: 100%;
  }

  .asistadiv {
    position: absolute;
    width: 150%;
    top: 0.5rem;
    width: 80%;
  }

  .page-title {
    font-size: 1rem;
  }

  #userwayAccessibilityIcon {
    top: 32rem;
    bottom: 13px;
    right: 0px;
    left: auto;
  }

  .facebook-iconita img {
    position: fixed;
    z-index: 2;
    right: 1.6rem;
    top: 29rem;
    width: 2.5rem;
  }

  .facebook-footer {
    display: inline-flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    justify-items: baseline;
  }

  .colored-card img {
    width: 40%;
    height: auto;
    border-radius: 11px;
  }

  .middle-row-inner {
    width: 90%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .middle-row {
    width: 100%;
    margin: 1rem auto;
  }

  .middle-cards {
    display: flex;
    flex-direction: row;
    width: 95%;
    margin: 0 auto;
  }

  .transport-medical {
    padding: 0;
    color: #21343a;
    font-size: 17px;
    line-height: 1.75;
    letter-spacing: .1px;
    width: 80%;
    margin: 2rem auto;
  }

  .despre-noi {
    width: 90%;
    padding: 2rem 3rem;
    margin: 1rem auto;
    background-color: #fbfbfb;
  }
}

/*************************************************** ECRANE MARI ******************************************************/
@media (min-width: 1200px) {
  .video-div {
    display: block;
  }

  .middle-icon {
    color: #3eb8d7;

  }

  .lozinca {
    display: block;
  }

  #asistaclass p {
    color: rgba(255, 255, 255, 0.778);
    font-size: 1rem;
    width: 100%;
  }

  .facebook-footer {
    display: inline-flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    justify-items: baseline;
  }

  .colored-card img {
    width: 40%;
    height: auto;
    border-radius: 11px;
  }
}