/* Main styles for BUROTquest website */

:root {
    --primary-red: #c41e3a;
    --primary-black: #222;
    --accent-gold: #d4af37;
    --light-gray: #f5f5f5;
    --white: #fff;
    --font-main: 'Montserrat', Arial, sans-serif;
    --font-accent: 'Cabin Sketch', cursive;
}

/* Global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--primary-black);
    background-color: var(--light-gray);
    background-image: url('../images/texture-bg.jpg');
    background-attachment: fixed;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    flex: 1;
}

/* Header styles */
.site-header {
    position: relative;
    width: 100%;
    height: 150px;
    background: url('../images/banner_BUROTquest.png') no-repeat left center;
    background-size: cover;
    margin-bottom: 0;
}

@media screen and (max-width: 768px) {
    .site-header {
        height: 100px;
    }

    .header-content h1 {
        display: none;  /* Nasconde il titolo su dispositivi mobili */
    }

    .main-nav {
        padding: 0 !important;
        margin-bottom: 0.5rem !important;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 0 !important;
        padding: 0.2rem 0 !important;
    }

    .nav-list a {
        display: block;
        padding: 0.15rem 0;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    #countdown {
        flex-wrap: wrap;
        gap: 10px;
    }

    .countdown-item {
        min-width: 80px;
        padding: 15px;
    }

    #countdown span {
        font-size: 1.8rem;
    }

    .countdown-label {
        font-size: 0.9rem !important;
    }

    .teaser-images {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .teaser-images img {
        width: 100%;
        height: auto;
    }
}

.header-content {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
}

.header-content h1 {
    font-family: var(--font-accent);
    font-size: 3rem;
    color: var(--primary-black);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

/* Navigation styles */
.main-nav {
    background-color: var(--primary-black);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-list a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-list a:hover {
    color: var(--accent-gold);
}

/* Main content styles */
main {
    padding: 2rem 0;
}

section {
    margin-bottom: 3rem;
}

.intro-section {
    background-color: var(--primary-black);
    color: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.intro-section h2 {
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.intro-section ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 15px;
}

.intro-section li {
    margin: 10px 0;
}



/* Video container styles */
.video-container {
    width: 70%;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
}

.video-container iframe {
        width: 100%;
        aspect-ratio: 16/9;
        border: none;
        border-radius: 15px;
    }

    .image-container {
        float: right;
        margin-left: 20px;
    }

    .image-container img {
        max-width: 100%;
        height: auto;
    }

    @media screen and (max-width: 768px) {
        .image-container {
            float: none;
            margin: 20px auto;
            text-align: center;
        }

        .image-container img {
            width: 30%; /* Adjust as needed for mobile */
        }
    }

/* Countdown page styles */
.countdown-page {
    background-image: url('../images/forest-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.countdown-page .container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin-top: 20px;
}

.countdown-section {
    text-align: center;
    padding: 40px 0;
}

.countdown-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-red);
}

#countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary-red);
    color: var(--white);
    padding: 20px;
    border-radius: 10px;
    min-width: 100px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#countdown span {
    font-size: 2.5rem;
    font-weight: bold;
}

.countdown-label {
    font-size: 1rem !important;
    margin-top: 5px;
}

.countdown-info {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 20px;
    color: var(--primary-black);
}

h2 {
    font-family: var(--font-accent);
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

/* Map styles */
.map-container {
    height: 600px;
    width: 100%;
    margin: 20px auto;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.leaflet-popup-content {
    padding: 10px;
    max-width: 200px;
}

.leaflet-popup-content h3 {
    margin: 0 0 10px;
    color: #e63946;
}

.leaflet-popup-content p {
    margin: 0;
    line-height: 1.4;
}

/* Footer styles */
.site-footer {
    background-color: #111;
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a, .footer-nav a {
    color: var(--white);
    transition: color 0.3s ease;
}

.social-links a {
    font-size: 1.5rem;
}

.social-links a:hover, .footer-nav a:hover {
    color: var(--accent-gold);
}

/* Admin Panel styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.login-form {
    max-width: 400px;
    margin: 40px auto;
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.photo-info {
    padding: 15px;
}

.photo-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: var(--light-gray);
}

.approve-btn {
    background: #4CAF50;
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.reject-btn {
    background: #f44336;
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.error {
    background: #ffebee;
    color: #c62828;
}


.teaser-images img { max-width: 250px; max-height: 250px; width: auto; height: auto; margin: 0 28px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.teaser-images img:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}


.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.photo-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-5px);
}

.photo-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.photo-info {
    padding: 1rem;
}

.photo-location {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.photo-author {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.photo-date {
    color: #95a5a6;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.no-photos {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.no-photos p {
    margin-bottom: 1rem;
}

.action-link {
    display: inline-block;
    padding: 0.3rem 1rem;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.action-link:hover {
    background-color: #219a52;
}

.submit-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: #a01830;
    transform: translateY(-2px);
}

/* Participants page styles */
.participants-section {
    padding: 40px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.participants-section h2 {
    color: var(--primary-red);
    margin-bottom: 30px;
    text-align: center;
}

.participants-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.participants-table th {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 12px;
    text-align: left;
}

.participants-table tr:nth-child(even) {
    background-color: var(--light-gray);
}

.participants-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Congratulations page styles */
.congrats-section {
    margin-bottom: 40px;
}

.congrats-banner {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 40px 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.congrats-banner h2 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 15px;
    font-family: var(--font-accent);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.congrats-message {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.celebration-animation {
    margin-top: 20px;
}

.trophy-icon {
    font-size: 5rem;
    color: var(--accent-gold);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


/* Puzzle page styles */
.puzzle-section {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    text-align: left;
}

.puzzle-section h2 {
    color: var(--primary-red);
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.puzzle-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    
}

.letter-grid {
    display: noflex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.letter-box, .space-box {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 2px solid #333;
    border-radius: 4px;
    margin: 4px;
    text-align: center;
    font-size: 18px;
    text-transform: uppercase;
    vertical-align: middle;
}

.letter-box {
    background-color: white;
}

.space-box {
    background-color: #ccc;
}

.submit-puzzle {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-puzzle:hover {
    background-color: #a01a2f;
}

/* Admin and Participants styles */
.admin-header {
    display: vertical;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.back-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-black);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.back-link:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

.participants-table-container {
    margin-top: 2rem;
    overflow-x: auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.participants-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.participants-table th,
.participants-table td {
    padding: 1rem;
    border: 1px solid var(--light-gray);
    text-align: left;
}

.participants-table th {
    background-color: var(--primary-black);
    color: var(--white);
    font-weight: 600;
}

.participants-table tr:nth-child(even) {
    background-color: var(--light-gray);
}

.participants-table tr:hover {
    background-color: #f0f0f0;
}

@media screen and (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .participants-table th,
    .participants-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Stile per gli elenchi puntati e numerati */
ul, ol {
    padding-left: 30px;
    margin: 10px 0;
}

/* Stili per la sezione di registrazione */
.registration-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.2);
}

.form-actions {
    margin-top: 20px;
    text-align: center;
}

.form-note {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.point-row {
    display: flex;
    align-items: normal;
    gap: 0rem;
}

.point-number {
    min-width: 80px;
    font-weight: bold;
}

.points-grid {
    max-width: 600px;
    margin: 0 auto;
}
.letter-box {
    transition: all 0.3s ease;
}

.letter-box.correct {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.letter-box.incorrect {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}
