/* Premium Design for CHARMS 2026 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #0f172a;
    --accent-color: #8b5cf6;
    --gradient-main: linear-gradient(135deg, #2563eb 0%, #8b5cf6 100%);

    --text-color: #334155;
    --text-light: #64748b;
    --background-color: #ffffff;
    --light-bg: #f8fafc;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --container-width: 1100px;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

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

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

main {
    flex: 1 0 auto;
    padding-top: 80px;
    /* Offset for fixed header */
}

/* --- Components --- */

.button {
    display: inline-block;
    background: var(--gradient-main);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-2px);
}

.button.button-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.button.button-outline:hover {
    background: var(--primary-color);
    color: white;
}

.bg-light {
    background-color: var(--light-bg);
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

/* --- Header --- */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    /* Force fixed */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-toggle,
.nav-toggle-label {
    display: none;
}

.nav-links a {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.nav-links .nav-cta {
    background: var(--secondary-color);
    color: white;
    /* Important logic fix */
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-links .nav-cta.active {
    color: white;
}

.nav-links .nav-cta:hover {
    background: var(--primary-color);
    color: white;
}

/* --- Hero --- */
.hero {
    padding: 4rem 0;
    /* Reduced height as requested */
    position: relative;
    overflow: hidden;
    background: url('../images/paphos-port-1.jpg') center center/cover no-repeat;
    /* Use the requested image */
    text-align: center;
    color: white;
    /* Text needs to be white on image */
}

/* Overlay for better text readability if kept, but user wants text removed mostly.
   We keep H1 but remove the Welcome text snippet as requested for the body. */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    /* Dark overlay */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    font-size: 1.2rem;
    font-weight: 600;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.meta-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* --- Content Sections --- */
section {
    padding: 5rem 0;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

p {
    margin-bottom: 1.2rem;
    max-width: 800px;
}

/* --- Index / Teaser --- */
.grid-2-col {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
}

.teaser-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid #f1f5f9;
}

.dates-teaser {
    list-style: none;
}

.dates-teaser li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.dates-teaser li:last-child {
    border-bottom: none;
}

.d-label {
    font-weight: 600;
}

.d-date {
    color: var(--primary-color);
    font-weight: 500;
}

/* --- High Visibility Links --- */
.description-text a,
.submission-text a,
.venue-text a {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.description-text a:hover,
.submission-text a:hover,
.venue-text a:hover {
    background-color: rgba(37, 99, 235, 0.1);
    /* Subtle highlight on hover */
    color: var(--primary-color);
}


/* --- Improved Topics Style (Clean Grid) --- */
/* --- Topics (Scientific List Enhanced) --- */
.topics-list-scientific {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Two equal columns */
    gap: 0 4rem;
    /* Gap between columns */
    list-style: none;
    /* Custom markers */
    padding: 0;
    margin-top: 1.5rem;
}

.topics-list-scientific li {
    position: relative;
    padding: 0.8rem 0;
    padding-left: 1.5rem;
    border-bottom: 1px dashed #cbd5e1;
    /* Professional divider */
    color: var(--secondary-color);
    font-size: 1.05rem;
    line-height: 1.4;
}

/* Custom Marker */
.topics-list-scientific li::before {
    content: '›';
    position: absolute;
    left: 0;
    top: 0.8rem;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1.4;
}

.topics-list-scientific li:hover {
    color: var(--primary-dark);
}

@media (max-width: 600px) {
    .topics-list-scientific {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        gap: 0;
    }
}


.topics-preview {
    /* For Index */
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.topic-pill {
    /* Clean pill */
    padding: 0.5rem 1rem;
    background: #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* --- Timeline (Clean Alignment) --- */
.timeline {
    position: relative;
    max-width: 700px;
    margin-top: 2rem;
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: baseline;
}

.timeline-date {
    min-width: 140px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
}

.timeline-content {
    font-weight: 500;
    color: var(--secondary-color);
}

/* --- Organizers (Tight List) --- */
.org-list-sci {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.person-sci {
    padding-right: 1.5rem;
    font-size: 0.95rem;
}

.p-name {
    font-weight: 700;
    color: var(--secondary-color);
}

.p-affil {
    display: block;
    color: var(--text-light);
}

.p-email {
    display: block;
    color: var(--text-light);
    /* Subtle text color by default */
    font-size: 0.85rem;
    margin-top: 0.1rem;
    font-weight: 500;
}

.p-email::before {
    content: '✉ ';
    /* Simple text icon, or use SVG if preferred, but this is safe */
    color: var(--primary-color);
    margin-right: 4px;
}

.p-email a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.p-email a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Hide email on home for cleaner look, keep on org page? User said "tight" */


.pc-list-sci {
    list-style: none;
    column-count: 2;
    gap: 2rem;
}

.pc-list-sci li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    break-inside: avoid;
}

/* --- Program Page --- */
.schedule-container {
    margin-top: 3rem;
}

.day-block {
    margin-bottom: 4rem;
}

.day-header {
    background: var(--secondary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.event-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.event-time {
    min-width: 120px;
    font-weight: 700;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}

.event-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.event-speaker {
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 0.2rem;
}

.paper-list {
    list-style: circle;
    margin-left: 1.5rem;
    margin-top: 0.8rem;
    color: var(--text-light);
}

.paper-title {
    font-style: italic;
    color: var(--text-color);
}

/* --- Footer (Centered) --- */
footer {
    flex-shrink: 0;
    background: var(--secondary-color);
    color: #94a3b8;
    padding: 3rem 0;
    margin-top: auto;
    font-size: 0.95rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-left p,
.footer-right p {
    margin-bottom: 0.3rem;
}

.footer-right {
    text-align: right;
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1.5rem;
    }

    .footer-right {
        text-align: center;
    }
}

/* Moved Media Query to bottom for specificity */

/* --- Consolidated Home Layout --- */
.grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* 2/3 Content, 1/3 Sidebar */
    gap: 4rem;
    align-items: start;
}

.description-text {
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.submission-text {
    margin-bottom: 3rem;
}

/* Sticky Sidebar */
.sidebar-column {
    position: relative;
}

.sticky-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-color);
    margin-bottom: 2rem;
    /* Spacing between cards if multiple */
}

/* Sidebar Submit Button */
.sidebar-cta {
    display: block;
    width: 100%;
    margin-top: 1rem;
    text-align: center;
}

/* Dates List */
.dates-list-sidebar {
    list-style: none;
}

.dates-list-sidebar li {
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.dates-list-sidebar li:last-child {
    border-bottom: none;
}

.dates-list-sidebar .d-label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.dates-list-sidebar .d-date {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Passed Date Style */
.date-passed {
    opacity: 0.5;
    text-decoration: line-through;
    filter: grayscale(100%);
}

/* Extended Date Style (Old) */
.date-old {
    text-decoration: line-through;
    color: #ef4444;
    /* Red */
    opacity: 0.7;
    font-size: 0.9em;
    font-weight: 400;
}

.more-link {
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid transparent;
}

.more-link:hover {
    border-bottom-color: var(--primary-color);
}

@media (max-width: 768px) {

    .grid-2-col,
    .grid-layout {
        grid-template-columns: 1fr !important;
        /* Force stack */
        gap: 2rem;
    }

    /* Mobile Menu: Pure CSS Dropdown */
    .nav-toggle-label {
        display: block;
        padding: 0.5rem;
        cursor: pointer;
        /* Hamburger Icon styling */
    }

    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        display: block;
        background: var(--secondary-color);
        height: 2px;
        width: 24px;
        position: relative;
        transition: all 0.2s ease-out;
    }

    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
        position: absolute;
    }

    .nav-toggle-label span::before {
        bottom: 7px;
    }

    .nav-toggle-label span::after {
        top: 7px;
    }

    /* The Menu List */
    .nav-links {
        display: none;
        /* Hidden by default */
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        text-align: center;
        background: white;
        padding: 1.5rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #f1f5f9;
        z-index: 1000;
    }

    /* Toggle Logic */
    #nav-toggle:checked~.nav-links {
        display: flex;
    }

    /* Animate Hamburger (Optional) */
    #nav-toggle:checked~.nav-toggle-label span {
        background: transparent;
    }

    #nav-toggle:checked~.nav-toggle-label span::before {
        bottom: 0;
        transform: rotate(45deg);
    }

    #nav-toggle:checked~.nav-toggle-label span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    nav {
        flex-wrap: wrap;
        /* Allow dropdown to wrap to next line */
        position: relative;
    }

    .timeline-item,
    .event-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline-date {
        text-align: left;
    }

    .pc-list-sci {
        column-count: 1;
    }

    /* Hide sidebar on mobile since we inject content inline */
    .sidebar-column {
        display: none;
    }

    /* Content Visibility Utilities */
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    /* Hero mobile tweaks */
    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-meta {
        gap: 1rem;
    }

    .sticky-sidebar {
        position: static;
    }

    .sidebar-card {
        margin-top: 2rem;
    }
}

/* Default Visibility Utilities */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}
