/* ========== RESPONSIVIDADE ========== */

/* ========== MENU HAMBURGER ========== */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #007bff;
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animação do menu hamburger quando ativo */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Desktop - menu normal (acima de 768px) */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
    
    .nav-menu {
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    .nav-menu ul {
        flex-direction: row !important;
        gap: 25px !important;
    }
    
    .nav-menu li {
        border: none !important;
    }
    
    .nav-menu a {
        padding: 8px 4px !important;
        font-size: inherit !important;
    }
    
    .nav-menu a.btn {
        background-color: #101B37 !important;
        color: #fff !important;
        padding: 8px 16px !important;
        border-radius: 6px !important;
        margin: 0 !important;
        width: auto !important;
    }
    
    .menu-overlay {
        display: none !important;
    }
}

/* Responsividade em tablets - até 768px */
@media (max-width: 768px) {
    /* Header responsivo */
    header {
        padding: 25px 30px;
        min-height: 80px;
    }
    
    .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        min-height: auto;
    }
    
    .logo {
        margin-bottom: 0;
    }
    
    .logo img {
        height: 50px;
        width: 150px;
        margin-bottom: 0;
    }
    
    /* Mostrar botão hamburger */
    .menu-toggle {
        display: flex;
    }
    
    /* Menu mobile */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        padding-top: 80px;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        align-items: stretch;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-menu a {
        display: block;
        padding: 20px 30px;
        text-decoration: none;
        color: #333;
        font-size: 16px;
        transition: background-color 0.3s ease;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-menu a:hover {
        background-color: #f8f9fa;
    }
    
    .nav-menu a.btn {
        background-color: #007bff;
        color: white;
        margin: 20px 30px;
        border-radius: 5px;
        text-align: center;
        width: calc(100% - 60px);
    }
    
    .nav-menu a.btn:hover {
        background-color: #0056b3;
    }
    
    /* Overlay para fechar menu ao clicar fora */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Hero section responsivo - layout lado a lado */
    .hero {
        flex-direction: column;
        padding: 40px 20px;
        height: auto;
        background-size: contain;
        align-items: center;
    }
    
    .hero-content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 20px;
        padding: 0 20px; /* Margem lateral */
        gap: 30px; /* Espaçamento entre texto e computador */
    }
    
    .hero-text {
        flex: 0 1 45%;
        margin-left: 0;
        text-align: left;
    }
    
    .hero-text h2 {
        font-size: 24px;
    }
    
    .hero-image {
        flex: 0 1 45%;
        text-align: right;
    }
    
    .hero-image img {
        width: 100%;
        max-width: 300px;
    }
    
    /* Botão separado embaixo */
    .hero-button {
        display: block;
        text-align: center;
        width: 100%;
    }
    
    /* Cards de serviços responsivos - 2 colunas */
    .servicos {
        padding: 40px 20px;
    }
    
    .cardsContainer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        justify-items: center;
    }
    
    .card {
        width: 100%;
        max-width: 280px;
    }
    
    /* Cases responsivos - 2 colunas */
    .cases {
        padding: 40px 20px;
    }
    
    .cases-container {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        max-width: 100%;
    }
    
    .case-card {
        width: 100%;
    }
    
    /* Logo Goodbye Hospital menor em tablets */
    .case-image-area img.case-logo {
        width: 220px !important;
        height: 220px !important;
    }
    
    /* Footer responsivo */
    .footer-contact {
        flex-direction: column;
        gap: 20px;
        margin-left: 20px;
        align-items: center;
        text-align: center;
    }
}

/* Responsividade em telas mobile - até 480px */
@media (max-width: 480px) {
    /* Header mobile */
    header {
        padding: 15px 20px;
        min-height: 70px;
    }
    
    .container {
        gap: 0;
    }
    
    .logo img {
        height: 45px;
        width: 135px;
    }
    
    /* Menu mobile em telas pequenas */
    .nav-menu {
        width: 80%;
        padding-top: 70px;
    }
    
    .nav-menu a {
        padding: 18px 25px;
        font-size: 15px;
    }
    
    .nav-menu a.btn {
        margin: 15px 25px;
        width: calc(100% - 50px);
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* Hero mobile - mantém layout lado a lado */
    .hero {
        padding: 30px 15px;
        background-size: 120%;
    }
    
    .hero-content {
        justify-content: space-between;
        margin-bottom: 15px;
        padding: 0 15px; /* Margem lateral menor no mobile */
        gap: 20px; /* Espaçamento menor no mobile */
    }
    
    .hero-text {
        flex: 0 1 45%;
    }
    
    .hero-image {
        flex: 0 1 45%;
    }
    
    .hero-text h2 {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .hero-image img {
        width: 100%;
        max-width: 250px;
    }
    
    .hero-button .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    /* Serviços mobile - mantém 2 colunas */
    .servicos {
        padding: 30px 15px;
    }
    
    .servicos-titulo h1 {
        font-size: 26px;
    }
    
    .servicos-titulo p {
        font-size: 16px;
    }
    
    .cardsContainer {
        gap: 15px;
    }
    
    .card {
        max-width: 250px;
        height: auto;
        min-height: 380px;
    }
    
    /* Cases mobile - mantém 2 colunas */
    .cases {
        padding: 30px 15px;
    }
    
    .cases-titulo h1 {
        font-size: 26px;
    }
    
    .cases-titulo p {
        font-size: 16px;
    }
    
    .cases-container {
        gap: 15px;
        max-width: 100%;
    }
    
    /* Logo Goodbye Hospital menor em mobile */
    .case-image-area img.case-logo {
        width: 170px !important;
        height: 170px !important;
    }
    
    /* Footer mobile */
    footer {
        padding: 40px 0 80px 0;
    }
    
    .footer-contact {
        margin-left: 0;
        gap: 15px;
    }
    
    .contact-item i {
        font-size: 20px;
    }
    
    .contact-item p {
        font-size: 14px;
    }
}

/* Responsividade da página em telas muito pequenas - até 375px */
@media (max-width: 375px) {
    header {
        padding: 15px 15px;
        min-height: 65px;
    }
    
    .logo img {
        height: 40px;
        width: 120px;
    }
    
    /* Menu mobile em telas muito pequenas */
    .nav-menu {
        width: 85%;
        padding-top: 65px;
    }
    
    .nav-menu a {
        padding: 16px 20px;
        font-size: 14px;
    }
    
    .nav-menu a.btn {
        margin: 12px 20px;
        width: calc(100% - 40px);
        padding: 10px 15px;
        font-size: 14px;
    }
    
    /* Logo Goodbye Hospital ainda menor em telas muito pequenas */
    .case-image-area img.case-logo {
        width: 140px !important;
        height: 140px !important;
    }
}