/* ============================================================
   1. REGULI GLOBALE & RESET
============================================================ */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important; 
    margin: 0;
    padding: 0;
    width: 100%;
}

* { box-sizing: border-box; }

/* ============================================================
   2. CONFIGURARE MOBIL (Header: Burger pe Mijloc, Steaguri Dreapta)
============================================================ */
@media (max-width: 1024px) {

    .mega-navbar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 80px !important; 
        z-index: 99999;
        background: #0a1428 !important;
    }

    .nav-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important; 
        align-items: center !important;
        height: 100%;
        padding: 0 15px !important;
    }

    .nav-menu, .button-menu, .site-title {
        display: none !important;
    }

    /* LOGO - Stânga */
    .logo-section {
        order: 1 !important;
        flex: 1 !important; 
        display: flex !important;
        justify-content: flex-start !important;
    }

    .giant-logo {
        height: 55px !important;
        width: auto !important;
    }

    /* BURGER - MIJLOC */
    .mobile-nav {
        display: block !important;
        order: 2 !important;
        flex: 0 1 auto !important; 
        text-align: center !important;
    }

    .hamburger {
        font-size: 2.5rem !important; 
        color: #00bfff !important;
        background: none;
        border: none;
    }

    /* STEAGURI - DREAPTA (Verticale) */
    .contact-sidebar {
        display: flex !important; 
        order: 3 !important;
        flex: 1 !important; 
        flex-direction: column !important; 
        align-items: flex-end !important; 
        gap: 5px !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
    }

    .contact-sidebar span, 
    .contact-sidebar a:not([class*="lang"]):not([class*="flag"]) {
        display: none !important;
    }

    .language-switcher, [class*="lang"], .flags-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
    }

    .contact-sidebar img, .language-switcher img, [class*="lang"] img {
        width: 22px !important;
        height: auto !important;
    }

    /* REPARAȚIE SECȚIUNE DESPRE NOI */
    .despre-container, .about-section { 
        display: flex !important;
        flex-direction: column-reverse !important;
        align-items: center !important;
        padding: 40px 20px !important;
    }

    .despre-image img {
        width: 100% !important;
        max-width: 400px;
        height: auto !important;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    #homepage, section:first-of-type {
        padding-top: 100px !important;
    }
}

/* ============================================================
   3. MENIUL CARE COBOARĂ (REVENIT LA VARIANTA TA INIȚIALĂ)
============================================================ */
#menu {
    display: block !important;
    list-style: none;
    padding: 20px 0;
    margin: 0;
    position: fixed; 
    top: 80px; 
    left: 0; 
    width: 100%;
    background: rgba(10, 20, 40, 0.95) !important; 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 191, 255, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 99998;
}

#menu.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

#menu li a {
    display: block;
    padding: 15px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* ============================================================
   4. RESET DESKTOP
============================================================ */
@media (min-width: 1025px) {
    .mobile-nav, #menu { display: none !important; }
    .nav-menu, .contact-sidebar, .button-menu { display: flex !important; }
}

/* --- Stil Desktop (rămâne la fel) --- */
.footer-legal-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}
.footer-legal-badges img {
    width: 180px; /* Aici forțăm dimensiunea fixă să nu mai crească */
    height: auto;
}

/* --- Stil MOBIL (Centrare și Control Dimensiune) --- */
@media (max-width: 1024px) {
    /* Forțăm containerul mare să fie pe tot rândul și să centreze conținutul */
    .centrare-mobil-fortata {
        display: block !important;
        text-align: center !important;
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 0 !important;
        float: none !important;
    }

    /* Forțăm link-urile să stea unul sub altul și la mijloc */
    .centrare-mobil-fortata a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin: 10px auto !important;
    }

    /* Forțăm coloana de contact să nu mai tragă spre stânga */
    .footer-column {
        align-items: center !important;
        text-align: center !important;
    }
}

/* --- REPARARE FINALĂ ALINIERE FOOTER MOBIL --- */
@media (max-width: 1024px) {
    /* Forțăm containerul părinte să nu aibă spații laterale parazite */
    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 20px 0 !important;
    }

    /* Fiecare coloană trebuie să fie un container centrat 100% */
    .footer-column {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 30px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Asta pune totul pe mijloc */
        text-align: center !important;
    }

    /* Resetăm listele de link-uri (să nu aibă spațiu în stânga) */
    .footer-column ul {
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        width: 100% !important;
    }

    /* Link-urile individuale */
    .footer-column ul li, 
    .footer-column p, 
    .footer-column a {
        text-align: center !important;
        justify-content: center !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Iconițele sociale la mijloc */
    .social-icons {
        display: flex !important;
        justify-content: center !important;
        gap: 15px !important;
        width: 100% !important;
    }
}

/* --- EFECT FULL-WIDTH POZĂ "DESPRE NOI" PE MOBIL --- */
@media (max-width: 1024px) {
    /* Pasul 1: Scoatem padding-ul lateral și de sus din containerul părinte */
    .despre-container {
        padding: 0 !important; /* Eliminăm rama din jurul pozei */
        overflow: hidden !important; /* Ne asigurăm că colțurile rotunjite ale pozei nu ies afară */
        display: flex !important;
        flex-direction: column-reverse !important; /* Păstrăm poza sus, textul jos */
        align-items: center !important;
    }

    /* Pasul 2: Forțăm imaginea să ocupe TOT spațiul disponibil (sus, stânga, dreapta) */
    .despre-container .image {
        width: 100% !important;
        max-width: 100% !important; /* Anulăm max-width-ul anterior de 400px */
        margin: 0 !important; /* Eliminăm orice margine (sus, jos, stânga, dreapta) */
        padding: 0 !important;
    }

    .despre-container .image img {
        width: 100% !important;
        height: auto !important;
        border-radius: 0 !important; /* Scoatem colțurile rotunjite ca să se lipească perfect de margini */
        display: block !important;
        object-fit: cover !important; /* Asigurăm că imaginea acoperă spațiul fără să se deformeze */
    }

    /* Pasul 3: Punem la loc spațiul doar pentru text, ca să nu se lipească de margini */
    .despre-container .text {
        width: 100% !important;
        padding: 25px 20px !important; /* Spațiu sus-jos și stânga-dreapta doar pentru text */
        text-align: left !important; /* Aliniem textul la stânga pentru citire ușoară */
    }
}

/* ============================================================
   RESPONSIVE FIX – CARDURI TRAINING / AUDIT / PLATFORM
============================================================ */
@media (max-width: 1024px) {

    .services-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 25px !important;
        padding: 0 !important;
    }

    .service-item {
        width: 280px !important;   /* 👈 card mai îngust, identic cu desktop */
        max-width: 90% !important; /* 👈 dacă e ecran foarte mic, nu iese în afară */
        margin: 0 auto !important;
        padding: 25px 20px !important;
        border-radius: 16px !important;
    }

    .service-item h3 {
        min-height: 60px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center !important;
    }

    .service-item p {
        min-height: 120px !important;
        text-align: center !important;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .icon-glow {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 15px !important;
    }

    .icon-glow i {
        font-size: 40px !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
}
