/* =====================================================
   Gabriele Granatello - Website Styles
   Versione 2.0 - Ottimizzato e Affidabile
   ===================================================== */

/* ===== Reset e Variabili CSS ===== */
:root {
    --primary-color: #1e3a8a;
    --primary-dark: #1e293b;
    --secondary-color: #d97706;
    --accent-color: #0ea5e9;
    --accent-hover: #0284c7;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    --sidebar-width: 320px;
    --sidebar-collapsed: 60px;
    --header-height: 70px;
    --footer-height: 100px;
    --transition-speed: 0.3s;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== Header Styles ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 50px;
}

.logo {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: brightness(1.2) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform var(--transition-speed);
}

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

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

.main-nav {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all var(--transition-speed);
    border-radius: 3px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all var(--transition-speed);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all var(--transition-speed);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Main Content Layout ===== */
.main-content {
    margin-top: var(--header-height);
    margin-bottom: var(--footer-height);
    display: flex;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
}

/* ===== Main Video Player (SINISTRA) ===== */
.video-player-section {
    flex: 1;
    margin-right: var(--sidebar-width);
    background: #000;
    position: relative;
    transition: margin-right var(--transition-speed);
}

.video-player-section.sidebar-collapsed {
    margin-right: var(--sidebar-collapsed);
}

.video-container {
    width: 100%;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    position: relative;
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.video-controls-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.fullscreen-btn {
    width: 50px;
    height: 50px;
    background: rgba(30, 58, 138, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.fullscreen-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

.fullscreen-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.video-info-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.video-container:hover .video-info-overlay {
    opacity: 1;
}

.video-info-overlay h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* ===== Sidebar Video Gallery (DESTRA) ===== */
.video-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
    position: fixed;
    right: 0;
    top: var(--header-height);
    bottom: var(--footer-height);
    z-index: 100;
    animation: slideLeft 0.5s ease-out;
    transition: width var(--transition-speed), transform var(--transition-speed);
}

@keyframes slideLeft {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.video-sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.video-sidebar::-webkit-scrollbar {
    width: 8px;
}

.video-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.video-sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header h2 {
    color: white;
    font-size: 1.2rem;
    white-space: nowrap;
}

.sidebar-collapse {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.sidebar-collapse:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-collapse svg {
    width: 24px;
    height: 24px;
    transition: transform var(--transition-speed);
}

.video-sidebar.collapsed .sidebar-collapse svg {
    transform: rotate(180deg);
}

.video-sidebar.collapsed .sidebar-header h2 {
    display: none;
}

.video-list {
    padding: 1rem 0.5rem;
}

.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: white;
}

.spinner-small {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.video-item {
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.5s ease-out;
    position: relative;
}

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

.video-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.video-item.active {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.6);
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all var(--transition-speed);
}

.video-item:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(14, 165, 233, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
    pointer-events: none;
}

.video-item:hover .video-play-overlay {
    opacity: 1;
}

.video-play-overlay svg {
    width: 24px;
    height: 24px;
    color: white;
    margin-left: 3px;
}

.video-caption {
    padding: 0.75rem;
    color: white;
    font-size: 0.85rem;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.85);
    display: block;
    min-height: 60px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.video-number {
    font-weight: 700;
    color: var(--accent-color);
    margin-right: 0.5rem;
    display: inline-block;
    font-size: 0.95rem;
}

.video-sidebar.collapsed .video-caption {
    display: none;
}

/* ===== Contact Section ===== */
.contact-section {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 3rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    overflow-y: auto;
    animation: fadeIn 0.5s ease-out;
    transition: margin-right var(--transition-speed);
}

.contact-section.sidebar-collapsed {
    margin-right: var(--sidebar-collapsed);
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--box-shadow-lg);
}

.contact-container h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.contact-intro {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.form-group input,
.form-group textarea {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all var(--transition-speed);
    font-family: inherit;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

.char-counter {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    cursor: pointer;
}

.checkbox-group a {
    color: var(--accent-color);
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn .btn-icon {
    width: 20px;
    height: 20px;
}

.submit-btn .btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner-btn {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid var(--success-color);
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid var(--error-color);
    display: block;
}

/* ===== Links Section ===== */
.links-section {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 3rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    overflow-y: auto;
    animation: fadeIn 0.5s ease-out;
    transition: margin-right var(--transition-speed);
    color: white;
}

.links-section.sidebar-collapsed {
    margin-right: var(--sidebar-collapsed);
}

.links-container {
    max-width: 1400px;
    margin: 0 auto;
}

.links-container h1 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.links-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

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

.link-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
    animation: fadeIn 0.5s ease-out;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}

.link-description {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.link-title {
    color: var(--accent-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.link-desc-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
}

.link-url {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.link-url a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
    white-space: nowrap;
}

.link-url a:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.link-url svg {
    width: 16px;
    height: 16px;
}

.form-notice {
    background: rgba(14, 165, 233, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* ===== News Section ===== */ */
.news-section {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 3rem;
    background: #f3f4f6;
    overflow-y: auto;
    animation: fadeIn 0.5s ease-out;
    transition: margin-right var(--transition-speed);
}

.news-section.sidebar-collapsed {
    margin-right: var(--sidebar-collapsed);
}

.news-container {
    max-width: 1600px;
    margin: 0 auto;
    text-align: center;
}

.news-container h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.news-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.news-filter {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.news-filter input {
    flex: 1;
    max-width: 500px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.news-filter input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.refresh-news {
    padding: 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-news:hover {
    background: var(--accent-hover);
    transform: rotate(90deg);
}

.refresh-news svg {
    width: 24px;
    height: 24px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-content: center;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.news-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
    animation: fadeIn 0.5s ease-out;
}

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

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 1.5rem;
}

.news-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    line-height: 1.4;
}

.news-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-card a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap var(--transition-speed);
}

.news-card a:hover {
    text-decoration: underline;
    gap: 0.75rem;
}

.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* ===== Footer ===== */
.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 1rem 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scrolling-text-container {
    overflow: hidden;
    position: relative;
}

.scrolling-text {
    color: white;
    font-size: 1.1rem;
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
    display: inline-block;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.scrolling-text.paused {
    animation-play-state: paused;
}

.footer-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-controls label {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.footer-controls input[type="range"] {
    width: 150px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.footer-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
}

.footer-controls input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.speed-value {
    color: white;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.control-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.control-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.footer-info {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.footer-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer-info a:hover {
    color: white;
    text-decoration: underline;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 280px;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --sidebar-width: 100%;
    }
    
    .main-header {
        padding: 0 1rem;
    }
    
    .logo-text {
        display: block;
        font-size: 1.2rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 280px;
        max-width: 90vw;
        height: calc(100vh - var(--header-height));
        background: var(--primary-color);
        flex-direction: column;
        padding: 2rem;
        transition: right var(--transition-speed);
        box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
        gap: 1rem;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .video-sidebar {
        width: 90vw;
        max-width: 400px;
        transform: translateX(100%);
        transition: transform var(--transition-speed);
    }
    
    .video-sidebar.mobile-active {
        transform: translateX(0);
    }
    
    .video-player-section,
    .contact-section,
    .news-section,
    .links-section {
        margin-right: 0;
    }
    
    .contact-section,
    .news-section,
    .links-section {
        padding: 2rem 1rem;
    }
    
    .contact-container {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .scrolling-text {
        font-size: 0.95rem;
    }
    
    .footer-controls {
        font-size: 0.85rem;
    }
    
    .footer-controls input[type="range"] {
        width: 100px;
    }
}

@media (max-width: 768px) {
    .link-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .link-url {
        justify-content: stretch;
    }
    
    .link-url a {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .contact-container h1,
    .news-container h1 {
        font-size: 1.8rem;
    }
    
    .contact-intro,
    .news-subtitle {
        font-size: 1rem;
    }
    
    .main-footer {
        padding: 0.75rem 1rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .main-header,
    .video-sidebar,
    .main-footer,
    .video-controls-overlay {
        display: none;
    }
    
    .main-content {
        margin: 0;
    }
    
    .video-player-section,
    .contact-section,
    .news-section {
        margin: 0;
    }
}

/* Enhanced Video Captions */
.video-caption .caption-content {
    display: block;
    width: 100%;
}

.video-caption .video-description {
    display: inline;
    word-break: break-word;
    hyphens: auto;
}

.video-item .video-caption {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* Ensure captions are always visible */
.video-sidebar .video-caption {
    display: block !important;
}

.video-sidebar.collapsed .video-caption {
    display: none !important;
}

/* Mobile caption adjustments */
@media (max-width: 768px) {
    .video-caption {
        font-size: 0.8rem;
        padding: 0.6rem;
        min-height: 50px;
    }
    
    .video-number {
        font-size: 0.85rem;
    }
}

/* ===== Iframe Sections ===== */
.iframe-section {
    flex: 1;
    margin-right: var(--sidebar-width);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
    transition: margin-right var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.iframe-section.sidebar-collapsed {
    margin-right: var(--sidebar-collapsed);
}

.content-iframe {
    width: 100%;
    height: 100%;
    flex: 1;
    border: none;
    background: white;
}

/* Mobile iframe adjustments */
@media (max-width: 768px) {
    .iframe-section {
        margin-right: 0;
    }
}
