/*
Theme Name: HAB Booking Theme
Description: Professional theme with Greek blue holiday design
Version: 1.3
*/

/* =====================================================
   GLOBAL RESET
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f7ff;  /* Light blue-white background */
    color: #1e293b;
    line-height: 1.5;
}

/* =====================================================
   HEADER - Clean white with blue accent
===================================================== */
.hab-header {
    background: #ffffff;
    border-bottom: 3px solid #0a5c9e;  /* Greek blue accent */
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(10, 92, 158, 0.1);
}

.hab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.hab-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0a5c9e;  /* Greek blue */
    letter-spacing: -0.02em;
    text-shadow: 1px 1px 0 rgba(10, 92, 158, 0.1);
}

/* Clickable logo link */
.hab-logo a {
    color: inherit;
    text-decoration: none;
}

.hab-logo a:hover {
    color: #0e7ac6;  /* Lighter blue */
}

/* =====================================================
   DESKTOP NAVIGATION
===================================================== */
@media (min-width: 769px) {
    .hab-menu-toggle {
        display: none;
    }

    .hab-nav {
        flex: 1;
        display: flex;
        justify-content: flex-end;
    }

    .hab-menu {
        display: flex !important;
        flex-direction: row;
        gap: 32px;
        align-items: center;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .hab-menu li a {
        text-decoration: none;
        color: #334155;
        font-weight: 500;
        font-size: 1rem;
        padding: 8px 0;
        transition: color 0.2s ease;
        position: relative;
    }

    .hab-menu li a:hover {
        color: #0a5c9e;  /* Greek blue */
    }

    /* Active menu item indicator */
    .hab-menu li.current-menu-item a,
    .hab-menu li a[aria-current="page"] {
        color: #0a5c9e;
        font-weight: 600;
    }

    .hab-menu li.current-menu-item a:after,
    .hab-menu li a[aria-current="page"]:after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: #0a5c9e;
        border-radius: 2px;
    }
}

/* =====================================================
   MOBILE NAVIGATION - Improved spacing
===================================================== */
@media (max-width: 768px) {
    .hab-menu-toggle {
        display: block;
        background: none;
        border: 1px solid #0a5c9e;
        font-size: 24px;
        cursor: pointer;
        z-index: 1001;
        padding: 8px 16px;
        border-radius: 8px;
        color: #0a5c9e;
    }

    .hab-menu-toggle:hover {
        background: #e6f0fa;
    }

    .hab-menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;  /* Reduced gap */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 16px 20px;  /* Reduced padding */
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
        border-top: 3px solid #0a5c9e;
        z-index: 1000;
        list-style: none;
    }

    .hab-menu.active {
        display: flex !important;
    }

    body.admin-bar .hab-menu {
        top: calc(100% + 32px);
    }

    .hab-menu li {
        width: 100%;
    }

    .hab-menu li a {
        display: block;
        padding: 10px 0;  /* Reduced padding */
        text-decoration: none;
        color: #334155;
        font-weight: 500;
        font-size: 1rem;
        border-bottom: 1px solid #f0f7ff;
    }

    .hab-menu li:last-child a {
        border-bottom: none;
    }

    .hab-menu li a:hover {
        color: #0a5c9e;
    }
}

/* =====================================================
   HERO SECTION - Greek blue gradient
===================================================== */
.hab-hero {
    background: linear-gradient(135deg, #0a5c9e 0%, #1e88e5 50%, #6ab7ff 100%);
    color: #ffffff;
    text-align: center;
    padding: 70px 20px;
    position: relative;
    overflow: hidden;
}

/* Optional wave pattern for holiday feel */
.hab-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23ffffff"></path></svg>');
    background-size: cover;
    background-repeat: no-repeat;
}

.hab-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hab-hero h1 {
    font-size: 2.75rem;
    margin-bottom: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* =====================================================
   SEARCH FORM - Clean white on blue background
===================================================== */
.hab-search-wrapper {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(10, 92, 158, 0.3);
    padding: 28px;
    max-width: 1000px;
    margin: 20px auto 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.hab-search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.hab-field {
    flex: 1 1 180px;
    min-width: 160px;
}

.hab-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0a5c9e;  /* Greek blue */
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hab-field input,
.hab-field select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
    color: #1e293b;
}

.hab-field input:hover,
.hab-field select:hover {
    border-color: #0a5c9e;
}

.hab-field input:focus,
.hab-field select:focus {
    outline: none;
    border-color: #0a5c9e;
    box-shadow: 0 0 0 4px rgba(10, 92, 158, 0.15);
}

.hab-search-btn {
    background: #0a5c9e;  /* Greek blue */
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: fit-content;
    align-self: flex-end;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 12px rgba(10, 92, 158, 0.4);
}

.hab-search-btn:hover {
    background: #0e7ac6;  /* Lighter blue */
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(10, 92, 158, 0.5);
}

.hab-search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(10, 92, 158, 0.4);
}

/* =====================================================
   TABLET VIEW (641px to 900px) - Optimized spacing
===================================================== */
@media (min-width: 641px) and (max-width: 900px) {
    .hab-search-wrapper {
        padding: 22px;
    }

    .hab-search-fields {
        gap: 12px;  /* Reduced gap */
    }

    .hab-field {
        flex: 1 1 160px;
        min-width: 140px;
    }

    .hab-field input,
    .hab-field select {
        padding: 12px 14px;  /* Slightly smaller padding */
    }

    .hab-search-btn {
        padding: 12px 24px;
    }
    
    .hab-hero h1 {
        font-size: 2.25rem;
    }
}

/* =====================================================
   MOBILE VIEW - AGGRESSIVE COMPACT
   Forces everything to be tight
===================================================== */
@media (max-width: 640px) {
    /* Hero section */
    .hab-hero {
        padding: 20px 12px !important;
    }

    .hab-hero h1 {
        font-size: 1.6rem !important;
        margin-bottom: 12px !important;
    }

    /* Search wrapper - main container */
    .hab-search-wrapper {
        padding: 8px !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
    }

    /* The flex container */
    .hab-search-wrapper .hab-search-fields {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;  /* This is the key - tiny gap */
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Each field container */
    .hab-search-wrapper .hab-field {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: none !important;
        min-width: 100% !important;
    }

    /* Labels */
    .hab-search-wrapper .hab-field label {
        display: block !important;
        margin: 0 0 2px 0 !important;
        padding: 0 !important;
        font-size: 0.7rem !important;
        line-height: 1 !important;
        color: #0a5c9e !important;
    }

    /* Inputs and selects */
    .hab-search-wrapper .hab-field input,
    .hab-search-wrapper .hab-field select {
        width: 100% !important;
        margin: 0 !important;
        padding: 8px 10px !important;
        font-size: 14px !important;
        border-radius: 6px !important;
        border-width: 1px !important;
        height: auto !important;
        line-height: normal !important;
    }

    /* Button container (if it's in a hab-field) */
    .hab-search-wrapper .hab-field:last-child {
        margin-top: 2px !important;
    }

    /* The button itself */
    .hab-search-wrapper .hab-search-btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 12px !important;
        font-size: 0.9rem !important;
        border-radius: 6px !important;
        background: #0a5c9e !important;
        white-space: normal !important;  /* Allow wrapping if needed */
        height: auto !important;
    }

    /* Remove any possible margins from form elements */
    .hab-search-wrapper form,
    .hab-search-wrapper form > div,
    .hab-search-wrapper div,
    .hab-search-wrapper .hab-search-container {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Even smaller phones */
@media (max-width: 380px) {
    .hab-hero h1 {
        font-size: 1.3rem !important;
        margin-bottom: 8px !important;
    }

    .hab-search-wrapper {
        padding: 6px !important;
    }

    .hab-search-wrapper .hab-search-fields {
        gap: 3px !important;
    }

    .hab-search-wrapper .hab-field input,
    .hab-search-wrapper .hab-field select {
        padding: 6px 8px !important;
        font-size: 13px !important;
    }

    .hab-search-wrapper .hab-search-btn {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }
}

/* =====================================================
   MAIN CONTENT WRAPPER
===================================================== */
.hab-main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

/* =====================================================
   FOOTER
===================================================== */
.hab-footer {
    background: #ffffff;
    border-top: 3px solid #0a5c9e;
    padding: 28px 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 60px;
}

.hab-footer .hab-container {
    justify-content: center;
    padding: 0;
}