/* ============================================
   PAGES STYLES (Date: 2025-11-10)
   ============================================

   Scope: Home, Video, Features, Contact pages
   Related JS: main.js (page switching)
   Related Pages: Home, Video, Features, Contact

   BEFORE EDITING:
   - Simple page styles belong HERE
   - Complex features get their own files (forum, support, etc.)
   - Shared layouts belong in layouts.css
   - Check CLAUDE.md Section 2d for architecture

   ============================================ */

/* Home Page */


/* Video Page */


/* Features Page */


/* Contact Page */
/* Contact Page Styles */
.contact-container {
    display: flex;
    gap: 100px;
    justify-content: center;
    align-items: stretch;
    width: fit-content;
    margin: 8px auto 0 auto;
}

.contact-info {
    width: 400px;
    display: flex;
    flex-direction: column;
}

.contact-form-section {
    width: 400px;
}

.contact-info, .contact-form-section {
    background-color: var(--theme-card-bg);
    border-radius: 8px;
    padding: 0 20px 5px 20px;
    border: 1px solid var(--theme-card-border);
}

.contact-info h2, .contact-form-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--theme-text-primary);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    background: var(--theme-card-bg);
    border: var(--card-border-width) solid var(--theme-card-border);
    box-shadow: var(--card-shadow);
    transition: var(--card-transition);
}

.contact-item:hover {
    background: var(--theme-card-hover-bg);
    border-color: var(--theme-card-hover-border);
    box-shadow: var(--card-shadow-hover);
}

.contact-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--theme-text-primary);
}

.contact-details p {
    font-size: 13px;
    color: var(--theme-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.social-section {
    margin-top: 0;
    margin-bottom: 0;
}

.social-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--theme-text-primary);
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.social-icon:hover {
    opacity: 0.8;
}


.contact-form {
    max-width: 500px;
}

.contact-form .form-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--theme-input-border);
    border-radius: 4px;
    font-size: 14px;
    background-color: var(--theme-input-bg);
    color: var(--theme-input-color);
}

.contact-form .form-input::placeholder {
    color: var(--theme-input-placeholder);
}

.message-input {
    resize: vertical;
    min-height: 0;
    height: 110px;
    padding: 4px 8px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

#contactName,
#contactEmail,
#contactPhone {
    background-color: var(--theme-card-bg);
    color: var(--theme-input-color);
    min-height: 32px;
    padding: 6px 12px;
}

#contactMessage {
    background-color: var(--theme-card-bg);
    color: var(--theme-input-color);
}

/* Legacy .primary-button removed - use .btn .btn-primary from components/buttons.css */

/* Mark All Read button variants - REMOVED, now using .btn-has-unread in components/buttons.css */

.contact-submit {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 10px;
}

#contactForm > div:nth-child(6) {
    background: none !important;
}

@media (max-width: 900px) {
    .contact-container {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .contact-info,
    .contact-form-section {
        width: 100%;
        max-width: 500px;
    }
}

/* Video Page Styles */
#video-content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
    box-sizing: border-box;
    padding: 20px;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 1400px; /* Maximum width for very large screens */
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    height: 0;
    overflow: hidden;
    box-sizing: border-box;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--theme-shadow-dark);
}

.main-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0.9;
    border-radius: 8px;
}

/* YouTube iframe specific styling */
.main-video[src*="youtube.com"],
.main-video[src*="youtu.be"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive video sizing for all screen sizes */

/* Extra large screens (1440px and up) */
@media (min-width: 1440px) {
    #video-content {
        padding: 40px;
    }
    .video-container {
        max-width: 1600px;
    }
}

/* Large desktop (1200px - 1439px) */
@media (max-width: 1439px) {
    .video-container {
        max-width: 1200px;
    }
}

/* Desktop (1024px - 1199px) */
@media (max-width: 1199px) {
    #video-content {
        padding: 20px;
    }
    .video-container {
        max-width: 1000px;
    }
}

/* Tablet landscape (900px - 1023px) */
@media (max-width: 1023px) {
    #video-content {
        padding: 20px;
    }
    .video-container {
        max-width: 95%;
        width: 95%;
    }
}

/* Tablet portrait (768px - 899px) */
@media (max-width: 899px) {
    #video-content {
        padding: 15px;
    }
    .video-container {
        max-width: 95%;
        width: 95%;
    }
}

/* Mobile landscape (600px - 767px) */
@media (max-width: 767px) {
    #video-content {
        padding: 15px 10px;
    }
    .video-container {
        max-width: 98%;
        width: 98%;
        border-radius: 6px;
    }
    .main-video {
        border-radius: 6px;
    }
}

/* Mobile portrait (480px - 599px) */
@media (max-width: 599px) {
    #video-content {
        padding: 10px 8px;
    }
    .video-container {
        max-width: 100%;
        width: 100%;
        border-radius: 4px;
    }
    .main-video {
        border-radius: 4px;
    }
}

/* Small mobile (less than 480px) */
@media (max-width: 479px) {
    #video-content {
        padding: 8px 5px;
    }
    .video-container {
        max-width: 100%;
        width: 100%;
        border-radius: 0; /* No border radius on very small screens */
    }
    .main-video {
        border-radius: 0;
    }
}

/* ========== LANDSCAPE ORIENTATION FIXES ========== */
/* When in landscape, constrain width based on height to prevent video from being cut off */

/* Landscape mode - general (any device in landscape) */
@media (orientation: landscape) and (max-height: 600px) {
    #video-content {
        padding: 10px;
        align-items: flex-start; /* Align to top instead of center */
    }
    .video-container {
        /* In landscape, calculate width based on available height */
        /* If height is 500px, video should be ~888px wide (500 * 16/9) */
        max-width: min(95vw, calc((100vh - 84px - 20px) * 16 / 9));
        width: min(95vw, calc((100vh - 84px - 20px) * 16 / 9));
        /* 84px = menu bar (40px) + header bar (24px) + padding (20px) */
    }
}

/* Landscape mode - very short screens (mobile landscape) */
@media (orientation: landscape) and (max-height: 450px) {
    #video-content {
        padding: 5px;
    }
    .video-container {
        max-width: min(98vw, calc((100vh - 84px - 10px) * 16 / 9));
        width: min(98vw, calc((100vh - 84px - 10px) * 16 / 9));
        border-radius: 4px;
    }
    .main-video {
        border-radius: 4px;
    }
}

/* Landscape mode - extremely short screens */
@media (orientation: landscape) and (max-height: 350px) {
    #video-content {
        padding: 2px;
    }
    .video-container {
        max-width: min(99vw, calc((100vh - 84px - 4px) * 16 / 9));
        width: min(99vw, calc((100vh - 84px - 4px) * 16 / 9));
        border-radius: 0;
    }
    .main-video {
        border-radius: 0;
    }
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(transparent, var(--theme-shadow-darkest));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
    z-index: 10;
    padding-bottom: 20px;
}

.video-overlay.hidden {
    display: none;
}

.play-button {
    font-size: 48px;
    color: var(--theme-text-on-primary);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px var(--theme-shadow-darkest);
}

.video-message {
    color: var(--theme-text-on-primary);
    font-size: 16px;
    text-align: center;
    margin: 0;
    padding: 0 10px;
    text-shadow: 1px 1px 2px var(--theme-shadow-darkest);
}

/* Responsive video overlay adjustments */
@media (max-width: 767px) {
    .video-overlay {
        height: 100px;
        padding-bottom: 15px;
    }
    .play-button {
        font-size: 40px;
    }
    .video-message {
        font-size: 14px;
    }
}

@media (max-width: 599px) {
    .video-overlay {
        height: 80px;
        padding-bottom: 12px;
    }
    .play-button {
        font-size: 36px;
        margin-bottom: 8px;
    }
    .video-message {
        font-size: 13px;
    }
}

@media (max-width: 479px) {
    .video-overlay {
        height: 70px;
        padding-bottom: 10px;
    }
    .play-button {
        font-size: 32px;
        margin-bottom: 6px;
    }
    .video-message {
        font-size: 12px;
        padding: 0 8px;
    }
}

/* Home Page Styles */
#home-content {
    padding-bottom: 0 !important;
    overflow: hidden !important;
}

.home-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
}

.features-container {
    margin: 0;
    padding-top: 8px;
}

.product-showcase {
    position: relative;
    flex: 1;
    max-width: 100%;
    margin-top: 20px;
    margin-left: -10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 120px); /* Fit within viewport */
    object-fit: contain; /* Show entire image */
    display: block;
}

.hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.hotspot-dot {
    width: 12px;
    height: 12px;
    background: var(--theme-text-on-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 8px var(--theme-shadow-medium);
}

.hotspot-dot:hover {
    background: var(--theme-text-on-primary);
    transform: scale(1.2);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 var(--theme-overlay-strong);
    }
    70% {
        box-shadow: 0 0 0 10px var(--theme-overlay-transparent);
    }
    100% {
        box-shadow: 0 0 0 0 var(--theme-overlay-transparent);
    }
}

.info-popup {
    position: absolute;
    background: var(--theme-card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--theme-shadow-light);
    min-width: 280px;
    max-width: 320px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--theme-border-light);
    cursor: pointer;
    pointer-events: none; /* Prevent interference with hover */
}

/* Positioning classes for smart placement */
.info-popup.popup-right {
    left: 30px;
    transform: none;
}

.info-popup.popup-left {
    left: auto !important;
    right: 100% !important;
    margin-right: 10px !important;
    transform: none;
}

.info-popup.popup-top {
    bottom: 30px;
    top: auto;
}

.info-popup.popup-bottom {
    top: 30px;
    bottom: auto;
}

/* Boundary-aware positioning - overrides when at screen edges */
.info-popup.popup-screen-left {
    left: 30px;
    right: auto;
    transform: none;
}

.info-popup.popup-screen-right {
    right: calc(100% + 30px);
    left: auto;
    transform: none;
}

/* Center-aligned popup for top/bottom center hotspots */
.info-popup.popup-center-h {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.info-popup.popup-center-h.popup-top {
    bottom: 30px;
    top: auto;
}

.info-popup.popup-center-h.popup-bottom {
    top: 30px;
    bottom: auto;
}

/* Combined positioning for corners */
.info-popup.popup-right.popup-top {
    left: 30px;
    bottom: 30px;
}

.info-popup.popup-right.popup-bottom {
    left: 30px;
    top: 30px;
}

.info-popup.popup-left.popup-top {
    right: 30px;
    left: auto;
    bottom: 30px;
}

.info-popup.popup-left.popup-bottom {
    right: 30px;
    left: auto;
    top: 30px;
}

.info-popup:hover {
    background: var(--theme-bg-secondary);
}

.hotspot:hover .info-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Add slight animation on appearance */
.hotspot:hover .info-popup.popup-right {
    transform: translateX(5px);
}

.hotspot:hover .info-popup.popup-left {
    transform: translateX(-5px);
}

.hotspot:hover .info-popup.popup-top:not(.popup-center-h) {
    transform: translateY(-5px);
}

.hotspot:hover .info-popup.popup-bottom:not(.popup-center-h) {
    transform: translateY(5px);
}

/* Animation for centered popups */
.hotspot:hover .info-popup.popup-center-h.popup-top {
    transform: translateX(-50%) translateY(-5px);
}

.hotspot:hover .info-popup.popup-center-h.popup-bottom {
    transform: translateX(-50%) translateY(5px);
}

/* Combined animations for corners */
.hotspot:hover .info-popup.popup-right.popup-top {
    transform: translate(5px, -5px);
}

.hotspot:hover .info-popup.popup-right.popup-bottom {
    transform: translate(5px, 5px);
}

.hotspot:hover .info-popup.popup-left.popup-top {
    transform: translate(-5px, -5px);
}

.hotspot:hover .info-popup.popup-left.popup-bottom {
    transform: translate(-5px, 5px);
}

.info-popup h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--theme-text-primary);
}

.info-popup p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--theme-text-secondary);
    line-height: 1.4;
}

.info-popup p:last-child {
    margin: 0;
}

.click-more {
    font-size: 12px;
    color: var(--theme-btn-primary-bg);
    font-weight: 500;
    margin-top: 8px;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .info-popup {
        min-width: 240px;
        max-width: 280px;
        padding: 15px;
    }
    
    /* Adjust positioning offsets for mobile */
    .info-popup.popup-right {
        left: 20px;
    }

    .info-popup.popup-left {
        left: auto;
        right: calc(100% + 10px);
    }
    
    .info-popup.popup-top {
        bottom: 20px;
    }
    
    .info-popup.popup-bottom {
        top: 20px;
    }
    
    .hotspot-dot {
        width: 16px;
        height: 16px;
    }
    
    .info-popup h3 {
        font-size: 16px;
    }
    
    .info-popup p {
        font-size: 13px;
    }
}

/* Features Page Styles */
/* Features container - no special styling needed */

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px;
}

/* .feature-item - MOVED TO components/cards.css (uses theme variables) */

/* Feature Item Content - page-specific typography */
.feature-item h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--theme-bg-secondary);
    line-height: 1.2;
    text-align: left;
}

.feature-item p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--theme-bg-secondary);
    margin: 0;
    text-align: left;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .features-title {
        font-size: 36px;
        margin-bottom: 40px;
    }
    
    .feature-item h2 {
        font-size: 24px;
    }
    
    .feature-item p {
        font-size: 16px;
    }
}

/* Duplicate @media removed - merged with earlier definition at line 550 */

