:root {
    --latam-red: #ED1C24;
    --latam-dark: #1A1A1A;
    --latam-gray: #F5F5F5;
    --latam-border: #E0E0E0;
    --latam-text: #333333;
    --latam-white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
    --transition: all 0.2s ease;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'Lato', sans-serif;
    color: var(--latam-text);
    background-color: var(--latam-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER ========== */
.latam-header {
    background: rgb(16, 0, 79);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo img { height: 32px; display: block; }

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 28px;
}
.main-nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 20px 0 18px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}
.main-nav a.active,
.main-nav a:hover {
    color: var(--latam-red);
    border-bottom-color: var(--latam-red);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.btn-outline {
    border: 0.0625rem solid transparent;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 20px;
    border-radius: 3.125rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}
.btn-outline:hover {
    border-color: rgba(255, 255, 255);
    color: var(--latam-white);
}

/* Language Selector */
.lang-selector {
    position: relative;
}
.lang-current {
    background: none;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border: none;
    gap: 6px;
    font-size: 13px;
    color: #fff;
    font-family: 'Lato', sans-serif;
}

.lang-current .flag-icon { font-size: 16px; color: #fff; }
.lang-current .arrow { font-size: 10px; margin-left: 4px; color: #fff;}

.lang-dropdown {
    position: absolute;
    color: #fff;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    list-style: none;
    min-width: 220px;
    padding: 8px 0;
    display: none;
    z-index: 10;
}
.lang-dropdown.show { display: block; }
.lang-dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--latam-text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.lang-dropdown li a:hover {
    background: #f0f0f0;
}
.lang-dropdown .flag-icon { font-size: 16px; }

/* ========== BUSCADOR ========== */
.buscador{
    display: flex;
    justify-content: space-evenly;
    align-items: baseline;
    margin: 0rem 5rem;
}
.buscador .card{
    box-shadow: rgba(48, 48, 48, 0.1) 0px 0.25rem 0.5rem;
    background: rgb(255, 255, 255);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    grid-area: overlap-start / content-start / content-end / overlap-end;
    padding: 1rem;
    top: -7rem;
    position: relative;
    z-index: 4;
    overflow: hidden;
}

/* ========== HERO ========== */
.checkin-hero {
    background-image: url('images/slider1.jpg')no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 240px;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}
.checkin-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url(https://s.latamairlines.com/images/web-passenger-checkin/xp_preflight_checkin_bg_desktop.jpg)no-repeat;
    background-size: cover;
    height: 230px;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    padding: 40px 20px;
}
.hero-content h1 {
    color: rgb(27, 0, 136);
    font-size: 2.25rem;
    font-weight: 200;
    margin-bottom: 12px;
    line-height: 1.2;
}
.hero-content h1 span{
    color: rgb(27, 0, 136);
    font-size: 2.25rem;
    font-style: italic;
    font-weight: normal;
    margin-bottom: 12px;
    line-height: 1.2;
}
.hero-content ul li{
    font-size: 18px;
    padding-bottom: 1.5rem;
}
.info-box {
    color: var(--latam-text);
    text-align: left;
}
.info-box p {
    margin-bottom: 10px;
    font-size: 17px;
    padding-bottom: 1rem;
    line-height: 1.5;
}
.highlight-text {
    color: rgb(27, 0, 136);
    font-size: 18px;
    font-style: italic;
    margin-bottom: 2rem;
}
.hero-content .line{
    border-top: 1px solid #333333;
}
.hero-content a{
    position: absolute;
    bottom: 1px;
    font-weight: 700;
    text-decoration: none
}

/* ========== CHECK-IN CARD ========== */
.checkin-card-section {
    margin-top: -60px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding-bottom: 60px;
}
.checkin-card {
    border-radius: 12px;
    margin-top: 8rem;
    padding: 40px;
    max-width: 450px;
    width: 100%;
}
.checkin-card h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--latam-dark);
}
.card-subtitle {
    color: #666;
    margin-bottom: 24px;
    font-size: 15px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--latam-border);
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    transition: var(--transition);
}
.form-group input:focus {
    outline: none;
    border-color: var(--latam-red);
    box-shadow: 0 0 0 3px rgba(237,28,36,0.1);
}
.form-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.form-actions {
    margin-top: 28px;
}
.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--latam-red);
    color: var(--latam-white);
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
    font-family: 'Lato', sans-serif;
}
.btn-primary:hover {
    background: #C41820;
}
.btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.error-message {
    background: #FFF0F0;
    border: 1px solid #FFD0D0;
    color: #D32F2F;
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 14px;
    display: none;
}

.checkin-info {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--latam-border);
}
.checkin-info h3 {
    font-size: 18px;
    margin-bottom: 12px;
}
.checkin-info ol {
    padding-left: 20px;
    margin-bottom: 16px;
}
.checkin-info li {
    margin-bottom: 8px;
    font-size: 14px;
}
.info-note {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/*======= Resultados =======*/
.chek_in {
    contain: content;
    width: fit-content;
    justify-self: center;
    background: rgb(243, 242, 246);
    height: 100%;
    padding: 0px 1rem;
    width: 100vw;
    padding-bottom: 5rem;
}
.chek_in .container{
    margin: 0px auto;
    max-width: 834px;
    width: 100%;
}
.chek_in .top-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4c5be7;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 28px;
}

.chek_in .top-link .arrow {
    font-size: 38px;
    line-height: 1;
    margin-top: -4px;
}

.chek_in .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 26px;
}

.chek_in .title h1 {
    font-size: 2.5rem;
    line-height: 3rem;
    letter-spacing: 0px;
    color: #2b2b2b;
    margin-bottom: 8px;
}

.chek_in .title p {
    font-size: 23px;
    color: #5b5b5b;
    font-weight: 300;
}

.chek_in .chek_in .order {
    margin-top: 55px;
    font-size: 20px;
    color: #595959;
    font-weight: 700;
}

.chek_in .card-wrapper {
    position: relative;
    width: 100%;
    max-width: 1080px;
}

.chek_in .status {
    position: absolute;
    top: -30px;
    right: 0;
    background: #696969;
    color: white;
    padding: 8px 18px;
    border-radius: 18px 18px 0 0;
    font-size: 16px;
    font-weight: 500;
}

.chek_in .status.completado {
    background: #2E7D32;
}

.chek_in .card {
    background: #fff;
    border-radius: 14px;
    padding: 28px 30px 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.03);
}

.chek_in .left {
    width: 48%;
}

.chek_in .flight-code {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.chek_in .logo {
    background: url(images/LA.png);
    width: 16px;
    height: 32px;
}

.chek_in .flight-code span {
    font-size: 14px;
    padding-left: 0.7rem;
    font-weight: 700;
    color: #24304b;
}

.chek_in .label {
    color: #5c5c5c;
    font-size: 14px;
    margin-bottom: 8px;
}

.chek_in .route {
    font-size: 20px;
    font-weight: 700;
    color: #07186f;
    margin-bottom: 14px;
    line-height: 1.1;
}

.chek_in .date {
    font-size: 14px;
    color: #4f4f4f;
    margin-bottom: 26px;
}

.chek_in .times {
    display: flex;
    gap: 32px;
    align-items: center;
}

.chek_in .time-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3d3d3d;
    font-size: 14px;
}

.chek_in .plane {
    color: #1A1A1A;
    height: 24px;
    display: inline-flex;
    -webkit-writing-mode: vertical-rl;
}

.chek_in .right {
    width: 42%;
    padding-top: 46px;
}

.chek_in .passengers {
    font-size: 14px;
    margin-bottom: 22px;
    color: #333;
}

.chek_in .passengers strong {
    font-weight: 700;
}

.chek_in .badge {
    display: inline-block;
    background: #e6f1f2;
    color: #324c77;
    padding: 12px 18px;
    border-radius: 24px;
    font-size: 18px;
    font-weight: 500;
}

.acciones {
    margin-top: 30px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-accion {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
}

.btn-checkin {
    background: #f23d5e;
    color: white;
}

.btn-checkin:hover {
    background: #d93450;
}

.btn-pdf {
    background: #1d1d1f;
    color: white;
}

.btn-pdf:hover {
    background: #333;
}

.error-message {
    background: #FFF0F0;
    border: 1px solid #FFD0D0;
    color: #D32F2F;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    display: none;
}

@media (max-width: 900px) {
    body {
        padding: 24px;
    }

    .chek_in .header {
        flex-direction: column;
        gap: 20px;
    }

    .chek_in .order {
        margin-top: 0;
    }

    .chek_in .card {
        flex-direction: column;
        gap: 30px;
    }

    .chek_in .left,
    .chek_in .right {
        width: 100%;
    }

    .chek_in .route {
        font-size: 32px;
    }

    .chek_in .title h1 {
        font-size: 44px;
    }
}

/* ========== FOOTER ========== */
.latam-footer {
    padding: 24px 0;
    background-color: rgb(236, 236, 238);
    border-top: 0.0625rem solid rgb(184, 184, 184);
    display: flex;
    flex-direction: column;
    -webkit-box-pack: center;
    justify-content: center;
    width: 100%;
}
.latam-footer .container{
    display: flex;
    column-gap: 2rem;
    padding: 1rem 0rem;
}
.latam-footer .container p{
    color: rgb(92, 92, 92);
    display: block;
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    padding: 0px 0.5rem 0.25rem 0px;
}
.footer2rp{
    display: flex;
}
/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .main-nav { display: ; }
    .header-container { height: auto; padding: 12px 20px; flex-wrap: wrap; }
    .hero-content h1 { font-size: 30px; }
    .hero-subtitle { font-size: 17px; }
    .checkin-card { padding: 24px; margin: 0 10px; 
    }
    .checkin-hero::before {
        background-position: center;
    }
    /* ========== BUSCADOR ========== */
    .buscador{
        display: contents;
        justify-content: space-evenly;
        align-items: baseline;
        margin: 0rem 5rem;
    }
    .buscador .card{
        display: flex;
        flex-direction: column;
        gap: 1rem;
        grid-area: overlap-start / content-start / content-end / overlap-end;
        padding: 1rem;
        top: 1rem;
        position: relative;
        z-index: 4;
        overflow: hidden;
    }
    .checkin-card {
        padding: 24px;
        margin-top: 5rem;
    }
    .latam-footer {
        padding: 24px 15px;
        background-color: rgb(236, 236, 238);
        border-top: 0.0625rem solid rgb(184, 184, 184);
        display: block;
        flex-direction: column;
        -webkit-box-pack: center;
        justify-content: center;
        width: 100%;
    }
    .latam-footer .container{
        display: contents;
        padding: 1rem 0rem;
    }
    .footer2rp {
        display: flex;
        padding: 1rem 0rem;
    }
}