/* ========================================
   ATCSOL - Index Page (Accordion Layout)
   ======================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    overflow: hidden;
    font-family: "Gotham", "Roboto", Arial, Helvetica, sans-serif;
    font-weight: 400;
}

/* Ken Burns Animation */
@keyframes kenburns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.15) translate(-20px, -10px);
    }
}

/* Logo Header */
.logo-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 30px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.logo-header img {
    height: 50px;
    width: auto;
}

/* Accordion Container */
.accordion-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Accordion Item */
.accordion-item {
    position: relative;
    flex: 1;
    overflow: hidden;
    transition: flex 0.5s ease;
    cursor: pointer;
}

.accordion-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    animation: kenburns 20s ease-out infinite alternate;
    z-index: 0;
}

.accordion-item:nth-child(1)::after {
    background-image: url('../images/general-aviation.webp');
}

.accordion-item:nth-child(2)::after {
    background-image: url('../images/airport-infrastructure.webp');
}

.accordion-item:nth-child(3)::after {
    background-image: url('../images/government-and-military.webp');
}

.accordion-item:hover,
.accordion-item.active {
    flex: 3;
}

/* Overlay */
.accordion-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease;
    z-index: 2;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
}

.accordion-item:hover::before {
    background: rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.7);
}

/* Content */
.accordion-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    color: white;
    text-align: center;
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.accordion-content h2 {
    font-family: "After", serif;
    font-size: 42px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    transition: all 0.4s ease;
}

/* Quando não está em hover, só mostra o título */
.accordion-item:not(:hover):not(.active) .accordion-content h2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.accordion-content p {
    font-family: "Gotham", sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    margin: 15px 0 10px 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease 0.2s;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.accordion-item:hover .accordion-content p,
.accordion-item.active .accordion-content p {
    opacity: 1;
    max-height: 100px;
}

.accordion-content ul {
    list-style: none;
    margin: 20px auto;
    padding: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease 0.3s;
    max-width: 450px;
}

.accordion-item:hover .accordion-content ul,
.accordion-item.active .accordion-content ul {
    opacity: 1;
    max-height: 500px;
}

.accordion-content ul li {
    font-family: "Gotham", sans-serif;
    font-weight: 400;
    padding: 6px 0;
    position: relative;
    font-size: 16px;
    text-align: left;
    padding-left: 25px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.accordion-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

.accordion-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.accordion-item:hover .accordion-btn,
.accordion-item.active .accordion-btn {
    opacity: 1;
    max-height: 60px;
    transition-delay: 0.4s;
}

.accordion-btn:hover {
    background: white;
    color: #222;
}

/* Mobile - Celular */
@media (max-width: 768px) {
    body, html {
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
    }

    .logo-header {
        top: 10px;
        padding: 8px 20px;
    }

    .logo-header img {
        height: 35px;
    }

    .accordion-container {
        flex-direction: column;
        height: auto;
    }

    .accordion-item {
        min-height: 33.33vh;
        height: auto;
        flex: none !important;
        background-size: cover;
        background-position: center;
        background-attachment: scroll;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 30px 15px;
        transition: all 0.4s ease;
    }

    .accordion-item.mobile-expanded {
        min-height: 100vh;
    }

    .accordion-item:hover,
    .accordion-item.active {
        flex: none !important;
    }

    .accordion-item::before {
        background: rgba(0, 0, 0, 0.65) !important;
        box-shadow: none !important;
    }

    .accordion-content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: none;
        padding: 0;
        display: block;
    }

    .accordion-item:not(:hover):not(.active) .accordion-content h2 {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }

    .accordion-content h2 {
        font-size: 26px;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 0;
        line-height: 1.3;
        letter-spacing: 0.5px;
    }

    /* No mobile, conteúdo começa escondido */
    .accordion-content p {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        margin: 0;
        font-size: 15px;
        line-height: 1.5;
        transition: all 0.4s ease;
    }

    .accordion-item.mobile-expanded .accordion-content p {
        opacity: 1;
        max-height: 200px;
        margin: 12px 0 8px 0;
        line-height: 1.3;
    }

    .accordion-content ul {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        margin: 0;
        text-align: left;
        padding: 0;
        transition: all 0.4s ease 0.1s;
    }

    .accordion-item.mobile-expanded .accordion-content ul {
        opacity: 1;
        max-height: 800px;
        margin: 12px 0;
    }

    .accordion-content ul li {
        font-size: 14px;
        padding: 2px 0 2px 22px;
        line-height: 1.3;
    }

    .accordion-content ul li::before {
        font-size: 12px;
    }

    .accordion-btn {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        margin: 0;
        padding: 10px 20px;
        font-size: 13px;
        display: inline-block;
        border-width: 1px;
        transition: all 0.4s ease 0.2s;
    }

    .accordion-item.mobile-expanded .accordion-btn {
        opacity: 1;
        max-height: 60px;
        margin-top: 35px;
    }

    /* Indicador de tap */
    .accordion-content h2::after {
        content: '▼';
        font-size: 16px;
        margin-left: 10px;
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .accordion-item.mobile-expanded .accordion-content h2::after {
        transform: rotate(180deg);
    }
}

/* Celulares pequenos */
@media (max-width: 480px) {
    .accordion-item {
        min-height: 33.33vh;
        padding: 25px 12px;
    }

    .accordion-item.mobile-expanded {
        min-height: 100vh;
    }

    .accordion-content h2 {
        font-size: 23px;
    }

    .accordion-content h2::after {
        font-size: 14px;
    }

    .accordion-item.mobile-expanded .accordion-content p {
        font-size: 14px;
    }

    .accordion-content ul li {
        font-size: 13px;
        padding-left: 20px;
    }

    .accordion-item.mobile-expanded .accordion-btn {
        font-size: 13px;
        padding: 8px 16px;
        margin-top: 60px !important;
    }

    .accordion-content ul {
        margin-bottom: 20px !important;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .accordion-content {
        max-width: 400px;
    }

    .accordion-content h2 {
        font-size: 28px;
    }

    .accordion-content p {
        font-size: 14px;
    }

    .accordion-content ul li {
        font-size: 13px;
    }
}
