/*
Theme Name: Feste di Natale
Theme URI: https://example.com
Author: Cooperativa RSA
Author URI: https://example.com
Description: Tema WordPress per eventi e iniziative delle RSA. Include programma giornaliero/settimanale, prenotazioni tavoli, galleria fotografica e area Smart TV ottimizzata. Adatto a tutto l'anno.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: festedinatale
*/

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #c41e3a;
    --secondary-color: #1e3a5f;
    --accent-gold: #d4af37;
    --text-dark: #2c2c2c;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

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

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.92) 0%, rgba(30, 58, 95, 0.92) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23f0f0f0" width="1200" height="600"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-gold);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #e6c547;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

/* Featured Event Section */
.featured-event {
    padding: 4rem 0;
    background: white;
}

.featured-event-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-event-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
}

.featured-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.featured-event:hover .featured-event-image img {
    transform: scale(1.05);
}

.featured-event-text {
    padding: 1rem 0;
}

.featured-event-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.featured-event-excerpt {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.btn-featured {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-featured:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.3);
    color: white;
}

/* Quick Navigation Boxes */
.quick-nav {
    padding: 4rem 0;
    background: var(--bg-light);
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.quick-nav-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-dark);
    display: block;
}

.quick-nav-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.quick-nav-box .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.quick-nav-box h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Programma Section */
.programma-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.view-toggle button {
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.view-toggle button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Timeline View (Giornaliera) */
.timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.timeline-time {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 100px;
}

.timeline-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.timeline-content p {
    color: var(--text-light);
}

/* Weekly View (Settimanale) */
.weekly-view {
    overflow-x: auto;
}

.weekly-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 10px;
    overflow: hidden;
}

.weekly-table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
}

.weekly-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.weekly-table tr:hover {
    background: var(--bg-light);
}

.day-special {
    background: #fff3cd !important;
    font-weight: bold;
}

/* Prenotazioni */
.prenotazioni-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.booking-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Galleria */
.galleria-section {
    padding: 4rem 0;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.gallery-filters button {
    padding: 0.5rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-filters button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item.hidden {
    display: none;
}

/* Smart TV Area */
.smart-tv-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smart-tv-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.smart-tv-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: #000;
}

.smart-tv-slide.active {
    display: flex;
}

.smart-tv-slide img,
.smart-tv-slide video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.smart-tv-slide .programma-display {
    color: white;
    text-align: center;
    padding: 2rem;
    font-size: 2rem;
}

.smart-tv-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.smart-tv-controls button {
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

/* Footer */
.site-footer {
    background: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .featured-event-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .featured-event-title {
        font-size: 2rem;
    }
    
    .featured-event-excerpt {
        font-size: 1rem;
    }
    
    .quick-nav-grid {
        grid-template-columns: 1fr;
    }
    
    .weekly-controls {
        flex-direction: column;
        text-align: center;
    }
    
    .weekly-table {
        font-size: 0.9rem;
    }
    
    .weekly-table th,
    .weekly-table td {
        padding: 0.5rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

