/* 
    Otravel Maldives - Premium Contact Page Styles
    Glassmorphism, High Fidelity, Responsive Design
*/

:root {
    --otravel-blue: #005cb9;
    --otravel-orange: #ff4500;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(12px);
    --text-dark: #333333;
    --text-muted: #666666;
    --error-color: #ff4d4d;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.glass-card-light {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.08);
}

/* Hero Section Extension */
.contact-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    animation: kenBurnsZoom 10s ease-out infinite alternate;
}

.contact-hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 0;
}

.contact-hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.contact-hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    font-family: 'Tenor Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Floating Contact Cards */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: -100px;
    padding: 0 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 10;
}

.info-card {
    padding: 40px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
}

.info-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.info-icon-box {
    width: 70px;
    height: 70px;
    background: var(--otravel-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(0, 92, 185, 0.3);
}

.info-card h3 {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.info-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Contact Form Section */
.form-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

@media (min-width: 992px) {
    .form-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .form-left {
        flex: 1;
    }

    .form-right {
        flex: 1.2;
    }
}

.form-header h2 {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 2.8rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 40px;
}

/* Premium Form Elements */
.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.input-field {
    width: 100%;
    padding: 18px 24px;
    border-radius: 16px;
    background: #fdfdfd;
    border: 1.5px solid #eee;
    font-size: 16px;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.input-field:focus {
    outline: none;
    border-color: var(--otravel-blue);
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 92, 185, 0.05);
}

/* Error State */
.input-field.error {
    border-color: var(--error-color);
}

.error-msg {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    display: block;
}

.error-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Dropdown Styling */
.custom-select-wrapper {
    position: relative;
    user-select: none;
}

.custom-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #fdfdfd;
    border: none;
    /* Removed default border */
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    /* Extremely subtle shadow for depth */
}

.custom-select:hover {
    background: #f9f9f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.custom-select.active {
    background: #fff;
    border: none;
    /* Keep borderless when active */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.custom-options {
    position: absolute;
    top: calc(100% + 5px);
    /* Add a small gap for a floating look */
    left: 0;
    right: 0;
    background: #fff;
    border: none;
    /* Removed the border as requested */
    border-radius: 16px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    /* More premium shadow instead of border */
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.custom-select.active+.custom-options {
    max-height: 300px;
    padding: 8px 0;
    /* Add some padding for the floating look */
}

.custom-option {
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: none;
    /* Removed the internal dividers */
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(0, 92, 185, 0.05);
    color: var(--otravel-blue);
    padding-left: 30px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 20px;
    background: var(--otravel-blue);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.submit-btn:hover {
    background: #004a96;
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 92, 185, 0.3);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Success Modal Styles */
/* These should match system generated vibes but built in-page */
.system-msg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.system-msg-box {
    max-width: 450px;
    width: 100%;
    padding: 40px;
    text-align: center;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.system-msg-overlay.active .system-msg-box {
    transform: translateY(0);
    opacity: 1;
}

.system-msg-icon {
    width: 80px;
    height: 80px;
    background: #4cd137;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 25px;
    animation: iconScale 0.6s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes iconScale {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.system-msg-box h2 {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

/* Animations */
@keyframes kenBurnsZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.15);
    }
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .contact-hero {
        height: 50vh;
    }

    .contact-info-grid {
        margin-top: -60px;
        gap: 20px;
    }

    .info-card {
        padding: 30px 20px;
    }

    .form-header h2 {
        font-size: 2.2rem;
    }
}

/* Interactive Map Selector */
.map-section {
    position: relative;
    width: 100%;
    height: 880px;
    /* Increased map height for a larger panoramic view */
    margin-top: 100px;
    overflow: hidden;
    background: #f0f0f0;

    /* Custom Red Map Marker */
    .ot-red-pin {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ot-red-pin i {
        color: #ff3b30;
        /* Premium Red */
        font-size: 38px;
        filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.4));
        animation: pin-drop 0.4s ease-out forwards;
    }

    @keyframes pin-drop {
        0% {
            transform: translateY(-30px);
            opacity: 0;
        }

        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* Floating Image Box Attached to Pin */
    .leaflet-popup-content-wrapper {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 16px !important;
        padding: 0 !important;
        overflow: hidden;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.4);
    }

    .leaflet-popup-content {
        margin: 0 !important;
    }

    .leaflet-popup-tip {
        background: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .map-popup-resort {
        width: 150px;
        display: flex;
        flex-direction: column;
    }

    .map-popup-resort img {
        width: 100%;
        height: 100px;
        object-fit: cover;
        border-radius: 16px 16px 0 0;
    }

    .map-popup-resort p {
        margin: 0;
        padding: 10px 8px;
        font-size: 11px;
        font-weight: 700;
        color: var(--text-dark);
        text-align: center;
    }
}

/* Auto-hide Floating Widgets smoothly */
.floating-widgets {
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease !important;
}

.floating-widgets.hide-for-map {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) !important;
    pointer-events: none !important;
}

/* Ensure Leaflet base background is Ocean Blue */
.leaflet-container {
    background: #0a1931 !important;
}

/* Map Mode Switcher & Zoom Controls */
.map-view-switcher {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 50;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.view-btn {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: pointer;
}

.view-btn.active {
    background: var(--otravel-blue);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 92, 185, 0.2);
}

.view-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

/* Customize Leaflet Zoom Controls */
.leaflet-control-zoom {
    border: none !important;
    margin-left: 30px !important;
    margin-top: 30px !important;
}

.leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--otravel-blue) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease !important;
}

.leaflet-control-zoom a:hover {
    background: #fff !important;
    transform: scale(1.05);
    color: var(--otravel-blue) !important;
}

@media (max-width: 768px) {
    .map-view-switcher {
        bottom: 120px;
        /* Stay above the resort carousel */
        right: 20px;
        padding: 4px;
    }

    .view-btn {
        padding: 6px 12px;
        font-size: 10px;
    }

    .leaflet-control-zoom {
        display: none;
        /* Hide on mobile for cleaner UI, use pinch-zoom */
    }
}

.map-wrapper {
    width: 100%;
    height: 100%;
    background: #0a1931;
    /* Deep Oceanic Blue to mask tile loading */
}

#resortMap {
    background: #0a1931 !important;
}

.resort-map-selector {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 50;
    width: 400px;
    /* Slightly wider to comfortably fit 7 items */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 24px;
    border-radius: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s ease;
    overflow: visible;
}

.selector-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: top;
    gap: 10px;
}

.selector-header h4 {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    flex-shrink: 0;
    /* Protect the label from being squished */
}

#selectedResortTitle {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 14px;
    /* Slightly larger for better hierarchy */
    font-weight: 700;
    color: var(--otravel-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: right;
    max-width: 85%;
    /* Prevent overlapping with the label */
    line-height: 1.3;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(5px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.resort-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    /* Slightly tighter gap to stay inside panel */
}

.resort-mini-box {
    aspect-ratio: 1;
    border-radius: 10px;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: #eee;
    /* overflow: hidden removed to allow tooltip visibility */
}

.resort-mini-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    border-radius: 8px;
    /* Added here since container overflow is now visible */
}

.resort-mini-box:hover {
    transform: scale(1.15) translateY(-2px);
    z-index: 10;
    border-color: var(--otravel-blue);
    box-shadow: 0 5px 15px rgba(0, 92, 185, 0.2);
}

.resort-mini-box.active {
    border-color: var(--otravel-blue);
    background: var(--otravel-blue);
}

/* Custom Tooltip/Label */
.resort-mini-box::before {
    content: attr(data-resort);
    position: absolute;
    bottom: 135%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #111;
    /* Dark premium tag */
    color: #fff;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 100;
    letter-spacing: 0.5px;
}

.resort-mini-box:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Mobile Responsive Override */
@media (max-width: 768px) {
    .map-section {
        height: 650px;
        /* Adjusted height for mobile to maintain balance */
        display: flex;
        flex-direction: column;
    }

    .map-wrapper {
        height: 65%;
    }

    .resort-map-selector {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        background: #fff;
        padding: 20px;
        box-shadow: none;
        border: none;
        border-bottom: 1px solid #eee;
    }

    .resort-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 5px 0 15px;
        gap: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .resort-grid::-webkit-scrollbar {
        display: none;
    }

    .resort-mini-box {
        flex: 0 0 55px;
        height: 55px;
        border-radius: 12px;
    }

    .resort-mini-box::before {
        display: none;
        /* Hide tooltips on mobile */
    }
}