/* 
---------------------------------------------
Modern Design Upgrade (2025)
--------------------------------------------- 
Overrides based on "Teal & Glass" aesthetic.
*/

/* --- Header & Logo Alignment Fixes (User Request) --- */
.header-area .main-nav .logo {
    display: flex !important;
    align-items: center;
    height: 100%;
    margin-top: 0 !important;
    /* Reset legacy margins */
    top: 50% !important;
    /* Vertically center relative to header */
    transform: translateY(-50%);
    position: absolute;
    /* Absolute within relative nav */
    left: 30px;
    /* Fixed left distance */
}

/* Ensure sticky header stays fixed looking */
.header-area.header-sticky {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    background-color: #12766e !important;
    /* User preferred green */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-area.header-sticky .logo {
    top: 50% !important;
    transform: translateY(-50%);
}

:root {
    --primary-teal: #12766e;
    /* Deep modern teal */
    --accent-teal: #14B8A6;
    /* Bright accent teal */
    --dark-text: #111827;
    /* Soft black */
    --gray-text: #4B5563;
    /* Warm gray */
    --bg-surface: #F8FAFC;
    /* Cool white background */
    --bg-glass: rgba(255, 255, 255, 0.7);
    --shadow-soft: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Font Variables */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Typography Upgrades --- */
body {
    background-color: var(--bg-surface);
    color: var(--gray-text);
    line-height: 1.6;
    /* Inter works best with 1.5-1.6 */
    font-weight: 400;
    font-family: var(--font-body);
    /* Switch to Inter */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark-text);
    letter-spacing: -0.02em;
    font-family: var(--font-heading);
    /* Switch to Outfit */
    font-weight: 700;
}

/* =========================
   NEW ACTION BUTTONS (Flights/Hotels/Tours)
   ========================= */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    /* Glass effect base */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.action-card i {
    font-size: 18px;
    margin-bottom: 2px;
}

.action-card span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Colors */
.action-card.flight {
    color: #0ea5e9;
    background: rgba(224, 242, 254, 0.5);
}

.action-card.flight:hover {
    background: #bae6fd;
    color: #0284c7;
}

.action-card.hotel {
    color: #d97706;
    background: rgba(255, 251, 235, 0.5);
}

.action-card.hotel:hover {
    background: #fde68a;
    color: #b45309;
}

.action-card.tour {
    color: #22c55e;
    background: rgba(220, 252, 231, 0.5);
}

.action-card.tour:hover {
    background: #86efac;
    color: #16a34a;
}

/* Serif accent for main headings if desired */
h2 {
    font-weight: 800;
}

/* --- Header / Nav --- */
.header-area {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.background-header {
    background-color: #12766e !important;
    /* User preferred green */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.header-area .main-nav .nav li a {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-area .main-nav .nav li:hover a,
.header-area .main-nav .nav li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

/* --- Buttons --- */
.main-button a {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--accent-teal) 100%);
    border: none;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.4);
    font-weight: 600;
    padding: 14px 34px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.main-button a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.6);
    background: linear-gradient(135deg, var(--accent-teal) 0%, var(--primary-teal) 100%);
    color: #fff;
    border: none;
}

.border-button a {
    border: 2px solid var(--primary-teal);
    color: var(--primary-teal);
    font-weight: 600;
    border-radius: 50px;
}

.border-button a:hover {
    background-color: var(--primary-teal);
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

/* --- Cards & Content Containers (Glassmorphism) --- */
.visit-country .item,
.encourage .item,
.deal-item,
.service-item,
.more-info,
#section-1 .more-info {
    /* Hero card */
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.visit-country .item:hover,
.deal-item:hover,
#section-1 .more-info:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* Refined Deal Layout */
.deal-item .content {
    padding: 30px;
}

/* Map Section Upgrade */
#section-4 {
    /* Assuming map section */
    background: radial-gradient(circle at center, #eee 0%, #fff 70%);
}

#country {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(8px);
    border: 1px solid var(--primary-teal) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: var(--primary-teal) !important;
    border-radius: 12px !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Modal Upgrade */
.modal-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--accent-teal) 100%) !important;
}

/* Form Styles */
fieldset select,
fieldset input {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    font-size: 15px;
    color: var(--dark-text);
    transition: border-color 0.3s;
}

fieldset select:focus,
fieldset input:focus {
    border-color: var(--accent-teal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

/* Hero Section Specifics */
#section-1 .more-info {
    border-top: 4px solid var(--accent-teal);
}

#section-1 h2 {
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: -webkit-linear-gradient(45deg, var(--primary-teal), #2A2A2A);
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; Avoid transparent text for accessibility unless background ensures contrast */
}

/* Image styling */
.visit-country .item .image img,
.deal-item .image img {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: transform 0.6s ease;
}

.visit-country .item:hover .image img,
.deal-item:hover .image img {
    transform: scale(1.05);
}

/* --- Search Form Upgrade (Added) --- */
.search-form {
    margin-top: 40px !important;
    /* Adjust spacing */
}

#search-form {
    background: rgba(255, 255, 255, 0.85) !important;
    /* Glass effect base */
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-radius: var(--radius-xl) !important;
    padding: 30px 40px !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: var(--shadow-hover) !important;
    width: 100%;
}

#search-form h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 10px;
    background: -webkit-linear-gradient(45deg, var(--primary-teal), var(--dark-text));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#search-form fieldset {
    margin-bottom: 0;
}

#search-form select#chooseLocation {
    height: 50px;
    background-color: #fff;
    border: 2px solid #e1e4e8;
    border-radius: 50px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark-text);
    width: 100%;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230F766E' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all 0.3s ease;
}

#search-form select#chooseLocation:hover,
#search-form select#chooseLocation:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.15);
    background-color: #fff;
}

#search-form button.border-button {
    background: var(--primary-teal);
    color: white;
    border: none;
    width: 100%;
    height: 50px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#search-form button.border-button:hover {
    background: var(--accent-teal);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.5);
    color: #fff !important;
    /* Force white text */
}

/* --- Auto-complete Input Styles (New) --- */
input#chooseLocation {
    height: 50px;
    background-color: #fff;
    border: 2px solid #e1e4e8;
    border-radius: 50px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark-text);
    width: 100%;
    transition: all 0.3s ease;
}

input#chooseLocation:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.15);
    outline: none;
}



/* Adjusted margin for search container as requested */
.search-form {
    margin-top: 180px !important;
    /* Increased from 40px to 180px per request for more space */
}

/* --- Sticky Search Bar --- */
.search-form {
    position: sticky;
    top: 80px;
    /* Adjust this to sit below your sticky header height */
    z-index: 1000;
    /* High z-index to overlay map/content */
    margin-top: 20px !important;
    /* Reset large margin if sticky handles spacing, or adjust as needed */
    padding-bottom: 20px;
    /* Little buffer */
    pointer-events: none;
    /* Let clicks pass through empty space around form */
}

/* Re-enable pointer events on the container */
.search-form .container {
    pointer-events: auto;
}

/* Style update for #btnGoTop10 to fit text in 2 lines */
#search-form button#btnGoTop10 {
    width: 100%;
    height: auto;
    min-height: 50px;
    padding: 8px 15px;
    white-space: normal;
    /* Allow text to wrap */
    line-height: 1.2;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


/* --- Sticky Map Setup --- */
#allSvg {
    position: -webkit-sticky;
    position: sticky;
    top: 300px;
    /* Increased to 300px to strictly clear the search bar area */
    z-index: 0;
    /* Background layer */
    display: block;
    width: 100%;
    height: 65vh;
    margin-top: 60px;
    /* Add physical gap so it doesn't start too high */
    background-color: var(--bg-surface);
}

/* Ensure no horizontal scroll to be "stable" */
html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Header needs highest Z */
.header-area {
    z-index: 1002 !important;
}

/* Search form below header */
.search-form {
    z-index: 1001 !important;
    margin-top: 40px !important;
    /* Restore reasonable gap from header */
}


/* Ensure content SECTIONS scroll OVER the map */
section,
.visit-country,
.towns-destinations,
.reservation-form {
    position: relative;
    z-index: 20;
    /* Higher than map */
    background-color: var(--bg-surface);
    /* Ensure opaque background */
}

/* Adjust sticky search z-index to be highest */
.search-form {
    z-index: 1000 !important;
}

/* --- Map Interactivity (Mobile Tap) --- */
.allPaths {
    cursor: pointer;
    touch-action: manipulation;
    /* Improves touch handling */
    transition: fill 0.2s ease;
}

.allPaths:hover {
    fill: var(--primary-teal);
    opacity: 0.8;
}

.allPaths:active {
    fill: var(--accent-teal) !important;
    /* Immediate feedback on tap */
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {

    /* Add space between search input and button on mobile/tablet */
    #search-form button#btnGoTop10 {
        margin-top: 20px;
    }

    /* Ensure content below stacks nicely */
    .search-form {
        padding-bottom: 30px;
    }
}

/* --- Responsive Map Position --- */
@media (max-width: 991px) {
    #allSvg {
        top: 240px !important;
        /* Move it up on mobile */
        margin-top: 20px !important;
        /* Reduce the initial gap */
    }
}

@media (max-width: 767px) {
    #allSvg {
        top: 280px !important;
        /* On very small screens where search stacks more, adjust if needed */
        margin-top: 10px !important;
    }
}

/* --- Modal 2.0 (Centered & Modern) --- */
#selectCityModal.modal-overlay {
    display: none;
    /* JS toggles this to 'flex' */
    position: fixed;
    inset: 0;
    z-index: 10005 !important;
    /* Above everything */
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    /* Vertical Center */
    justify-content: center;
    /* Horizontal Center */
}

/* Ensure flex centering works when active */
#selectCityModal[style*="display: flex"] {
    display: flex !important;
}

#selectCityModal .modal-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 1);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#selectCityModal .modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
    background: #f0fdf9;
    /* Light teal bg */
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #ccfbf1;
}

#selectCityModal h3 {
    font-size: 22px;
    color: var(--dark-text);
    margin-bottom: 10px;
}

#selectCityModal p {
    color: var(--gray-text);
    font-size: 15px;
    margin-bottom: 30px;
}

#selectCityModal .modal-btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--accent-teal) 100%);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
    transition: transform 0.2s;
}

#selectCityModal .modal-btn-primary:active {
    transform: scale(0.98);
}

#selectCityModal .modal-x {
    top: 20px;
    right: 20px;
    background: transparent;
    color: #999;
    font-size: 24px;
    font-weight: 300;
}

#selectCityModal .modal-x:hover {
    color: var(--dark-text);
    background: transparent;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- Force Input Stability (Reference) --- */
/* Prevent red outline on invalid or user-invalid states */
#chooseLocation:invalid,
#chooseLocation:-moz-ui-invalid,
.form-select:invalid {
    box-shadow: none !important;
    border-color: #e1e4e8 !important;
    /* Keep original border */
    outline: none !important;
}

/* --- FINAL STABILITY FIX --- */
/* Ensure no red outline ever appears on search input */
#chooseLocation:invalid,
#chooseLocation:-moz-ui-invalid,
.form-select:invalid {
    box-shadow: none !important;
    border-color: #e1e4e8 !important;
    outline: none !important;
}

/* Ensure map touch works */
.allPaths {
    cursor: pointer;
    pointer-events: auto;
}

/* --- FRESH MODAL (v3) --- */
#new-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Darker overlay */
    z-index: 99999 !important;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

#new-modal-box {
    background: #fff;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    border: 2px solid #fff;
}

#new-modal-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

#new-modal-title {
    font-size: 20px;
    color: #333;
    font-weight: 700;
    margin-bottom: 10px;
}

#new-modal-text {
    font-size: 15px;
    color: #666;
    margin-bottom: 25px;
}

#new-modal-btn {
    background: linear-gradient(135deg, #0F766E, #14B8A6);
    color: white;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 5px 15px rgba(15, 118, 110, 0.3);
}

#new-modal-btn:hover {
    transform: scale(1.02);
}

/* --- FORCE SOLID INPUT (No Opacity Changes) --- */
#chooseLocation {
    opacity: 1 !important;
    background-color: #fff !important;
    transition: none !important;
    /* Stop animating */
}

#chooseLocation:focus,
#chooseLocation:active {
    opacity: 1 !important;
    background-color: #fff !important;
    box-shadow: none !important;
    /* Simplify focus state if requested */
    border: 2px solid #e1e4e8 !important;
    /* Keep border static */
}

/* =========================
   TOP 10 BUTTON (Premium CTA)
   ========================= */
.btn-show-top10 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 4px;

    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #fff !important;
    text-decoration: none !important;

    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: none;

    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-show-top10:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #000 0%, #111827 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-show-top10 i {
    transition: transform 0.3s ease;
}

.btn-show-top10:hover i {
    transform: translateX(4px);
}