/*
Theme Name: HAB Booking Theme
Description: Professional theme with Greek blue holiday design
Version: 2.0
Author: Your Name
Text Domain: hab-booking-theme
*/

/* =====================================================
   GLOBAL RESET
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f7ff;
    color: #1e293b;
    line-height: 1.5;
}

/* =====================================================
   ACCESSIBILITY - Skip Link
===================================================== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #0a5c9e;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: 600;
    z-index: 9999;
    border-radius: 0 0 8px 8px;
}

.skip-link:focus {
    left: 20px;
    top: 10px;
}

/* =====================================================
   HEADER - Small Logo Left (Updated)
===================================================== */
.hab-header {
    background: #ffffff;
    border-bottom: 3px solid #0a5c9e;
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(10, 92, 158, 0.1);
}

.hab-header .hab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px; /* Reduced padding for smaller header */
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Logo - Small and neat on left */
.hab-logo {
    font-size: 1.4rem; /* Smaller font size */
    font-weight: 700;
    color: #0a5c9e;
    letter-spacing: -0.02em;
    text-shadow: 1px 1px 0 rgba(10, 92, 158, 0.1);
    flex-shrink: 0;
    line-height: 1.2;
}

.hab-logo a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Custom Logo Styling */
.hab-logo .custom-logo-link {
    display: flex;
    align-items: center;
}

.hab-logo .custom-logo-link img {
    max-height: 45px; /* Small fixed height */
    width: auto;      /* Maintain aspect ratio */
    display: block;
}

/* Site title fallback (when no logo) */
.hab-logo a:not(.custom-logo-link) {
    display: inline-block;
    padding: 5px 0;
}

/* Navigation - Push to right */
.hab-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Desktop Menu */
@media (min-width: 769px) {
    .hab-menu-toggle {
        display: none;
    }

    .hab-menu {
        display: flex !important;
        flex-direction: row;
        gap: 24px; /* Slightly reduced gap */
        align-items: center;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .hab-menu li a {
        text-decoration: none;
        color: #334155;
        font-weight: 500;
        font-size: 0.95rem; /* Slightly smaller */
        padding: 6px 0;
        transition: color 0.2s ease;
        position: relative;
        white-space: nowrap;
    }

    .hab-menu li a:hover {
        color: #0a5c9e;
    }

    .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: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background: #0a5c9e;
        border-radius: 2px;
    }
}

/* Mobile Menu */
@media (max-width: 768px) {
    .hab-header .hab-container {
        padding: 8px 15px;
    }
    
    .hab-logo {
        font-size: 1.2rem; /* Even smaller on mobile */
    }
    
    .hab-logo .custom-logo-link img {
        max-height: 35px; /* Even smaller on mobile */
    }
    
    .hab-menu-toggle {
        display: block;
        background: none;
        border: 1px solid #0a5c9e;
        font-size: 22px;
        cursor: pointer;
        z-index: 1001;
        padding: 6px 12px;
        border-radius: 6px;
        color: #0a5c9e;
    }

    .hab-menu-toggle:hover {
        background: #e6f0fa;
    }

    .hab-menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 15px 20px;
        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: 8px 0;
        text-decoration: none;
        color: #334155;
        font-weight: 500;
        font-size: 0.95rem;
        border-bottom: 1px solid #f0f7ff;
    }

    .hab-menu li:last-child a {
        border-bottom: none;
    }

    .hab-menu li a:hover {
        color: #0a5c9e;
    }
}

/* =====================================================
   USER MENU DROPDOWN
===================================================== */
.hab-user-menu {
    position: relative;
}

.hab-user-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hab-dropdown-icon {
    font-size: 10px;
    margin-left: 4px;
}

.hab-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(10, 92, 158, 0.15);
    padding: 8px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e2e8f0;
    list-style: none;
}

.hab-user-menu:hover .hab-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hab-dropdown-menu li {
    width: 100%;
    margin: 0;
    padding: 0;
}

.hab-dropdown-menu li a {
    display: block;
    padding: 8px 16px;
    color: #1e293b;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}

.hab-dropdown-menu li a:hover {
    background: #f0f7ff;
    color: #0a5c9e;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hab-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        margin-top: 5px;
    }
    
    .hab-user-menu:hover .hab-dropdown-menu {
        transform: none;
    }
}
/* =====================================================
   HERO SECTION
===================================================== */
.hab-hero {
    background: linear-gradient(135deg, #0a5c9e 0%, #1e88e5 50%, #6ab7ff 100%);
    color: #ffffff;
    text-align: center;
    padding: 70px 20px;
    position: relative;
    overflow: hidden;
}

.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
===================================================== */
.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;
    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;
    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;
    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
===================================================== */
@media (min-width: 641px) and (max-width: 900px) {
    .hab-search-wrapper {
        padding: 22px;
    }

    .hab-search-fields {
        gap: 12px;
    }

    .hab-field {
        flex: 1 1 160px;
        min-width: 140px;
    }

    .hab-field input,
    .hab-field select {
        padding: 12px 14px;
    }

    .hab-search-btn {
        padding: 12px 24px;
    }
    
    .hab-hero h1 {
        font-size: 2.25rem;
    }
}

/* =====================================================
   MOBILE VIEW - Compact
===================================================== */
@media (max-width: 640px) {
    .hab-hero {
        padding: 20px 12px !important;
    }

    .hab-hero h1 {
        font-size: 1.6rem !important;
        margin-bottom: 12px !important;
    }

    .hab-search-wrapper {
        padding: 8px !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
    }

    .hab-search-fields {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .hab-field {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: none !important;
        min-width: 100% !important;
    }

    .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;
    }

    .hab-field input,
    .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;
    }

    .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;
        height: auto !important;
    }

    .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;
    }
}

/* =====================================================
   SMALL 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-fields {
        gap: 3px !important;
    }

    .hab-field input,
    .hab-field select {
        padding: 6px 8px !important;
        font-size: 13px !important;
    }

    .hab-search-btn {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }
}

/* =====================================================
   MAIN CONTENT LAYOUT - Full width by default, sidebar when present
===================================================== */
.hab-main {
    padding: 40px 0;
    min-height: 60vh;
    background: #f0f7ff;
    width: 100%;
}

/* Default container - full width for main content */
.hab-main .hab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* When sidebar is present - switch to flexbox layout */
.hab-main .hab-container.hab-with-sidebar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 40px;
    align-items: flex-start;
}

/* Content area - takes 70% when sidebar exists */
.hab-main .hab-container.hab-with-sidebar .hab-content-area {
    flex: 0 0 70%;
    width: 70%;
    max-width: 70%;
}

/* Sidebar - takes 30% */
.hab-main .hab-container.hab-with-sidebar .hab-sidebar {
    flex: 0 0 30%;
    width: 30%;
    max-width: 30%;
}

/* When no sidebar, content takes full width */
.hab-main .hab-container:not(.hab-with-sidebar) .hab-content-area {
    width: 100%;
    max-width: 100%;
    flex: none;
}

/* Hide sidebar when container doesn't have sidebar class */
.hab-main .hab-container:not(.hab-with-sidebar) .hab-sidebar {
    display: none;
}

/* =====================================================
   APARTMENT LIST - Professional Grid Layout
===================================================== */

/* Apartment grid - perfectly balanced */
.hab-content-area .hab-apartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
    margin: 0;
}

/* Apartment cards */
.hab-content-area .hab-apartment-card {
    width: 100%;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(10, 92, 158, 0.1);
    border: 1px solid rgba(10, 92, 158, 0.1);
    transition: all 0.3s ease;
}

.hab-content-area .hab-apartment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(10, 92, 158, 0.2);
    border-color: #0a5c9e;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hab-content-area .hab-apartments-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =====================================================
   SIDEBAR WIDGETS
===================================================== */
.hab-sidebar .widget {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(10, 92, 158, 0.1);
    border: 1px solid rgba(10, 92, 158, 0.1);
}

.hab-sidebar .widget:last-child {
    margin-bottom: 0;
}

.hab-sidebar .widget-title {
    color: #0a5c9e;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #0a5c9e;
}

/* Social links in sidebar */
.hab-sidebar .hab-social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hab-sidebar .hab-social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.hab-sidebar .hab-social-link:hover {
    background: #0a5c9e;
    color: white;
    transform: translateX(5px);
    border-color: #0a5c9e;
}

.hab-sidebar .hab-social-icon {
    font-size: 1.3rem;
    width: 28px;
    text-align: center;
}

.hab-sidebar .hab-social-name {
    font-weight: 500;
}

/* =====================================================
   FOOTER
===================================================== */
.hab-footer {
    background: #ffffff;
    border-top: 3px solid #0a5c9e;
    padding: 40px 20px 30px;
    margin-top: 60px;
}

.hab-footer .hab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Footer widgets grid */
.hab-footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.hab-footer-widget {
    background: transparent;
}

.hab-footer-widget .widget-title {
    color: #0a5c9e;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0a5c9e;
}

.hab-footer-widget p,
.hab-footer-widget .textwidget {
    color: #64748b;
    line-height: 1.6;
}

.hab-footer-widget a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hab-footer-widget a:hover {
    color: #0a5c9e;
}

/* Footer copyright */
.hab-copyright {
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

/* =====================================================
   MOBILE RESPONSIVE
===================================================== */
@media (max-width: 900px) {
    .hab-main .hab-container.hab-with-sidebar {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .hab-main .hab-container.hab-with-sidebar .hab-content-area,
    .hab-main .hab-container.hab-with-sidebar .hab-sidebar {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
    
    .hab-footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .hab-footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .hab-content-area .hab-card-footer {
        flex-direction: column;
    }
    
    .hab-content-area .hab-card-btn,
    .hab-content-area .hab-book-btn {
        width: 100%;
    }
}

/* =====================================================
   WORDPRESS CORE CLASSES
===================================================== */
.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter {
    display: block;
    margin: 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}


/* ============================================
   FIXED MOBILE MENU - v3.0 - 2026
   ============================================ */
.hab-nav-desktop { flex:1; display:flex; justify-content:flex-end; }
.hab-menu-toggle { display:none; background:none; border:none; width:32px; height:26px; position:relative; cursor:pointer; z-index:1002; }
.hab-menu-toggle .bar { display:block; width:100%; height:3px; background:#0a5c9e; margin:5px 0; transition:0.3s; border-radius:2px; }
.hab-menu-toggle.active .bar:nth-child(1){ transform:rotate(45deg) translate(6px,6px); }
.hab-menu-toggle.active .bar:nth-child(2){ opacity:0; }
.hab-menu-toggle.active .bar:nth-child(3){ transform:rotate(-45deg) translate(6px,-6px); }

.hab-mobile-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.55); z-index:9997; opacity:0; visibility:hidden; transition:0.3s; }
.hab-mobile-overlay.active { opacity:1; visibility:visible; }

.hab-mobile-nav { position:fixed; top:0; right:-88%; width:86%; max-width:360px; height:100vh; background:#fff; z-index:9998; transition:right 0.35s cubic-bezier(0.4,0,0.2,1); display:flex; flex-direction:column; box-shadow:-10px 0 40px rgba(0,0,0,0.15); }
.hab-mobile-nav.active { right:0; }
.hab-mobile-head { display:flex; justify-content:space-between; align-items:center; padding:18px 20px; border-bottom:1px solid #eef2f7; background:#f8fbff; }
.hab-mobile-title { font-weight:700; color:#0a5c9e; }
.hab-mobile-close { background:none; border:1px solid #ddd; width:36px; height:36px; border-radius:50%; font-size:18px; cursor:pointer; }
.hab-mobile-menu-wrap { flex:1; overflow-y:auto; padding:10px 0; }
.hab-mobile-menu { list-style:none; margin:0; padding:0; }
.hab-mobile-menu li a { display:block; padding:16px 24px; color:#1e293b; text-decoration:none; font-size:16px; font-weight:500; border-bottom:1px solid #f1f5f9; }
.hab-mobile-menu li a:hover { background:#f0f7ff; color:#0a5c9e; }
.hab-mobile-menu li.current-menu-item a { background:#e6f0fa; color:#0a5c9e; font-weight:700; border-left:4px solid #0a5c9e; }

.hab-mobile-bottom { padding:20px; background:#f8fafc; border-top:1px solid #e2e8f0; }
.hab-mobile-book { display:block; background:#0a5c9e; color:#fff !important; text-align:center; padding:14px; border-radius:12px; font-weight:700; text-decoration:none; margin-bottom:12px; }
.hab-mobile-actions { display:flex; gap:10px; margin-bottom:14px; }
.hab-mobile-actions a { flex:1; text-align:center; padding:10px; border-radius:10px; text-decoration:none; font-weight:600; font-size:14px; }
.hab-mobile-call { background:#fff; border:1px solid #e2e8f0; color:#334155; }
.hab-mobile-wa { background:#25D366; color:#fff !important; }
.hab-mobile-lang { text-align:center; font-size:14px; color:#64748b; }
.hab-mobile-lang a { color:#0a5c9e; text-decoration:none; font-weight:600; margin:0 6px; }

.hab-cta-li { margin-left:12px !important; }
.hab-cta-btn { background:#ff5a5f; color:#fff !important; padding:10px 20px !important; border-radius:24px; font-weight:700 !important; }
.hab-cta-btn:hover { background:#e0484d !important; }

.hab-mobile-sticky-bar { display:none; position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid #e2e8f0; padding:8px 12px; z-index:9996; box-shadow:0 -4px 20px rgba(0,0,0,0.08); gap:8px; align-items:center; }
.hab-mobile-sticky-bar a { text-decoration:none; text-align:center; padding:10px; border-radius:12px; font-weight:700; }
.hab-sticky-call { background:#f1f5f9; flex:0 0 48px; }
.hab-sticky-wa { background:#25D366; color:#fff; flex:0 0 48px; }
.hab-sticky-book { background:#0a5c9e; color:#fff !important; flex:1; }

@media (min-width: 993px){
    .hab-mobile-nav, .hab-mobile-overlay, .hab-mobile-sticky-bar { display:none !important; }
}
@media (max-width: 992px){
    .hab-nav-desktop { display:none !important; }
    .hab-menu-toggle { display:block !important; }
    .hab-mobile-sticky-bar { display:flex; }
    body { padding-bottom:64px; }
    .hab-header { position:sticky; top:0; z-index:999; }
}
