/* ==========================================================================
   1. RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

body {
    width: 100%;
    min-height: 100vh;
    background-image: url(bg.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ==========================================================================
   2. LAYOUT ESTRUTURAL (Grid/Flex)
   ========================================================================== */
.parent {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
}

.colun1 {
    flex: 1;
    max-width: 1200px;
    padding: 10px;
    min-width: 0; /* Evita quebra de layout em flexbox */
}

.colun2 {
    width: 320px;
    padding: 10px;
    flex-shrink: 0;
}

/* ==========================================================================
   3. COMPONENTES (Navbar, Forms, Widgets)
   ========================================================================== */

/* --- Navigation Bar --- */
nav {
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000;
}

nav ul {
    background-color: #000;
    list-style: none;
}

nav ul li {
    display: inline-block;
    font-weight: bolder;
    text-transform: uppercase;
    font-size: 16px;
    padding: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #fff;
}

/* --- Search System --- */
#navbar-form {
    position: relative;
    display: inline-flex;
    margin-right: 10px;
}

#search-form {
    display: inline-flex;
    width: 310px;
    height: 40px;
    position: absolute;
    right: 100%;
    transform: scale(0,0);
    transform-origin: center right;
    transition: 0.4s transform linear;
}

#search-bar {
    width: 350px;
    height: 40px;
    padding: 10px;
    color: #000;
    font-size: 18px;
}

#search-btn {
    width: 60px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: #fff;
    border: none;
    outline: none;
    background-color: #414141;
}

#search-form-opener, 
#search-form-closer {
    width: 60px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 25px;
    font-weight: bolder;
    cursor: pointer;
}

#search-form-closer {
    background-color: rgba(0, 0, 0, 0.65);
    display: none;
}

/* --- Elementos Diversos --- */
.resultshow {
    border: 1px solid lightgrey;
    padding: 8px;
    border-radius: 6px;
    font-size: 17px;
    width: 100%;
    margin: 12px 0;
    background-color: rgba(255,255,255,0.9); /* Opcional: para legibilidade sobre o BG */
}

input[type="checkbox"] {
    display: none;
}

#toggler {
    width: 100px;
    height: 35px;
    display: none; /* Ativado via Media Query */
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: bolder;
    font-size: 20px;
    border: 1px solid #fff;
}

/* --- Video/Iframe Containers --- */
div[style*="max-width:560px"] {
    width: 100%;
    max-width: 560px;
    margin: 20px auto;
}

div[style*="max-width:560px"] iframe {
    width: 100% !important;
    height: calc(100vw * 9 / 16) !important;
    max-height: 315px;
    display: block;
}

/* ==========================================================================
   4. LOGIC / INTERACTION (States)
   ========================================================================== */
#box-2:checked ~ #search-form { transform: scale(1,1); }
#box-2:checked ~ #search-form-opener { display: none; }
#box-2:checked ~ #search-form-closer { display: flex; }

/* ==========================================================================
   5. RESPONSIVIDADE (Media Queries)
   ========================================================================== */

/* Tablet e Mobile */
@media (max-width: 786px) {
    .parent {
        flex-direction: column;
        align-items: center;
    }

    .colun1, .colun2 {
        width: 95%; /* Ajustado para não colar nas bordas */
        max-width: 100%;
    }

    #toggler {
        display: flex;
    }

    nav ul {
        position: absolute;
        top: 70px;
        left: -100%;
        width: 100%;
        text-align: center;
        transition: left 0.5s ease-in-out;
        z-index: 1000;
    }

    nav ul li {
        display: block;
        padding: 20px 0;
        border-bottom: 1px solid #222;
    }

    #box-1:checked ~ ul {
        left: 0;
    }
}