/* ============================================
   📁 FILE: style.css (Guest)
   📌 PURPOSE: Main guest portal styles + directions modal
   ============================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Aptos", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transition: background 0.8s ease;
}

/* ==========================================
   DYNAMIC BACKGROUND (applied via JavaScript)
   ========================================== */
body.dynamic-bg {
    background: var(--app-gradient, linear-gradient(135deg, #1a365d, #2b6cb0));
    background-attachment: fixed;
}

body.dynamic-bg .app-container {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-container {
    max-width: 900px;
    width: 100%;
    margin: 8px auto;
    min-height: 95vh;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
    position: relative;
    padding-bottom: 24px;
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

/* ==========================================
   BANNER
   ========================================== */
.main-banner {
    position: relative;
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 24px;
    padding-bottom: 40px;
    box-sizing: border-box;
}

.main-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    z-index: 1;
}

.banner-text-wrapper {
    position: relative;
    z-index: 2;
    color: #ffffff;
    max-width: 100%;
    width: 100%;
}

.banner-text-wrapper h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.banner-text-wrapper p {
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
    opacity: 0.95;
    line-height: 1.4;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   GUEST MODAL - ΠΙΟ ΦΑΡΔΥ ΓΙΑ DESKTOP
   ========================================== */
#guestModal.modal-backdrop {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
    background: rgba(15, 41, 66, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

#guestModal.modal-backdrop.show {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#guestModal .modal-box {
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2) !important;
    padding: 0 !important;
    overflow: hidden !important;
    width: 540px !important;
    min-width: 0 !important;
    max-width: 98vw !important;
    max-height: 95vh !important;
    height: auto !important;
    max-height: 80vh !important;
    margin: 0 auto !important;
    transform: scale(0.95) !important;
    transition: transform 0.25s ease !important;
    display: flex !important;
    flex-direction: column !important;
}

#guestModal.modal-backdrop.show .modal-box {
    transform: scale(1) !important;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

/* Keep the new premium font inside guest popups only. */
#guestModal,
#guestModal button,
#guestModal input,
#guestModal textarea,
#guestModal select {
    font-family: "Inter", "Aptos", "Segoe UI", sans-serif !important;
}

/* Size each popup for its content instead of using the emergency layout everywhere. */
#guestModal.guest-modal--compact .modal-box {
    width: 420px !important;
    max-width: min(92vw, 420px) !important;
}

#guestModal.guest-modal--wide .modal-box {
    width: 850px !important;
    max-width: 98vw !important;
}

/* Close button (X) */
#guestModal .modal-close-x {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 34px !important;
    height: 34px !important;
    background: rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    border-radius: 50% !important;
    color: #374151 !important;
    font-size: 1.1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 20 !important;
    transition: all 0.25s ease !important;
}

#guestModal .modal-close-x:hover {
    background: rgba(0, 0, 0, 0.15) !important;
    color: #111827 !important;
    transform: rotate(90deg) !important;
}

/* Content padding */
#guestModal .guest-modal-content {
    padding: 12px 12px 8px 12px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

.guest-modal-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 6px 0 !important;
    flex-shrink: 0 !important;
}

.guest-modal-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #374151 !important;
    white-space: pre-line !important;
    flex-shrink: 0 !important;
}

/* ============================================
   MAP DIRECTIONS
   ============================================ */
#mapDirectionsContainer {
    flex: 1 !important;
    min-height: 300px !important;
    width: 100% !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #f3f4f6 !important;
}

#directionsStatus {
    padding: 6px 0 !important;
    font-size: 13px !important;
    color: #6b7280 !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

#directionsStatus input {
    padding: 4px 8px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    width: 60% !important;
}

#directionsStatus button {
    padding: 4px 14px !important;
    border: none !important;
    border-radius: 6px !important;
    background: #2563eb !important;
    color: white !important;
    font-size: 13px !important;
    cursor: pointer !important;
}

#directionsStatus button:hover {
    background: #1d4ed8 !important;
}

/* ==========================================
   QR CODE SECTION (inside WiFi modal)
   ========================================== */
.qr-section {
    margin-top: 12px;
    text-align: center;
    background: #f9fafb;
    padding: 12px;
    border-radius: 12px;
}

.qr-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.qr-image {
    max-width: 150px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 8px;
    background: white;
}

/* ==========================================
   FOLDER BUTTONS (Emergency & Services)
   ========================================== */
.folder-buttons-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    justify-content: center !important;
    align-items: center !important;
    overflow-x: auto !important;
    padding: 8px 4px !important;
}

.folder-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 120px !important;
    height: 94px !important;
    padding: 12px 8px !important;
    min-width: 120px !important;
    box-sizing: border-box !important;
    border: 1px solid #ececec !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-family: inherit !important;
    flex-shrink: 0 !important;
}

.folder-btn i {
    font-size: 28px !important;
    margin-bottom: 6px !important;
}

.folder-btn span {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

/* Emergency folder hover (κόκκινο) */
.emergency-folder-btn:hover {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

/* Services folder hover (neutral) */
.services-folder-btn:hover {
    background: #ffffff !important;
    border-color: #f1f5f9 !important;
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 20px rgba(15, 41, 66, 0.1) !important;
}

.services-folder-btn span {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.services-folder-btn:hover i {
    transform: scale(1.15) !important;
}

/* ==========================================
   AI ASSISTANT & SOCIAL
   ========================================== */
.custom-section-wrapper {
    width: 100% !important;
    margin-bottom: 12px !important;
}

.ai-assistant-card {
    width: 100% !important;
    background: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
}

.ai-assistant-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important;
}

.social-card-styled {
    cursor: pointer !important;
}

.ai-card-content {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.ai-icon-box {
    width: 44px !important;
    height: 44px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04) !important;
    flex-shrink: 0 !important;
}

.ai-icon-box i {
    font-size: 1.3rem !important;
    background: linear-gradient(135deg, #1a73e8, #e67e22) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.social-style-icon i {
    background: linear-gradient(135deg, #25d366, #1877f2) !important;
}

/* Banner-derived accent for the AI and social cards. */
.ai-assistant-card:hover,
.social-card-styled:hover {
    border-color: var(--banner-accent, #2563eb) !important;
    background: #ffffff !important;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--banner-accent, #2563eb) 18%, transparent) !important;
}

.ai-assistant-card:hover .ai-icon-box,
.social-card-styled:hover .ai-icon-box {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--banner-accent, #2563eb) 22%, transparent) !important;
}

.social-links-modal {
    padding: 26px 24px 24px !important;
}
.social-links-modal__intro { margin: 4px 0 18px; color: #64748b; font-size: 14px; line-height: 1.5; }
.social-links-modal__list { display: grid; gap: 9px; }
.social-links-modal__button { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--social-border, #e5e7eb); border-radius: 10px; color: #111827; text-decoration: none; font-weight: 600; background: #ffffff; transition: color .35s ease, border-color .35s ease; }
.social-links-modal__button::before { content: ''; position: absolute; inset: 0; z-index: 0; background: var(--social-fill, #2563eb); transform: translateY(103%); transition: transform .42s cubic-bezier(.22,.61,.36,1); }
.social-links-modal__button > * { position: relative; z-index: 1; }
.social-links-modal__button:hover::before { transform: translateY(0); }
.social-links-modal__button:hover { color: #ffffff; }
.social-links-modal__button i:first-child { width: 18px; color: var(--social-icon, #2563eb); font-size: 18px; transition: color .35s ease; }
.social-links-modal__button i:last-child { margin-left: auto; font-size: 12px; color: #94a3b8; transition: color .35s ease; }
.social-links-modal__button:hover i { color: #ffffff; }
.social-links-modal__button--instagram { --social-border: #d9468d; --social-icon: #d9468d; --social-fill: linear-gradient(135deg, #feda75 0%, #fa7e1e 24%, #d62976 52%, #962fbf 75%, #4f5bd5 100%); }
.social-links-modal__button--facebook { --social-border: #1877f2; --social-icon: #1877f2; --social-fill: #1877f2; }
.social-links-modal__button--tiktok { --social-border: #25f4ee; --social-icon: #010101; --social-fill: linear-gradient(135deg, #25f4ee 0%, #25f4ee 42%, #fe2c55 43%, #fe2c55 100%); }
.social-links-modal__button--youtube { --social-border: #ff0000; --social-icon: #ff0000; --social-fill: #ff0000; }
.social-links-modal__empty { color: #64748b; font-size: 14px; margin: 0; }

.ai-text-box h3 {
    font-size: 1rem !important;
    color: #0f2942 !important;
    margin: 0 0 2px 0 !important;
    font-weight: 700 !important;
}

.ai-text-box p {
    font-size: 0.82rem !important;
    color: #5a6e85 !important;
    margin: 0 !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
}

.ai-action-btn-circle {
    width: 38px !important;
    height: 38px !important;
    background: #0f2942 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.ai-assistant-card:hover .ai-action-btn-circle {
    background: #1a73e8 !important;
}

/* ==========================================
   RESPONSIVE (Mobile)
   ========================================== */
@media (max-width: 600px) {
    .app-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .main-banner {
        height: 175px;
        padding: 16px;
        padding-bottom: 35px;
    }

    .banner-text-wrapper h1 {
        font-size: 1.6rem;
    }
    .banner-text-wrapper p {
        font-size: 0.85rem;
    }

    /* Modal mobile */
    #guestModal .modal-box {
        max-width: 98vw !important;
        max-height: 98vh !important;
        width: 98vw !important;
        height: 90vh !important;
        border-radius: 16px !important;
        min-width: unset !important;
    }
    
    #guestModal .guest-modal-content {
        padding: 8px 8px 4px 8px !important;
    }
    
    .guest-modal-title {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    
    #mapDirectionsContainer {
        min-height: 220px !important;
    }
    
    #directionsStatus {
        font-size: 11px !important;
    }
    
    #directionsStatus input {
        font-size: 11px !important;
        width: 50% !important;
    }
    
    #directionsStatus button {
        font-size: 11px !important;
        padding: 3px 10px !important;
    }
    
    #guestModal .modal-close-x {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.9rem !important;
        top: 6px !important;
        right: 6px !important;
    }

    /* Folder buttons mobile */
    .folder-btn {
        width: 80px !important;
        height: 74px !important;
        padding: 8px 5px !important;
        min-width: 80px !important;
    }
    .folder-btn i {
        font-size: 20px !important;
    }
    .folder-btn span {
        font-size: 11px !important;
    }

    .ai-assistant-card {
        padding: 12px 14px !important;
        border-radius: 12px !important;
    }
    .ai-card-content {
        gap: 10px !important;
    }
    .ai-icon-box {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
    }
    .ai-icon-box i {
        font-size: 1rem !important;
    }
    .ai-text-box h3 {
        font-size: 0.85rem !important;
    }
    .ai-text-box p {
        font-size: 0.7rem !important;
    }
    .ai-action-btn-circle {
        width: 32px !important;
        height: 32px !important;
    }
    .ai-action-btn-circle i {
        font-size: 0.75rem !important;
    }
}

/* ============================================
   GOOGLE MAPS BLACK BUTTON HOVER
   ============================================ */
.gmaps-btn-black {
    transition: all 0.25s ease !important;
}

.gmaps-btn-black:hover,
.recommendation-directions:hover {
    background: var(--map-accent, #2563eb) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--map-accent, #2563eb) 35%, transparent) !important;
}

/* ============================================
   BUTTONS - Hover effects με απαλά χρώματα
   ============================================ */

/* Βασικό hover για όλα τα κουμπιά (κρατάμε το transform, shadow και border) */
.grid-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #e5e7eb;
}

/* Essential (μπλε) */
.grid-btn[data-category="essential"]:hover {
    background: #ffffff !important;
    border-color: #f1f5f9 !important;
}

/* Services (πορτοκαλί) */
.grid-btn[data-category="services"]:hover {
    background: #ffffff !important;
    border-color: #f1f5f9 !important;
}

/* Transport (πράσινο) */
.grid-btn[data-category="transport"]:hover {
    background: #ffffff !important;
    border-color: #f1f5f9 !important;
}

/* ============================================
   EMERGENCY CHILD BUTTONS
   ============================================ */
/* Το εικονίδιο είναι κόκκινο */
.emergency-child-btn .btn-icon {
    color: #dc3545 !important;
}

/* Το κείμενο είναι μαύρο */
.emergency-child-btn .btn-text {
    color: #111827 !important;
}

/* To hover είναι απαλό κόκκινο */
.emergency-child-btn:hover {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

/* ============================================
   EMERGENCY FOLDER - Hover effect (κόκκινο) + χρώμα εικονιδίου
   ============================================ */
.grid-btn.emergency-folder-btn:hover {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

.emergency-folder-btn .btn-icon {
    color: #dc3545 !important;
}

/* ============================================
   SERVICES FOLDER - Hover effect (κόκκινο) + χρώμα εικονιδίου
   ============================================ */
.services-folder-btn .btn-icon,
.service-child-btn .btn-icon {
    color: var(--button-accent, #2563eb) !important;
}

/* ============================================
   SERVICE CHILD BUTTONS
   ============================================ */

.service-child-btn .btn-text {
    color: #111827 !important;
}

.service-child-btn:hover {
    background: #ffffff !important;
    border-color: #f1f5f9 !important;
}

/* ============================================
   BANNER MAIN TEXT DRAGGABLE
   ============================================ */
#bannerMainText {
    user-select: none;
    -webkit-user-select: none;
    transition: none !important;
    pointer-events: auto;
    z-index: 5;
    cursor: grab;
    box-sizing: border-box;
    min-width: 0;
    max-width: calc(100% - 20px);
}

#dynamic-welcome,
#dynamic-subtitle {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    text-wrap: balance;
}

#dynamic-welcome { line-height: 1.08; }
#dynamic-subtitle { line-height: 1.35; }

#bannerMainText.dragging {
    cursor: grabbing !important;
    opacity: 0.9;
}

#bannerMainText .lock-btn {
    pointer-events: auto;
}
