@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&family=Merriweather:wght@300;400;700&display=swap');

/* Enable View Transitions (Chrome 111+) */
@view-transition {
    navigation: auto;
}

/* Custom Transition Animation */
::view-transition-old(root) {
    animation: fade-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

::view-transition-new(root) {
    animation: fade-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

:root {
    --puc-blue: #003366;
    /* Navy Blue */
    --puc-red: #D11919;
    /* Accent Red */
    --puc-yellow: #f4d03f;
    /* Accent Yellow/Gold */
    --light-gray: #f5f5f5;
    --dark-text: #333333;
    --white: #ffffff;
}

/* Reset & Basics */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
/* Header */
.main-header {
    background-color: var(--puc-blue);
    padding: 20px 0;
    border-bottom: 4px solid var(--puc-red);
}

.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    position: relative;
    /* For absolute positioning of toggle if needed, or flex */
    gap: 20px;
}



.puc-logo {
    height: 250px;
    width: auto;
    max-width: 100%;
}

/* Navigation */
.main-nav {
    background-color: var(--puc-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 15px 25px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid var(--puc-red);
}

/* Hero Section */
.hero-section {
    background-image: linear-gradient(rgba(0, 51, 102, 0.6), rgba(0, 51, 102, 0.6)), url('images/gran-torre-santiago-chile-pblipcvv50w28x93.jpg');
    /* Generic plasma/research image */
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-overlay {
    width: 100%;
}

.hero-content h2 {
    font-family: 'Merriweather', serif;
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 300;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--puc-red);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    /* Rounded modern style */
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--puc-red), #b01515);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--puc-blue), #002244);
    color: var(--white);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 300;
    font-style: italic;
    color: var(--puc-yellow);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Content Sections */
.content-section {
    padding: 60px 0;
    border-bottom: 1px solid #ddd;
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h3 {
    font-family: 'Merriweather', serif;
    color: var(--puc-blue);
    font-size: 2rem;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--puc-red);
    display: inline-block;
}

.content-section p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: justify;
}

/* Dates Table */
.dates-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.dates-table th,
.dates-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dates-table th {
    background-color: var(--puc-blue);
    color: var(--white);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.dates-table tr:hover {
    background-color: #f9f9f9;
}

/* Footer */
.main-footer {
    background-color: #222;
    color: #ccc;
    padding: 40px 0;
    text-align: center;
    margin-top: 40px;
}

.main-footer p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.main-footer a {
    color: var(--white);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .puc-logo {
        height: 100px;
        /* Smaller logo on mobile */
    }

    .main-nav ul {
        flex-wrap: wrap;
        /* Allow menu items to wrap */
        justify-content: center;
    }

    .main-nav a {
        padding: 10px 15px;
        font-size: 0.8rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .xxvi-logo-container {
        flex-wrap: wrap;
        /* Allow wrapping on small screens */
        gap: 10px;
        margin-bottom: 20px;
    }

    .xxvi-char {
        width: 40px;
        /* Smaller logo chars */
        height: 70px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .simulation-section h3 {
        font-size: 1.5rem;
    }

    .canvas-wrapper {
        border-width: 1px;
    }
}

/* New Section Styles */
.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

/* Organization Lists */
.hosts-list,
.organizers-list {
    list-style: none;
    margin-top: 20px;
}

.hosts-list li {
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding-left: 20px;
    border-left: 3px solid var(--puc-red);
}

.organizers-list li {
    margin-bottom: 8px;
}

/* Fee Card */
.fee-card {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--puc-yellow);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.fee-card h4 {
    font-size: 1.4rem;
    color: var(--puc-blue);
    margin-bottom: 20px;
}

.fee-card ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-top: 10px;
}

/* Santiago Info Grid */
.santiago-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

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

.info-item h5 {
    font-size: 1.2rem;
    color: var(--puc-blue);
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.info-item ul {
    list-style: none;
}

.info-item li {
    margin-bottom: 8px;
}

.metro-map {
    text-align: center;
    margin-top: 20px;
}

.responsive-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

/* ----------------------------- */
/* Interactive Simulation Zone */
/* ----------------------------- */

.simulation-section {
    background-color: #111;
    /* Dark background for neon effect */
    color: #fff;
    text-align: center;
    border-bottom: 4px solid var(--puc-blue);
}

.simulation-section h3 {
    color: var(--puc-yellow);
    /* Yellow heading */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    border-bottom-color: var(--puc-yellow);
}

.simulation-section p {
    color: #ccc;
    font-weight: 300;
}

.canvas-wrapper {
    margin: 30px auto;
    width: 100%;
    max-width: 600px;
    border: 2px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    background-color: #000;
    overflow: hidden;
}

#zpinchCanvas {
    display: block;
    width: 100%;
    /* Height is set by JS */
}

.controls {
    margin: 20px auto;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
}

.controls label {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    color: var(--white);
}

#currentValue {
    color: cyan;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.3rem;
    margin-left: 10px;
}

/* Custom Slider Styling */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

/* Slider Track */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: var(--puc-blue);
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 51, 102, 0.5);
}

/* Slider Thumb */
input[type=range]::-webkit-slider-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--puc-red);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
    /* centering */
    box-shadow: 0 0 10px var(--puc-red);
    border: 2px solid #fff;
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Organizers Grid */
.organizers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
    text-align: center;
}

.organizer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.organizer-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--puc-blue);
}

.organizer-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 5px;
}

.organizer-card p {
    font-size: 0.95rem;
    color: #555;
    font-weight: 300;
    margin-bottom: 0;
    text-align: center;
}

/* Hosts Grid */
.hosts-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.host-logo {
    max-height: 80px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.host-logo:hover {
    transform: scale(1.05);
}

/* ----------------------------- */
/* Dynamic Program Styles        */
/* ----------------------------- */

/* Controls Container */
.program-controls {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-bar input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    border-color: var(--puc-blue);
    outline: none;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

/* Day Filters */
.day-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.day-filter {
    background: white;
    border: 1px solid var(--puc-blue);
    color: var(--puc-blue);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.day-filter.active,
.day-filter:hover {
    background: var(--puc-blue);
    color: white;
}

/* Dropdowns */
.dropdown-filters {
    display: flex;
    gap: 10px;
}

.dropdown-filters select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    min-width: 150px;
}

/* Agenda Toggle */
.agenda-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: bold;
    color: var(--puc-blue);
}

.agenda-toggle input {
    width: 18px;
    height: 18px;
}

/* ----------------------------- */
/* Session Cards                 */
/* ----------------------------- */

.day-header {
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--puc-blue);
    color: var(--puc-blue);
    font-size: 1.8rem;
}

.session-card {
    background: white;
    border-left: 5px solid #ccc;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 20px;
    transition: transform 0.2s;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

/* Type Colors */
.session-card.plenary {
    border-left-color: var(--puc-red);
}

.session-card.oral {
    border-left-color: var(--puc-blue);
}

.session-card.poster {
    border-left-color: var(--puc-yellow);
}

.session-card.social {
    border-left-color: #2ecc71;
}

.session-time {
    display: flex;
    flex-direction: column;
    min-width: 80px;
    text-align: center;
    font-weight: bold;
    color: #555;
    padding-right: 20px;
    border-right: 1px solid #eee;
}

.start-time {
    font-size: 1.2rem;
    color: var(--dark-text);
}

.end-time {
    font-size: 0.9rem;
    color: #888;
}

.session-details {
    flex: 1;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.session-type {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: bold;
    color: #888;
    letter-spacing: 0.5px;
}

.agenda-star {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.agenda-star.active {
    color: var(--puc-yellow);
    /* Gold star */
}

.agenda-star:hover {
    color: var(--puc-yellow);
    opacity: 0.7;
}

.session-title {
    font-size: 1.5rem;
    margin: 5px 0;
    color: var(--puc-blue);
}

.session-speaker {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #444;
}

.session-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.session-track {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.session-location {
    font-style: italic;
}

.session-abstract {
    font-style: italic;
    /* ----------------------------- */
    /* Tourist Page Styles           */
    /* ----------------------------- */

    #tourist-grid {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 30px;
        margin-top: 30px;
    }

    .map-container {
        height: 500px;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border: 1px solid #ddd;
    }

    #map {
        width: 100%;
        height: 100%;
    }

    .tourist-sidebar {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .widget-card {
        background: var(--light-gray);
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        border-top: 4px solid var(--puc-blue);
    }

    .widget-card h4 {
        margin-bottom: 15px;
        color: var(--puc-blue);
        border-bottom: 1px solid #ddd;
        padding-bottom: 5px;
    }

    @media (max-width: 768px) {
        #tourist-grid {
            grid-template-columns: 1fr;
        }

        .map-container {
            height: 350px;
        }
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        background-position: center top;
        /* Focus on top part of image */
        height: 350px;
        /* Reduce height on mobile */
    }

    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .puc-logo {
        height: 100px;
        /* Smaller logo on mobile */
    }

    /* ... kept existing ... */
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .session-card {
        flex-direction: column;
    }

    .session-time {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 10px;
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
}

/* ----------------------------- */
/* ----------------------------- */
/* Venue Page Styles             */
/* ----------------------------- */

.venue-section {
    padding: 60px 0;
    border-bottom: 1px solid #ddd;
}

.venue-section:last-child {
    border-bottom: none;
}

.venue-section h2 {
    font-family: 'Merriweather', serif;
    color: var(--puc-blue);
    font-size: 2rem;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--puc-red);
    display: inline-block;
}

.info-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.venue-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #444;
    text-align: justify;
}

.venue-text ul {
    list-style: none;
    margin-bottom: 20px;
}

.venue-text ul li {
    margin-bottom: 10px;
    padding-left: 15px;
    border-left: 3px solid var(--puc-yellow);
    font-size: 1.05rem;
}

.venue-text strong {
    color: var(--puc-blue);
}

.venue-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    object-fit: cover;
    max-height: 400px;
}

.venue-img:hover {
    transform: scale(1.02);
}

.metro-map-container {
    margin-top: 40px;
    text-align: center;
}

.metro-map-container h4 {
    margin-bottom: 15px;
    color: var(--puc-blue);
    font-family: 'Merriweather', serif;
}

/* Responsive Venue */
@media (max-width: 768px) {
    .info-grid-2col {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .venue-section h2 {
        font-size: 1.8rem;
    }

    /* Reorder for mobile if needed, though default stacking is usually fine. 
       If we want image on top for alternating layouts, we'd need specific order classes.
       For now, simple stacking is acceptable. */
}

/* ----------------------------- */
.window-card {
    border: 2px solid var(--puc-blue);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    max-width: 400px;
    /* Centered width */
    margin: 0 auto;
    /* Center in container if needed */
}

.window-card:hover {
    transform: translateY(-5px);
}

.window-header {
    background: var(--puc-blue);
    color: white;
    padding: 12px;
    text-align: center;
    font-family: 'Merriweather', serif;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Fake window controls */
.window-controls {
    display: flex;
    gap: 6px;
    position: absolute;
    left: 15px;
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27c93f;
}

.window-body {
    padding: 25px;
}

/* Enhancing Converter Inputs */
.converter-box label {
    display: block;
    margin-bottom: 5px;
    color: var(--puc-blue);
}

.converter-box input,
.converter-box select {
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.converter-box input:focus,
.converter-box select:focus {
    border-color: var(--puc-blue);
    outline: none;
}

.conversion-result {
    background: var(--light-gray);
    border: 2px dashed var(--puc-blue);
    margin-top: 10px;
}