:root {
    --sul-green: #00867A;
    /* Sul Vistos Teal */
    --bg: #F9F9F9;
    --surface: #FFFFFF;
    --text-main: #383838;
    --text-sub: #6c757d;
    --border: rgba(0, 0, 0, 0.08);
    --radius: 10px;
    --nav-h: 72px;
    /* Added from country files for consistency */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    animation: fadeIn 0.2s ease-out;
}

.nav {
    background: var(--surface);
    height: 72px;
    /* Matches --nav-h */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10000;
}

/* Country Page Specific Nav Transition */
.nav {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-brand {
    font-weight: 800;
    color: var(--sul-green);
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero {
    padding: 50px 24px 30px;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1.2px;
}

.hero p {
    color: var(--text-sub);
    font-size: 16px;
    margin-top: 10px;
    font-weight: 500;
}

.container {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.search-area {
    margin-bottom: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.search-area input {
    border: none;
    background: transparent;
    width: 100%;
    height: 44px;
    font-size: 16px;
    outline: none;
    color: var(--text-main);
}

.grid-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.destination-card {
    background: var(--surface);
    padding: 22px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.destination-card:hover {
    border-color: var(--sul-green);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.destination-card:active {
    transform: scale(0.98);
}

.card-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.card-flag {
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.card-info h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.card-info span {
    font-size: 11px;
    color: var(--text-sub);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-arrow {
    color: var(--sul-green);
    font-weight: 800;
    font-size: 18px;
}

/* --- EMPTY STATE --- */
#empty-state {
    display: none;
    text-align: center;
    padding: 30px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    margin-top: 20px;
}

#empty-state p {
    font-size: 14px;
    color: var(--text-sub);
    margin: 0;
}

.scroll-btn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10001;
    width: 48px;
    height: 48px;
    background-color: var(--sul-green);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(45, 122, 112, 0.3);
}

.hidden {
    display: none !important;
}

.footer {
    text-align: center;
    margin-top: 60px;
    padding-bottom: 40px;
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* --- COUNTRY PAGE SPECIFIC STYLES --- */
/* Merging styles from australia.html */

.exit-link {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1000000;
    /* Absolute top priority */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #d32f2f;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.exit-link:hover {
    background: #d32f2f;
    color: #fff;
    transform: scale(1.1);
}

.form-header {
    padding: 24px 40px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.scrolled .nav {
    transform: translateY(-100%);
}

body.scrolled .form-header {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Scroll Effects */




.form-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.header-main {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.header-flag {
    font-size: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.flag-img {
    display: block;
    width: 40px;
    height: 30px;
    border-radius: 2px;
    flex-shrink: 0;
}

.flag-img-lg {
    display: block;
    width: 56px;
    height: 42px;
    border-radius: 3px;
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 24px;
    margin: 0;
    font-weight: 800;
}

.header-text p {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 2px;
}

.header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.meta-item {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 11000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--surface);
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-sub);
}

.modal-content h2 {
    margin-top: 0;
    font-size: 22px;
    color: var(--sul-green);
    margin-bottom: 20px;
    font-weight: 800;
}

.modal-body {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

.modal-body ul {
    padding-left: 20px;
    margin: 15px 0;
}

.modal-body li {
    margin-bottom: 10px;
}

.modal-body strong {
    color: var(--sul-green);
}

.btn-help {
    background: rgba(0, 134, 122, 0.1);
    color: var(--sul-green);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-help:hover {
    background: var(--sul-green);
    color: white;
}

/* --- HEADER INFO ROW & SECURITY --- */
.header-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.security-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.security-item svg {
    color: var(--sul-green);
    flex-shrink: 0;
}

.security-divider {
    color: var(--border);
    opacity: 0.5;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 0;
    /* Override old padding */
    border-top: none;
    /* Override old border */
}

#c-poly-placeholder {
    padding: 40px !important;
    /* Restore respiration on desktop */
    margin: 0 !important;
}

#c-poly-placeholder iframe {
    width: 100% !important;
    margin: 0 !important;
}

@media (max-width: 600px) {
    .header-info-row {
        flex-direction: column-reverse;
        align-items: flex-start;
        /* Alinhado à esquerda no mobile */
        gap: 12px;
    }

    .header-meta {
        width: 100%;
        justify-content: space-between;
    }

    .btn-help {
        font-size: 10px;
    }

    #c-poly-placeholder {
        padding: 24px !important;
        /* Consistent respiration on mobile */
    }
}

#c-poly-placeholder .c-button {
    background: var(--text-main) !important;
    color: var(--surface) !important;
    height: 56px !important;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 8px !important;
}

/* --- COOKIE CONSENT BAR --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-content {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.4;
}

.cookie-content a {
    color: var(--sul-green);
    text-decoration: underline;
    font-weight: 700;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.btn-cookie {
    background: var(--sul-green);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.btn-cookie:hover {
    opacity: 0.9;
}

.btn-cookie-secondary {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
}

.btn-cookie-secondary:hover {
    background: #e8e8e8;
}

/* --- MOBILE FORM UI REFINEMENTS --- */
@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        padding: 24px 20px;
    }

    .btn-cookie {
        width: 100%;
    }

    .container {
        padding: 0;
    }

    .form-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .form-header {
        border-radius: 0;
        padding: 20px;
    }
}

/* Close Mobile-Only Refinements */

/* --- PHASE 3: COGNITO STYLE UNIFICATION --- */
/* Global Translations for Buttons (Forced Portuguese) */
#c-poly-placeholder .cog-button--next .cog-button__text,
#c-poly-placeholder .cog-button--back .cog-button__text,
#c-poly-placeholder .cog-button--submit .cog-button__text {
    font-size: 0 !important;
    /* Hide original text */
}

#c-poly-placeholder .cog-button--next .cog-button__text:after {
    content: "PRÓXIMO";
    font-size: 14px;
}

#c-poly-placeholder .cog-button--back .cog-button__text:after {
    content: "VOLTAR";
    font-size: 14px;
}

#c-poly-placeholder .cog-button--submit .cog-button__text:after {
    content: "ENVIAR";
    font-size: 14px;
}

/* 1. Reset Accent & Base Colors */
/* Using "Old Fashioned" selectors to bypass Chameleon Mode limitations */

/* 1. Labels & Headers (Branding) */
#c-poly-placeholder .cog-label,
#c-poly-placeholder .cog-header h1,
#c-poly-placeholder .cog-section__heading {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.2px !important;
}

#c-poly-placeholder .cog-header h1 {
    font-size: 26px !important;
    font-weight: 800 !important;
}

/* 2. Input Fields (The "Ugly Field" Fix) */
/* Cognito uses Element UI internally (.el-input__inner) */
#c-poly-placeholder .el-input__inner,
#c-poly-placeholder .el-textarea__inner {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    border-radius: 12px !important;
    min-height: 50px !important;
    /* Reduced to 50px for a "chic" look */
    border: 1.5px solid #e2e8f0 !important;
    padding: 14px 20px !important;
    /* Adjusted padding for better balance */
    background-color: #ffffff !important;
    font-size: 15px !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

#c-poly-placeholder .el-input__inner:focus,
#c-poly-placeholder .el-textarea__inner:focus {
    border-color: var(--sul-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 134, 122, 0.1) !important;
}

/* 3. Dropdowns & Selects */
#c-poly-placeholder .el-select .el-input__inner {
    height: 50px !important;
}

/* 4. Buttons (DNA Sul Vistos) */
#c-poly-placeholder .cog-button,
#c-poly-placeholder .c-button {
    font-family: 'Outfit', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 700 !important;
    height: auto !important;
    padding: 14px 28px !important;
    border-radius: var(--radius) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

#c-poly-placeholder .cog-button--primary,
#c-poly-placeholder .cog-button--next,
#c-poly-placeholder .cog-button--submit,
#c-poly-placeholder .c-button--primary {
    background-color: var(--sul-green) !important;
    color: #ffffff !important;
}

#c-poly-placeholder .cog-button:hover {
    transform: translateY(-1px) !important;
    filter: brightness(0.95) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 5. Progress Bar & Accents */
#c-poly-placeholder .c-progress-bar-inner {
    background: var(--sul-green) !important;
}

/* 6. General Layout (The "Respiro" Master Rule) */
#c-poly-placeholder .cog-cognito,
#c-poly-placeholder .cog-form {
    margin: 0 !important;
    padding: 0 !important;
}

/* --- PHASE 4: AUTOMATED REDIRECT --- */
/* (Automation handled via script.js) */