:root {
    --primary-color: #0f172a;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --text-color: #334155;
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --font-family: 'Inter', sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.05;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-page);
    line-height: 1.5;
    padding: 20px;
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto auto auto auto;
    }
}

.bento-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Grid Areas */
.area-nav {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    /* Increased padding */
    gap: 40px;
    /* Add explicit gap */
    background-image: url('images/header_bg_abstract.png');
    background-size: cover;
    background-position: center;
    /* background: rgba(255, 255, 255, 0.9); Replaced with image */
    backdrop-filter: blur(10px);
}

@media (max-width: 480px) {
    .area-nav {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }
}

.area-hero {
    grid-column: 1 / -1;
    min-height: 400px;
    background-color: var(--primary-color);
    background-image: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.8)), url('images/hero-bg.png');
    background-size: cover;
    background-position: center;
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
}

@media (min-width: 1024px) {
    .area-hero {
        grid-column: span 2;
        grid-row: span 2;
        text-align: left;
        align-items: flex-start;
        justify-content: center;
    }
}

.area-date {
    background: linear-gradient(135deg, var(--accent-color), #3b82f6);
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
}

@media (min-width: 1024px) {
    .area-date {
        grid-column: span 2;
    }
}

.area-location {
    justify-content: center;
    align-items: flex-start;
}

.area-time {
    justify-content: center;
    align-items: flex-start;
}

.area-speaker,
.area-speaker-empty {
    text-align: center;
    align-items: center;
}

.area-speaker-empty {
    border: 2px dashed var(--border-color);
    background-color: transparent;
    justify-content: center;
    color: var(--text-color);
    opacity: 0.5;
}

.area-info {
    grid-column: 1 / -1;
    order: 10;
    /* Push to end on mobile */
}

@media (min-width: 1024px) {
    .area-info {
        grid-column: span 2;
        grid-row: span 2;
        order: 0;
        /* Reset order on desktop to fit in grid flow */
    }
}

.area-register {
    grid-column: 1 / -1;
    background-color: var(--white);
    border-top: 5px solid var(--accent-color);
    order: 20;
    /* Ensure it comes after Agenda on mobile */
}

@media (min-width: 1024px) {
    .area-register {
        grid-column: 2 / span 2;
        /* Centered in 4-col grid */
        order: 100;
        /* After speakers/agenda */
    }
}

/* Typography & Elements */
h1,
h2,
h3,
h4 {
    color: var(--primary-color);
    margin-bottom: 0.5em;
    font-weight: 700;
}

.area-hero h1 {
    color: white;
    font-size: 2.5rem;
    line-height: 1.2;
}

@media (min-width: 1024px) {
    .area-hero h1 {
        font-size: 3rem;
    }
}

.text-accent {
    color: var(--accent-color);
}

.text-muted {
    color: #64748b;
    font-size: 0.9rem;
}

.text-white {
    color: white;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    /* Add pulse animation */
    animation: pulse-glow 3s infinite ease-in-out;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
        transform: scale(1.02);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
        transform: scale(1);
    }
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-full {
    width: 100%;
}

/* Card Specifics */
.logo-img {
    height: 40px;
    width: auto;
}

.hero-date-badge {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.hero-month {
    font-size: 1rem;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 2px;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.speaker-img-wrapper {
    height: 60px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.speaker-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.speaker-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.speaker-role {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.speaker-topic {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: auto;
    width: 100%;
}

.agenda-list {
    list-style: none;
    width: 100%;
}

.agenda-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: baseline;
}

.agenda-item:last-child {
    border-bottom: none;
}

.agenda-time {
    font-weight: 700;
    color: var(--accent-color);
    width: 60px;
    flex-shrink: 0;
}

/* Form */
.form-group {
    margin-bottom: 16px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
}

.checkbox-group {
    display: flex;
    gap: 10px;
    align-items: start;
}

.checkbox-group input {
    width: auto;
    margin-top: 4px;
}

.footer {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 0.85rem;
    order: 100;
    /* Ensure footer is always last */
}

/* Helper to limit text lines if needed */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}