/**
 * Baserow Sections CSS
 * Styles for dynamic Baserow-powered sections
 * Extends existing style.css and cafe-styles.css
 */

/* ============================================
   SUBSECTION TITLES
   ============================================ */

.subsection-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
    font-weight: 600;
    text-align: left;
}

.subsection-title:first-of-type {
    margin-top: var(--spacing-lg);
}

/* ============================================
   UNIFIED GRID FOR BASEROW SECTIONS
   ============================================ */

.baserow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

/* ============================================
   STATE MESSAGES
   ============================================ */

/* Loading state */
.baserow-loading {
    text-align: center;
    color: var(--accent-color);
    padding: var(--spacing-lg);
    font-size: 1.1rem;
    font-weight: 500;
}

.baserow-loading::before {
    content: "⏳ ";
    margin-right: 0.5rem;
}

/* Empty state */
.baserow-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: var(--spacing-xl);
    font-style: italic;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.baserow-empty::before {
    content: "📭 ";
    margin-right: 0.5rem;
}

/* Error state */
.baserow-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    color: #ef4444;
    margin: var(--spacing-md) 0;
    text-align: center;
    font-weight: 500;
}

.baserow-error::before {
    content: "⚠️ ";
    margin-right: 0.5rem;
}

/* ============================================
   SECTION SPACING
   ============================================ */

.baserow-section {
    padding: var(--spacing-xl) 0;
}

/* Add subtle separation between sections */
.baserow-section + .baserow-section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   CARD SUBJECT LINE
   ============================================ */

.baserow-card-subject {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    font-style: italic;
}

/* Subject line color variants */
.subject-green {
    color: #22c55e;
}

.subject-orange {
    color: #f59e0b;
}

.subject-pink {
    color: #ec4899;
}

.subject-purple {
    color: #a855f7;
}

/* ============================================
   CARD STYLES (Reusing existing from style.css)
   ============================================ */

/*
   Cards use existing .baserow-card styles from style.css:
   - .baserow-card
   - .baserow-card-image
   - .baserow-card-content
   - .baserow-card-title
   - .baserow-card-description

   No changes needed - perfect consistency!
*/

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .baserow-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .subsection-title {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem 0;
    }

    .baserow-section {
        padding: var(--spacing-lg) 0;
    }
}

@media (max-width: 480px) {
    .subsection-title {
        font-size: 1.15rem;
    }

    .baserow-loading,
    .baserow-empty,
    .baserow-error {
        padding: var(--spacing-md);
        font-size: 0.95rem;
    }
}

/* ============================================
   GLOBAL HEADLINE FONT
   ============================================ */

h1, h2, h3, h4, h5, h6,
.section-title,
.hero-title,
.subsection-title {
    font-family: 'DM Serif Display', serif;
}

/* ============================================
   LOGO STYLING
   ============================================ */

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Mobile adjustment for logo */
@media (max-width: 768px) {
    .logo-image {
        height: 45px;
    }
}

/* ============================================
   CAFE LIGHT SECTION (Restaurant der Freude)
   ============================================ */

.cafe-light {
    background:
        linear-gradient(135deg, rgba(250, 248, 243, 0.85) 0%, rgba(245, 239, 228, 0.85) 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(180, 160, 130, 0.35) 2px,
            rgba(180, 160, 130, 0.35) 3px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(180, 160, 130, 0.35) 2px,
            rgba(180, 160, 130, 0.35) 3px
        ),
        #faf8f3;
    border-bottom: 2px solid #e8dcc8;
    position: relative;
    background-size: 100% 100%, 20px 20px, 20px 20px, 100% 100%;
}

.cafe-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(210, 180, 140, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(245, 222, 179, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.cafe-light .section-title {
    color: #2c1810;
    position: relative;
}

.cafe-light .section-subtitle {
    color: #5a4a3a;
    position: relative;
}

.cafe-light .subsection-title {
    color: #3a2817;
    position: relative;
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(180, 160, 130, 0.3);
}

.cafe-light .subsection-title:first-of-type {
    margin-top: 2rem;
}

/* Light cards for cafe section */
.cafe-light .baserow-card {
    background-color: #ffffff;
    border: 1px solid #e8dcc8;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
}

.cafe-light .baserow-card:hover {
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.cafe-light .baserow-card-title {
    color: #2c1810;
}

.cafe-light .baserow-card-description {
    color: #5a4a3a;
}

.cafe-light .baserow-loading {
    color: #d4a574;
}

.cafe-light .baserow-empty {
    background-color: rgba(212, 165, 116, 0.1);
    border-color: #d4a574;
    color: #7a5a3a;
}

/* ============================================
   NIGHT DRINKS SECTION (Night Look)
   ============================================ */

.night-drinks {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(214, 93, 177, 0.3) 0%, transparent 70%),
        radial-gradient(circle at 20% 80%, rgba(214, 93, 177, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(214, 93, 177, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a0a 0%, #1a0a15 100%);
    position: relative;
    overflow: hidden;
}

/* Vignette effect */
.night-drinks::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle glow accent */
.night-drinks::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(214, 93, 177, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: nightGlow 15s ease-in-out infinite;
    z-index: 0;
}

@keyframes nightGlow {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 1;
    }
    50% {
        transform: translate(10%, 10%);
        opacity: 0.7;
    }
}

.night-drinks .section-title {
    color: #D65DB1;
    text-shadow: 0 0 20px rgba(214, 93, 177, 0.3);
    position: relative;
    z-index: 1;
}

.night-drinks .section-subtitle {
    position: relative;
    z-index: 1;
}

/* Night cards styling */
.night-drinks .baserow-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(214, 93, 177, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.night-drinks .baserow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(214, 93, 177, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    pointer-events: none;
}

.night-drinks .baserow-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(214, 93, 177, 0.5);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(214, 93, 177, 0.2);
}

.night-drinks .baserow-card:hover::before {
    opacity: 1;
}

.night-drinks .baserow-card-title {
    color: #D65DB1;
    transition: color 0.3s ease;
}

.night-drinks .baserow-card:hover .baserow-card-title {
    text-shadow: 0 0 10px rgba(214, 93, 177, 0.5);
}

.night-drinks .baserow-card-description {
    color: rgba(255, 255, 255, 0.7);
}

.night-drinks .baserow-loading {
    color: #D65DB1;
}

.night-drinks .baserow-empty {
    background-color: rgba(214, 93, 177, 0.1);
    border-color: #D65DB1;
    color: #D65DB1;
}

/* ============================================
   EVENTS SECTION (Night Look - Purple/Blue)
   ============================================ */

.events {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(138, 85, 247, 0.25) 0%, transparent 70%),
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.18) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a0a 0%, #0f0a1a 100%);
    position: relative;
    overflow: hidden;
}

/* Vignette effect */
.events::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle glow accent */
.events::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(138, 85, 247, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: nightGlow 18s ease-in-out infinite;
    z-index: 0;
}

.events .section-title {
    color: #a855f7;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    position: relative;
    z-index: 1;
}

.events .section-subtitle {
    position: relative;
    z-index: 1;
}

/* Events cards styling */
.events .baserow-card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(138, 85, 247, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.events .baserow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(138, 85, 247, 0.06) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    pointer-events: none;
}

.events .baserow-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(138, 85, 247, 0.6);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(138, 85, 247, 0.25);
}

.events .baserow-card:hover::before {
    opacity: 1;
}

.events .baserow-card-title {
    color: #a855f7;
    transition: color 0.3s ease;
}

.events .baserow-card:hover .baserow-card-title {
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.events .baserow-card-description {
    color: rgba(255, 255, 255, 0.7);
}

.events .baserow-loading {
    color: #a855f7;
}

.events .baserow-empty {
    background-color: rgba(138, 85, 247, 0.1);
    border-color: #a855f7;
    color: #a855f7;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.baserow-card:focus-within {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Ensure proper contrast for status messages */
@media (prefers-color-scheme: light) {
    .baserow-loading,
    .baserow-empty {
        color: var(--text-primary);
    }
}
