/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Color Tokens - Dark Theme (Default) */
    --bg-primary: #0a0b0d;
    --bg-secondary: #121418;
    --bg-surface: rgba(22, 26, 32, 0.7);
    --bg-surface-hover: rgba(30, 36, 45, 0.9);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-red: #e5a93b;
    --accent-red-rgb: 229, 169, 59;
    
    --glass-bg: rgba(15, 17, 23, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    
    --book-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
    --glow-color: rgba(229, 169, 59, 0.2);
    
    /* Layout Tokens */
    --page-width: 380px;
    --page-height: 537px; /* 1 : 1.414 standard ratio */
    --book-width: calc(var(--page-width) * 2);
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --powered-bg: rgba(255, 255, 255, 0.03);
    --powered-border: rgba(255, 255, 255, 0.05);
    
    --transition-speed: 0.8s;
    --transition-timing: cubic-bezier(0.25, 1, 0.5, 1); /* Ease Out Expo */
}

/* Light Theme Overrides */
.light-theme {
    --bg-primary: #f1f5f9;
    --bg-secondary: #e2e8f0;
    --bg-surface: rgba(255, 255, 255, 0.8);
    --bg-surface-hover: rgba(255, 255, 255, 0.95);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-shadow: rgba(15, 23, 42, 0.1);
    
    --book-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    --glow-color: rgba(229, 43, 43, 0.08);
    --powered-bg: rgba(0, 0, 0, 0.03);
    --powered-border: rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow: hidden;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Dynamic Ambient Glow */
.ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
    transition: background 0.8s ease-in-out, var(--glow-color) 0.8s ease-in-out;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(var(--glass-border) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
}

/* ==========================================================================
   APP LAYOUT
   ========================================================================== */
.app-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 100vw;
    min-width: 0; /* Prevents container from stretching horizontally due to inner elements */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 10px;
    user-select: none;
}

.header-logo-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 2px;
}

.brand-logo-img {
    height: 46px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(255, 255, 255, 0.05));
    transition: transform 0.3s var(--transition-timing);
}

.brand-logo-img:hover {
    transform: scale(1.04);
}

.header-brand-divider {
    width: 1px;
    height: 28px;
    background-color: var(--glass-border);
    margin: 0 4px;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    user-select: none;
}

.header-brand-text .brand-title {
    color: var(--text-primary);
}

.header-brand-text .brand-subtitle {
    color: #e5a93b; /* Gold accent */
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.header-tagline {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 6px;
}

/* ==========================================================================
   3D FLIPBOOK VIEWPORT
   ========================================================================== */
.book-viewport {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1800px;
    width: 100%;
    max-width: 100vw;
    min-width: 0; /* Prevents viewport from stretching horizontally due to inner book-container */
    max-height: calc(100vh - 180px);
}

.book-container {
    position: relative;
    width: var(--book-width);
    height: var(--page-height);
    transition: transform var(--transition-speed) var(--transition-timing);
    transform-style: preserve-3d;
}

.book {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

/* Paper Sheet Styling */
.paper {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    left: 50%; /* Position the sheet starting at the hinge (center) */
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform var(--transition-speed) var(--transition-timing);
    pointer-events: auto;
}

.paper.flipping {
    z-index: 100 !important;
}

/* Page Faces (Front and Back) */
.face {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    overflow: hidden;
    background-color: var(--bg-secondary);
    box-shadow: var(--book-shadow);
}

.face.front {
    z-index: 2;
    transform: rotateY(0deg);
}

.face.back {
    /* Flipped around its own left edge to face the left side when opened */
    transform: rotateY(180deg);
    border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

/* Hinge Shadow / Gradient overlay to simulate book binding depth */
.face::after {
    content: '';
    position: absolute;
    top: 0;
    width: 30px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.face.front::after {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 100%);
}

.face.back::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 100%);
}

/* Page Content Wrap */
.page-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.image-page {
    background-color: #000;
}

.page-img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* Make sure flyers fill the aspect ratio neatly */
    user-select: none;
    pointer-events: none;
}

/* Page Number */
.page-number {
    position: absolute;
    bottom: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    z-index: 11;
    pointer-events: none;
    font-feature-settings: "tnum";
}

.face.front .page-number {
    right: 16px;
}

.face.back .page-number {
    left: 16px;
}

/* Tap/Hover Overlays on Pages */
.page-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: background 0.3s ease, opacity 0.3s ease;
    z-index: 5;
}

.face:hover .page-overlay {
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.tap-hint {
    color: white;
    background: rgba(var(--accent-red-rgb), 0.85);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(var(--accent-red-rgb), 0.4);
    animation: pulse 1.8s infinite;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.zoom-page-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    fill: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.zoom-page-btn:hover {
    transform: scale(1.15);
    background: var(--accent-red);
    border-color: transparent;
}

.zoom-page-btn svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   HTML BACK COVER LAYOUT
   ========================================================================== */
.back-cover-page {
    background: linear-gradient(135deg, #111317 0%, #1c1f26 100%);
    color: #fff;
    padding: 30px 24px;
    height: 100%;
    width: 100%;
}

.back-cover-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    padding: 24px 20px;
    background: radial-gradient(circle at top right, rgba(var(--accent-red-rgb), 0.08), transparent 60%);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.logo-area {
    text-align: center;
}

.logo-icon-securenest {
    font-size: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    animation: floatLogo 3s ease-in-out infinite;
}

.back-logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

.back-tagline {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-red);
    letter-spacing: 3px;
    margin-top: 6px;
    text-transform: uppercase;
}

.contact-address {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.02);
    text-align: left;
}

.services-list {
    margin: 20px 0;
}

.services-list h4, .contact-details h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-red);
    margin-bottom: 14px;
    font-weight: 700;
}

.service-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #e2e8f0;
    transition: transform 0.2s ease;
}

.service-item:hover {
    transform: translateX(4px);
}

.service-icon {
    margin-right: 12px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--border-radius-sm);
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.contact-item:hover {
    background: rgba(var(--accent-red-rgb), 0.05);
    border-color: rgba(var(--accent-red-rgb), 0.3);
    color: #fff;
    transform: translateY(-2px);
}

.contact-svg {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    fill: var(--accent-red);
    transition: transform 0.2s;
}

.contact-item:hover .contact-svg {
    transform: scale(1.1);
}

.back-footer {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
}

.footer-accent {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==========================================================================
   GLASSMORPHIC CONTROL PANEL
   ========================================================================== */
.control-panel {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--border-radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    z-index: 100;
    user-select: none;
    transition: background 0.3s, border-color 0.3s;
    margin-top: 10px;
}

.control-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s, fill 0.2s, transform 0.2s;
    outline: none;
}

.control-btn svg {
    width: 22px;
    height: 22px;
    fill: var(--text-secondary);
    transition: fill 0.2s, transform 0.2s;
}

.control-btn:hover {
    background-color: var(--bg-surface);
}

.control-btn:hover svg {
    fill: var(--text-primary);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.text-btn {
    width: auto;
    padding: 0 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.control-btn.text-btn:hover {
    color: var(--text-primary);
}

/* Specific styling for navigation controls */
#prevBtn:hover svg {
    transform: translateX(-2px) scale(1.1);
}

#nextBtn:hover svg {
    transform: translateX(2px) scale(1.1);
}

/* Active buttons states */
.control-btn.active svg {
    fill: var(--accent-red);
    filter: drop-shadow(0 0 5px rgba(var(--accent-red-rgb), 0.5));
}

.divider {
    width: 1px;
    height: 24px;
    background-color: var(--glass-border);
    margin: 0 4px;
}

.page-indicator {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 12px;
    min-width: 65px;
    text-align: center;
    font-feature-settings: "tnum";
}

/* Helper Utilities */
.hidden {
    display: none !important;
}

/* ==========================================================================
   MODALS & LIGHTBOXES (Bootstrap Integrations)
   ========================================================================== */
/* Custom Glassmorphism style for Bootstrap Modals */
.modal-content.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Custom styles for Bootstrap close buttons inside glass modals */
.btn-close-white {
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-close-white:hover {
    opacity: 1;
    transform: scale(1.1);
}

.help-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    margin-bottom: 30px;
}

.help-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.help-icon {
    font-size: 1.5rem;
    background: var(--bg-surface);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
}

.help-item strong {
    font-size: 0.95rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

.help-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

kbd {
    background: var(--bg-surface);
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 0 var(--glass-shadow);
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(var(--accent-red-rgb), 0.4);
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    outline: none;
}

.btn-primary:hover {
    background-color: #f33f3f;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(var(--accent-red-rgb), 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Lightbox Content */
/* Lightbox Content layout managed natively by Bootstrap fullscreen modals */

.lightbox-img-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.lightbox-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lightbox-img-wrapper .back-cover-page {
    width: auto;
    height: 100%;
    aspect-ratio: 1 / 1.414;
    border-radius: var(--border-radius-md);
    max-height: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.lightbox-nav {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 3.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.lightbox-nav:active {
    transform: scale(0.95);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(var(--accent-red-rgb), 0.4);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 4px 25px rgba(var(--accent-red-rgb), 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(var(--accent-red-rgb), 0.4);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM
   ========================================================================== */

/* Tablet & Smaller Screens - Adjust standard book sizes */
@media (max-width: 1024px) {
    :root {
        --page-width: 320px;
        --page-height: 452px;
    }
    
    .modal-box {
        padding: 30px 20px;
    }
}

/* Mobile Screens (Width < 768px): Unified 3D Single Page Viewport */
@media (max-width: 767px) {
    :root {
        --page-width: min(calc(100vw - 20px), calc((100vh - 150px) / 1.414));
        --page-height: calc(var(--page-width) * 1.414);
        --book-width: var(--page-width);
    }
    
    .paper {
        width: 100%;
        left: 0;
    }
    
    .face {
        border-radius: var(--border-radius-md) !important;
    }
    
    .app-container {
        padding: 10px;
    }
    
    .header-logo-wrapper {
        gap: 10px;
    }
    
    .brand-logo-img {
        height: 32px;
    }
    
    .header-brand-divider {
        height: 20px;
    }
    
    .header-brand-text {
        font-size: 0.95rem;
    }
    
    .header-brand-text .brand-subtitle {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }
    
    .back-logo-img {
        height: 42px;
    }
    
    .header-tagline {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .book-viewport {
        max-height: calc(100vh - 160px);
    }
    
    /* Control Bar mobile wrapping */
    .control-panel {
        gap: 2px;
        padding: 4px 6px;
        max-width: 100%;
    }
    
    .control-btn {
        width: 32px;
        height: 32px;
    }
    
    .control-btn.text-btn {
        width: auto;
        padding: 0 8px;
        font-size: 0.7rem;
        border-radius: 10px;
    }
    
    .control-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .page-indicator {
        font-size: 0.75rem;
        min-width: 44px;
        padding: 0 2px;
    }
    
    /* Lightbox Nav controls styling for mobile */
    .lightbox-nav {
        position: absolute;
        width: 50px;
        height: 50px;
        font-size: 2.5rem;
        z-index: 10;
        background: rgba(0,0,0,0.6);
    }
    
    #lightboxPrev {
        left: 10px;
    }
    
    #lightboxNext {
        right: 10px;
    }
    
    .lightbox-img-wrapper {
        padding: 0 5px;
    }
    
    .back-cover-page {
        padding: 20px 14px;
    }
    
    .back-cover-container {
        padding: 16px 12px;
    }
    
    .services-list {
        margin: 10px 0;
    }
    
    .services-list h4, .contact-details h4 {
        margin-bottom: 8px;
    }
    
    .service-item {
        margin-bottom: 6px;
        font-size: 0.8rem;
    }
    
    .contact-details {
        gap: 6px;
    }
    
    .contact-item {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
    
    .contact-svg {
        margin-right: 8px;
    }
}

/* Ultra-small screens height optimization */
@media (max-height: 600px) {
    :root {
        --page-height: 380px;
        --page-width: calc(var(--page-height) / 1.414);
    }
    
    .app-header {
        display: none;
    }
}

/* ==========================================================================
   VIDEO PLAYER MODAL STYLING
   ========================================================================== */
.play-video-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(2, 115, 212, 0.85); /* SmartBiz Royal Blue */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(2, 115, 212, 0.3);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

.play-video-btn:hover {
    background: rgba(2, 115, 212, 1);
    transform: scale(1.06);
    box-shadow: 0 8px 25px rgba(2, 115, 212, 0.5);
}

.play-video-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Video modal layout managed natively by Bootstrap large centered modals */

@media (max-width: 767px) {
    .play-video-btn {
        padding: 8px 14px;
        font-size: 0.7rem;
        gap: 6px;
    }
    
    .play-video-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* ==========================================================================
   FOOTER STYLING
   ========================================================================== */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    user-select: none;
    z-index: 10;
}

.app-footer:hover {
    opacity: 1;
}

.powered-by-text {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.footer-logo-img {
    height: 18px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.15));
    transition: transform 0.2s ease;
}

.footer-logo-img:hover {
    transform: scale(1.06);
}

@media (max-width: 767px) {
    .app-footer {
        margin-top: 8px;
    }
    .footer-logo-img {
        height: 14px;
    }
    .powered-by-text {
        font-size: 0.55rem;
    }
}

/* ==========================================================================
   SWIPE INDICATOR OVERLAY
   ========================================================================== */
.swipe-indicator-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(10, 11, 13, 0.45); /* Soft dimming overlay */
    backdrop-filter: blur(2px);
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    border-radius: var(--border-radius-md);
}

.swipe-indicator-overlay.dismissed {
    opacity: 0;
    visibility: hidden;
}

.swipe-hand-wrapper {
    position: relative;
    width: 180px;
    height: 60px;
    margin-bottom: 16px;
}

.swipe-hand-svg {
    position: absolute;
    right: 10px;
    top: 5px;
    width: 44px;
    height: 44px;
    fill: white;
    filter: drop-shadow(0 0 10px rgba(var(--accent-red-rgb), 0.9));
    animation: swipeAction 2.2s infinite ease-in-out;
}

.swipe-line-track {
    position: absolute;
    top: 25px;
    right: 20px;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-red-rgb), 0.8), transparent);
    border-radius: 2px;
    filter: blur(1px);
    box-shadow: 0 0 12px rgba(var(--accent-red-rgb), 0.6);
    animation: trackAction 2.2s infinite ease-in-out;
}

.swipe-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    text-shadow: 0 0 8px rgba(var(--accent-red-rgb), 0.6);
    animation: textPulse 1.1s infinite alternate;
}

@keyframes swipeAction {
    0% {
        transform: translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    55% {
        transform: translateX(-120px) scale(0.9);
        opacity: 1;
    }
    85%, 100% {
        transform: translateX(-120px) scale(0.9);
        opacity: 0;
    }
}

@keyframes trackAction {
    0% {
        width: 0;
        right: 20px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    55% {
        width: 120px;
        right: 20px;
        opacity: 1;
    }
    85%, 100% {
        width: 120px;
        right: 20px;
        opacity: 0;
    }
}

@keyframes textPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    100% {
        transform: scale(1.04);
        box-shadow: 0 4px 25px rgba(var(--accent-red-rgb), 0.35);
    }
}

/* ==========================================================================
   INTERACTIVE OVERLAY ACTION BUTTONS
   ========================================================================== */
.page-overlay-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    z-index: 10;
    pointer-events: auto; /* Allow clicks on buttons even when overlay sits inside viewport */
}

.overlay-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 11, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white !important;
    text-decoration: none !important;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), 
                background 0.2s ease, 
                box-shadow 0.2s ease, 
                border-color 0.2s ease;
}

.overlay-action-btn svg {
    width: 16px;
    height: 16px;
    fill: var(--accent-red); /* Gold accent */
    transition: fill 0.2s ease, transform 0.2s ease;
}

.overlay-action-btn:hover {
    background: var(--accent-red); /* Gold background on hover */
    color: #000 !important; /* High contrast black text on gold */
    border-color: transparent;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(var(--accent-red-rgb), 0.55);
}

.overlay-action-btn:hover svg {
    fill: #000;
    transform: scale(1.1);
}

.overlay-action-btn:active {
    transform: translateY(-1px) scale(0.98);
}

@media (max-width: 767px) {
    /* Ensure action buttons are always visible on touch screens */
    .face.back .page-overlay, 
    .face.front .page-overlay {
        background: rgba(0, 0, 0, 0.15) !important;
        opacity: 1 !important;
    }
    
    .page-overlay-actions {
        gap: 8px;
    }
    
    .overlay-action-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
        letter-spacing: 0.8px;
        gap: 6px;
    }
    
    .overlay-action-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* ==========================================================================
   APP BODY & SIDEBAR LAYOUT
   ========================================================================== */
.app-body {
    flex: 1;
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
    min-height: 0;
    width: 100%;
}

.app-sidebar {
    width: 320px;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    background: rgba(15, 17, 23, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    z-index: 10;
    transition: width 0.3s ease, background 0.3s ease;
}

.sidebar-header {
    margin-bottom: 18px;
}

.sidebar-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.sidebar-header p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 6px 0 0 0;
}

.admin-control-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 18px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s ease;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s ease;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* SEARCH BOX */
.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.search-box input:focus {
    border-color: var(--accent-red);
    outline: none;
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(229, 169, 59, 0.15);
}

/* FILTERS */
.filter-group {
    margin-bottom: 14px;
}

.filter-group label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.5px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-tag {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.filter-tag.active {
    background-color: var(--accent-red);
    color: #000;
    border-color: var(--accent-red);
    font-weight: 600;
}

.filter-tag.available {
    border-left: 3px solid #16a34a;
}

.filter-tag.booked {
    border-left: 3px solid #ef4444;
}

/* SIDEBAR SCROLL LISTING */
.sidebar-scroll-area {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    margin-top: 10px;
    padding-right: 2px;
}

.plot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.plot-list-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plot-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
}

.plot-list-card.selected {
    border-color: var(--accent-red);
    background-color: rgba(229, 169, 59, 0.08);
    box-shadow: 0 0 0 2px var(--accent-red);
}

.plot-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plot-card-header strong {
    font-size: 0.8rem;
    font-weight: 700;
}

.status-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
}

.status-badge.available {
    background-color: #dcfce7;
    color: #15803d;
}

.status-badge.reserved {
    background-color: #fee2e2;
    color: #b91c1c;
}

.status-badge.sold {
    background-color: #f1f5f9;
    color: #475569;
}

.plot-list-card span.dimensions {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   MAP PAGE IN BOOKLET
   ========================================================================== */
.map-page {
    background-color: #ffffff !important;
    color: #1e293b !important;
}

.map-page .page-inner {
    width: 100%;
    height: 100%;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
}

.page-header-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.mini-brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-bullet {
    width: 6px;
    height: 6px;
    background-color: var(--accent-red);
    border-radius: 50%;
}

.mini-brand h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #0f2a4a;
    margin: 0;
}

.page-header-mini .tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.map-toolbar-overlay {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.legend-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    background-color: #f8fafc;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    border: 0.5px solid #475569;
}

.legend-color.size-6x9 { background-color: #fcd34d; }
.legend-color.size-9x12 { background-color: #93c5fd; }
.legend-color.size-odd { background-color: #fdba74; }
.legend-color.size-sold {
    background: repeating-linear-gradient(
        45deg,
        #94a3b8,
        #94a3b8 1.5px,
        #cbd5e1 1.5px,
        #cbd5e1 3px
    );
}

.legend-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: #475569;
}

.map-helper {
    font-size: 0.6rem;
    color: #64748b;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: right;
    max-width: 110px;
    line-height: 1.2;
}

.map-helper i {
    color: #0f2a4a;
}

.svg-map-wrapper {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8fafc;
    position: relative;
}

#svg-layout-map {
    max-width: 100%;
    max-height: 380px;
    display: block;
}

/* SVG INTERACTIVE PLOTS */
.map-plot {
    cursor: pointer;
}

.map-plot rect,
.map-plot polygon {
    transition: fill 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease;
}

.map-plot:hover rect,
.map-plot:hover polygon {
    stroke: #000000 !important;
    stroke-width: 1.8px !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.map-plot.plot-available:hover rect,
.map-plot.plot-available:hover polygon {
    fill: var(--accent-red) !important;
}

.map-plot.selected rect,
.map-plot.selected polygon {
    stroke: #ef4444 !important;
    stroke-width: 2.2px !important;
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5));
}

.plot-label {
    pointer-events: none;
    font-weight: 800;
    font-size: 8px;
    font-family: 'Outfit', sans-serif;
    fill: #0f2a4a;
}

.plot-sold-pattern {
    pointer-events: none;
}

.page-number-footer {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-align: center;
    margin-top: 8px;
}

/* ==========================================================================
   PLOT HOVER TOOLTIP
   ========================================================================== */
.plot-tooltip {
    position: fixed;
    display: none;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.plot-tooltip h4 {
    margin: 0 0 4px 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-red);
}

.tooltip-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 4px;
    border-radius: 3px;
    margin-bottom: 4px;
    align-self: flex-start;
}

/* ==========================================================================
   MODAL INQUIRY FORM & INPUTS
   ========================================================================== */
.glass-modal {
    background: rgba(20, 24, 33, 0.85) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
}

.glass-input {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
}

.glass-input:focus {
    border-color: var(--accent-red) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(229, 169, 59, 0.15) !important;
}

.btn-gold {
    background: var(--accent-red) !important;
    color: black !important;
    border: none !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.btn-gold:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 4px 15px rgba(229, 169, 59, 0.4);
}

/* ==========================================================================
   RESPONSIVE LAYOUT BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
    .app-sidebar {
        width: 280px;
    }
    .plot-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .app-body {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
    }
    
    .app-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 16px;
    }
    
    .sidebar-scroll-area {
        max-height: 180px;
    }
    
    .plot-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .book-viewport {
        height: 520px;
        max-height: 520px;
        padding: 30px 10px;
    }
}

@media (max-width: 767px) {
    .plot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar-scroll-area {
        max-height: 150px;
    }
    
    .book-viewport {
        height: auto;
        min-height: 480px;
        padding: 15px 5px;
    }
}

/* ==========================================================================
   INFO PAGE STYLING (PAGE 2)
   ========================================================================== */
.info-page {
    background-color: #ffffff !important;
    color: #1e293b !important;
}

.info-page .page-inner {
    width: 100%;
    height: 100%;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
}

.page-title-block {
    margin-bottom: 14px;
}

.page-title-block h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f2a4a;
    margin: 0 0 2px 0;
}

.page-title-block span.subtitle {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
}

.intro-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.intro-card {
    display: flex;
    gap: 12px;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
    border-left: 4px solid #0f2a4a;
}

.intro-card-icon {
    font-size: 1.1rem;
    color: var(--accent-red); /* Gold accent */
    margin-top: 1px;
}

.intro-card-text h5 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f2a4a;
    margin: 0 0 2px 0;
}

.intro-card-text p {
    font-size: 0.68rem;
    line-height: 1.4;
    color: #64748b;
    margin: 0;
}

.location-highlight h4 {
    font-size: 0.8rem;
    color: #0f2a4a;
    margin: 0 0 4px 0;
    font-weight: 700;
}

.location-highlight .address-text {
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--accent-red);
    margin-bottom: 8px;
}

.location-banner {
    background-color: #0f2a4a;
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.compass-overlay {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 60px;
    color: rgba(255, 255, 255, 0.04);
    transform: rotate(15deg);
    pointer-events: none;
}

.location-banner span {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-red);
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.location-banner ul {
    list-style: none;
    font-size: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin: 0;
}

.location-banner li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-banner li i {
    color: var(--accent-red);
    font-size: 0.6rem;
}

/* ==========================================================================
   IMAGE PAGE LINK HOTSPOTS
   ========================================================================== */
.page-hotspot {
    position: absolute;
    display: block;
    z-index: 8;
    cursor: pointer;
    text-decoration: none;
    border-radius: 4px;
    background-color: rgba(229, 169, 59, 0); /* Invisible default */
    color: transparent;
    font-size: 0;
    user-select: none;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.page-hotspot:hover {
    background-color: rgba(229, 169, 59, 0.08); /* Gold hint on hover */
    box-shadow: 0 0 10px rgba(229, 169, 59, 0.25);
}

.page-hotspot:active {
    background-color: rgba(229, 169, 59, 0.15);
}
