/* Villa Wesset Kiosk Display - Clean Styles */

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

:root {
    --primary-color: #1a1a1a;
    --accent-color: #a72417;
    --text-color: #333;
    --dark-bg: #020126;
    --card-bg: #fff;
    --font-heading: 'Belleza', serif;
    --font-body: 'Belleza', sans-serif;
}

h1, h2, h3 {
    text-transform: uppercase;
    /* font-weight: bold; */
}

body {
    font-family: var(--font-body);
    line-height: 1.2;
    color: var(--text-color);
    overflow: hidden;
    background-color: var(--dark-bg);
}

/* Welcome Ad Transitions */
.welcome-content.fade-out {
    opacity: 0;
}

.welcome-content.fade-in {
    opacity: 1;
}

/* Layout - Three Column Grid with dynamic advertising section */
.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
}

.grid-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    min-height: 0; /* Allow grid to shrink */
}

/* Advertising section takes up space in normal flow */
.advertising-section {
    /* No fixed positioning - part of normal document flow */
    flex-shrink: 0;
}

.welcome-section {
    grid-column: 1;
}

.info-section {
    grid-column: 2;
}

.updates-section {
    grid-column: 3;
}

/* Welcome Section */
.welcome-section {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background: #0A0B1A;
    color: #FFFFFF;
    padding: 2rem;
    transition: all 0.5s ease;
}

.welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
    url('https://dynamic-media-cdn.tripadvisor.com/media/photo-o/06/75/24/a5/hotel-restaurant-villa.jpg');
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.welcome-section:hover .welcome-overlay {
    transform: scale(1.05);
}

.welcome-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* padding: 2rem; */
    color: white;
    transition: opacity 0.5s ease;
}

.welcome-section h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: normal;
    margin-bottom: 1rem;
    letter-spacing: 2.5px;
}

.welcome-message {
    font-size: 1.3rem;
    margin-top: 1rem;
    font-weight: 300;
    line-height: 1.4;
    max-width: 600px;
}

.divider {
    width: 50px;
    height: 1px;
    background-color: var(--accent-color);
    margin: 1rem auto;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: normal;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Welcome section state support */
.welcome-section[data-state="default"] {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-section[data-state="person_visible"] {
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Welcome section background image support */
.welcome-section.has-background-image {
    position: relative;
}

.welcome-section.has-background-image .welcome-content {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Improve text readability on background images */
.welcome-section.has-background-image .welcome-title,
.welcome-section.has-background-image .welcome-subtitle,
.welcome-section.has-background-image .welcome-text {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Transparent background support */
.welcome-section.transparent-bg {
    background: transparent !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.welcome-section.transparent-bg .welcome-title,
.welcome-section.transparent-bg .welcome-text,
.welcome-section.transparent-bg .welcome-subtitle,
.welcome-section.transparent-bg .welcome-message {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Welcome section advertisement content */
.welcome-section .welcome-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.welcome-section .welcome-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.welcome-section .welcome-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.welcome-section .welcome-text,
.welcome-section .welcome-message {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.welcome-section .welcome-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.welcome-section .welcome-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Info Cards */
.info-card {
    background-color: var(--card-bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* QR Section */
.qr-section h2 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    color: var(--primary-color);
    text-align: center;
    font-weight: normal;
    letter-spacing: 1.5px;
}

.whatsapp-info {
    text-align: center;
    font-size: 1rem;
    color: var(--text-color);
    margin-top: 0.5rem;
    font-weight: normal;
    letter-spacing: 0.8px;
}

#qrcode {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#qrcode img {
    max-width: 180px;
    height: auto;
    transition: transform 0.3s ease;
}

#qrcode:hover img {
    transform: scale(1.05);
}

/* Updates Section */
.updates-section h2 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    color: var(--primary-color);
    text-align: center;
    font-weight: normal;
    letter-spacing: 1.5px;
}

.updates-section .info-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.feed-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
    overflow: hidden;
}

.feed-item {
    background-color: var(--light-bg);
    padding: 1.2rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    flex-shrink: 0;
}

.feed-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--accent-color);
}

.feed-item:hover {
    transform: translateX(5px);
}

.feed-item h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: normal;
    letter-spacing: 0.8px;
}

.feed-item p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-item .date {
    font-size: 0.75rem;
    color: #888;
    display: block;
    margin-top: 0.8rem;
    font-weight: 300;
}

/* Feed animations */
.feed-item.new-post {
    opacity: 0;
}

.feed-item.removing-post {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}

/* QR Code styles for posts with links */
.feed-item.has-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feed-item .post-content {
    flex: 1;
}

.feed-item .post-qr-code {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feed-item .post-qr-code:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.feed-item .post-qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* QR code fallback link styles */
.feed-item .post-qr-fallback {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(167, 36, 23, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feed-item .qr-fallback-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--accent-color);
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
}

.feed-item .qr-fallback-link:hover {
    background: rgba(167, 36, 23, 0.2);
    transform: scale(1.05);
}

.feed-item .qr-fallback-link span {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.feed-item .qr-fallback-link small {
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {
    .feed-item .post-qr-code {
        width: 60px;
        height: 60px;
    }
}

/* Dynamic Advertising Section - Enhanced with Background Image Support */
.advertising-section {
    position: relative;
    background: #f8f9fa;
    color: #333333;
    padding: 1.5rem 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    opacity: 1;
    max-height: 140px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Background image overlay for text readability */
.advertising-section.has-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    border-radius: 8px;
    z-index: 1;
}

/* Ensure content is above overlay */
.advertising-section.has-background .ad-content {
    position: relative;
    z-index: 2;
    color: white;
}

/* Initially hide the section until ads are loaded */
.advertising-section:not(.loaded) {
    display: none;
}

/* Hidden state - collapses height and fades out */
.advertising-section.hidden {
    opacity: 0;
    max-height: 0;
    padding: 0 2rem;
    margin: 0;
    box-shadow: none;
}

/* Slide-in animation - expands from collapsed state */
.advertising-section.slide-in {
    animation: expandFromCollapsed 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes expandFromCollapsed {
    0% {
        opacity: 0;
        max-height: 0;
        padding: 0 2rem;
        box-shadow: none;
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }
    100% {
        opacity: 1;
        max-height: 140px;
        padding: 1.5rem 2rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
}

/* Advertising section content layout */
.advertising-section .ad-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Remove small ad image in favor of background image */
.advertising-section .ad-image {
    display: none;
}

.advertising-section .ad-text-content {
    flex: 1;
    text-align: center;
}

/* Responsive text scaling with clamp() */
.advertising-section .ad-title {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

.advertising-section .ad-text {
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    line-height: 1.4;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Enhanced button styling */
.advertising-section .ad-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #007cba, #005a8a);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,124,186,0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.advertising-section .ad-link:hover {
    background: linear-gradient(135deg, #005a8a, #007cba);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,124,186,0.4);
    border-color: rgba(255,255,255,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .grid-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1rem;
    }
    
    .welcome-section {
        grid-column: 1;
        grid-row: 1;
    }
    
    .info-section {
        grid-column: 1;
        grid-row: 2;
    }
    
    .updates-section {
        grid-column: 1;
        grid-row: 3;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
      .advertising-section {
        max-height: 120px;
        padding: 1rem 1.5rem;
    }
    
    .advertising-section .ad-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .advertising-section .ad-text-content {
        text-align: center;
    }
    
    /* Mobile animation adjustment */
    @keyframes expandFromCollapsed {
        0% {
            opacity: 0;
            max-height: 0;
            padding: 0 1.5rem;
            box-shadow: none;
        }
        50% {
            opacity: 0.7;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        }
        100% {
            opacity: 1;
            max-height: 120px;
            padding: 1rem 1.5rem;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
    }
}

/* Loading content styling */
.loading-content {
    opacity: 0.7;
}

.is-style-short {
    width: 50px;
    margin-left: auto;
  margin-right: auto;
}