/*
Theme Name: Яремчанська Філія Ліцею №1
Theme URI: https://youware.app
Description: Сучасна WordPress тема для Яремчанської філії Яремчанського ліцею №1 з можливістю повного редагування
Author: Custom Theme
Version: 1.0.0
Text Domain: yaremchanska-filia
*/

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

:root {
    --primary-color: #6366F1;
    --primary-dark: #4F46E5;
    --secondary-color: #1E293B;
    --dark-bg: #0F172A;
    --light-bg: #FFFFFF;
    --text-dark: #1E293B;
    --text-light: #64748B;
    --text-white: #FFFFFF;
    --border-color: #E2E8F0;
    --card-bg: #F8FAFC;
    --accent-purple: #8B5CF6;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Base responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Base responsive media */
iframe,
embed,
object,
video {
    max-width: 100%;
    height: auto;
}

/* Header Styles */
.site-header {
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Sticky header - applied via inline style if enabled in Customizer */
.site-header.sticky-header {
    position: sticky;
    top: 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-text {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.logo-text:hover {
    opacity: 0.8;
}

.logo-small {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.logo-small img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text small {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo-text strong {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
}

.contact-item i {
    color: var(--primary-color);
}

.header-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.header-btn:hover {
    background: var(--primary-dark);
}

/* Header Social Media */
.header-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-social .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.header-social .social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.header-social .social-link i {
    font-size: 1rem;
}

/* Navigation */
.main-navigation {
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    padding: 0 2rem;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1rem 0;
    justify-content: center;
    flex: 1;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-menu li {
    white-space: nowrap;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: var(--primary-color);
}

.nav-menu .current-menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.nav-arrow {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
    flex-shrink: 0;
}

.nav-arrow:hover {
    color: var(--primary-color);
}

/* Hero Section Full */
.hero-section-full {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-container {
    position: relative;
    z-index: 3;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.hero-main-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text-content {
    color: white;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.hero-title-large {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
}

.hero-description-large {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    color: white;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary-hero {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary-hero:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary-hero {
    background: rgba(50, 50, 50, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.btn-secondary-hero:hover {
    background: rgba(70, 70, 70, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Right Info Card */
.hero-info-card {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-card-item:last-child {
    margin-bottom: 0;
}

.info-card-icon-hero {
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-card-content-hero {
    flex: 1;
}

.info-card-title-hero {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 700;
}

.info-card-text-hero {
    font-size: 1rem;
    color: white;
    line-height: 1.6;
    font-weight: 400;
}

/* Hero Section (old, keep for compatibility) */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1e3a8a 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: white;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

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

.btn-secondary {
    background: transparent;
    color: white;
    padding: 1rem 2rem;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.btn-secondary:hover {
    background: white;
    color: var(--dark-bg);
}

.hero-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.info-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.info-card-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.info-card-text {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Content Sections */
.content-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1E3A8A;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 700px;
}

.section-light .section-description {
    color: rgba(26, 26, 46, 0.85);
    font-weight: 500;
}

.section-dark {
    background: var(--dark-bg);
    color: white;
}

.section-dark .section-title {
    color: white;
}

.section-dark .section-description {
    color: rgba(255,255,255,0.8);
}

/* Optimized: Base Grid Styles - Reusable */
.cards-grid,
.news-cards-grid,
.parents-cards-grid,
.psychology-cards-grid,
.certification-cards-grid,
.staff-cards-grid,
.schedule-cards-grid,
.gallery-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

/* Specific Grid Variations */
.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.news-cards-grid,
.parents-cards-grid,
.psychology-cards-grid,
.certification-cards-grid,
.schedule-cards-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Optimized: Base Card Styles - Reusable */
.content-card,
.news-card,
.parents-card,
.staff-card,
.schedule-card {
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.content-card:hover,
.parents-card:hover,
.staff-card:hover,
.schedule-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card-dark {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-purple);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.card-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.card-dark .card-category {
    color: rgba(255,255,255,0.7);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.card-dark .card-title {
    color: white;
}

.card-date {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.card-dark .card-date {
    color: rgba(255,255,255,0.7);
}

.card-description {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.card-dark .card-description {
    color: rgba(255,255,255,0.8);
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.card-dark .card-link {
    color: white;
}

.card-link:hover {
    gap: 1rem;
}

/* About Section Styles */
.about-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
    margin-top: 3rem;
}

.about-left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.about-cards-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    flex: 1;
}

.about-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.about-card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1E3A8A;
    font-weight: 700;
    margin-bottom: 1rem;
}

.about-card-description {
    font-size: 1rem;
    color: #4A5568;
    line-height: 1.7;
}

.about-right-column {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.about-image-with-overlay {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.about-image-with-overlay .about-main-image {
    width: 100%;
    flex: 1;
    object-fit: cover;
    display: block;
    min-height: 0;
}

.about-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 2rem;
    border-radius: 12px 12px 0 0;
    margin: 0;
    flex-shrink: 0;
}


.about-card-bottom {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    position: relative;
}


.about-card-with-bg {
    background: white;
    padding: 0;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.about-bg-image {
    width: 100%;
    height: auto;
    min-height: 250px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.about-card-content-overlay {
    background: #f5f5f5;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.about-card-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.about-card-list li {
    font-size: 1rem;
    color: #4A5568;
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.about-card-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1E3A8A;
    font-weight: bold;
    font-size: 1.2rem;
}

.about-card-list-two-column {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
}

.about-card-list-two-column li {
    font-size: 1rem;
    color: #4A5568;
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0;
}

.about-card-list-two-column li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1E3A8A;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.two-column-image {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

/* News Section Styles */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.news-header-text {
    flex: 1;
}

.news-archive-btn {
    background: rgba(60, 60, 60, 0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.3s, border-color 0.3s;
}

.news-archive-btn:hover {
    background: rgba(80, 80, 80, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Removed - now using base grid styles above */

.news-card {
    background: rgba(50, 50, 50, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.news-card-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.news-card:hover .news-thumbnail {
    transform: scale(1.05);
}

.news-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.news-category {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-date {
    color: rgba(255, 255, 255, 0.6);
}

.news-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-card-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    display: inline-block;
    transition: gap 0.3s;
    margin-top: auto;
}

.parents-guide-section {
    margin-top: 4rem;
    padding-top: 4rem;
    scroll-margin-top: 160px;
}

.parents-guide-section .container {
    max-width: 1040px;
    margin: 0 auto;
}

.parents-guide-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.parents-guide-title {
    grid-column: 2;
    margin: 0;
    font-size: 2rem;
    text-align: center;
}

.parents-guide-edit-link {
    grid-column: 3;
    justify-self: end;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.parents-guide-content {
    color: #1E293B;
    line-height: 1.8;
}

.parents-guide-news-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    justify-content: center;
    max-width: 920px;
    margin: 0 auto;
    gap: 2rem;
}

.parents-guide-news-card {
    background: #252A33;
    border: 1px solid rgba(30, 41, 59, 0.12);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    padding: 0;
}

.parents-guide-news-card,
.parents-guide-news-card * {
    text-decoration: none !important;
}

.parents-guide-news-card .news-card-image {
    height: 190px;
}

.parents-guide-news-card .news-card-content {
    min-height: 310px;
}

.parents-guide-news-card .news-card-title {
    color: #FFFFFF;
}

.parents-guide-news-card .news-card-description {
    color: rgba(255, 255, 255, 0.86);
}

.parents-guide-news-card .news-card-meta,
.parents-guide-news-card .news-date {
    color: rgba(255, 255, 255, 0.68);
}

.parents-guide-news-card .news-card-link {
    color: #FFFFFF;
}

@media (max-width: 900px) {
    .parents-guide-header {
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .parents-guide-edit-link {
        justify-self: center;
    }

    .parents-guide-news-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 480px;
    }
}

@media (max-width: 520px) {
    .parents-guide-title {
        font-size: 1.55rem;
    }

    .parents-guide-news-card .news-card-content {
        min-height: auto;
        padding: 1.4rem;
    }

    .parents-guide-news-card .news-card-image {
        height: 170px;
    }
}

.news-archive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.news-archive-header-text {
    flex: 1;
}

.news-add-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s, transform 0.3s;
}

.news-add-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* For Parents and Students Section Styles */
.parents-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.parents-header-text {
    flex: 1;
}

.section-title-dark {
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-description-dark {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
}

.parents-documents-link {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: gap 0.3s;
}

.parents-documents-link:hover {
    gap: 0.75rem;
}

/* Removed - now using base grid styles above */

.parents-card {
    background: white;
    padding: 2.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.parents-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.parents-card-icon {
    width: 64px;
    height: 64px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.parents-card-icon i {
    font-size: 2rem;
    color: var(--accent-purple);
}

.parents-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.parents-card-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.parents-card-link {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.parents-card-link:hover {
    gap: 0.75rem;
}

/* Psychological Support Service Section Styles */
.psychology-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.psychology-header-text {
    flex: 1;
}

.psychology-consultation-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: gap 0.3s;
}

.psychology-consultation-link:hover {
    gap: 0.75rem;
}

/* Removed - now using base grid styles */

.psychology-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.psychology-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.psychology-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.psychology-card-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.psychology-card-schedule {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1.6;
}

/* Certification Section Styles */
.certification-intro {
    text-align: center !important;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Schedule Section - Center alignment */
#rozklad.content-section {
    text-align: center;
}

#rozklad .schedule-intro {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

#rozklad .schedule-intro .section-title {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1rem !important;
    display: block !important;
    width: 100% !important;
}

#rozklad .schedule-intro .section-description {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 0 !important;
    max-width: 800px !important;
    display: block !important;
    width: 100% !important;
}

.schedule-intro .section-title {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.schedule-intro .section-description {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px !important;
    display: block;
}

/* Removed - now using base grid styles */

.certification-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
}

.certification-card-link:hover .certification-card {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.certification-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.certification-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.certification-period {
    font-size: 0.95rem;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.certification-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.certification-card-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* Certification Teachers Grid */
.certification-teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.certification-teacher-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .certification-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .certification-teachers-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Styles */
.dashboard-tab.active {
    border-bottom-color: var(--primary-color) !important;
    color: white !important;
    background: rgba(124, 58, 237, 0.1);
}

.dashboard-tab:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.dashboard-modal {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    animation: slideUp 0.3s;
}

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

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

.file-upload-zone:hover {
    border-color: var(--primary-color);
    background: #f0f0f0;
}

.file-upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(124, 58, 237, 0.1);
}

.dashboard-item {
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Item Actions (Edit/Delete buttons) */
.item-actions {
    opacity: 0;
    transition: opacity 0.3s;
}

.news-card:hover .item-actions,
.document-card:hover .item-actions,
.staff-card:hover .item-actions,
.content-card:hover .item-actions {
    opacity: 1;
}

.edit-item-btn-frontend:hover,
.delete-item-btn-frontend:hover {
    transform: scale(1.1);
}

.edit-item-btn-frontend:active,
.delete-item-btn-frontend:active {
    transform: scale(0.95);
}

/* Staff Section Styles */
.staff-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.staff-header-text {
    flex: 1;
}

.staff-certification-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: gap 0.3s;
}

.staff-certification-link:hover {
    gap: 0.75rem;
}

.staff-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.staff-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.staff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.staff-card-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    position: relative;
}

.staff-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    min-width: 100%;
    min-height: 100%;
}

.staff-photo-placeholder {
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.staff-photo-placeholder i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

.staff-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.staff-card-role {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    font-weight: 500;
}

.staff-card-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.staff-card-qualification {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.staff-card-qualification i {
    color: var(--accent-purple);
    font-size: 1rem;
}

/* Documents Section Styles */
.documents-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.documents-header-text {
    flex: 1;
}

.documents-schedule-link {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: gap 0.3s;
}

.documents-schedule-link:hover {
    gap: 0.75rem;
}

.documents-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.document-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.document-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.document-card-content {
    flex: 1;
}

.document-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.document-card-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.document-card-file-info {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.document-download-btn {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: background 0.3s, color 0.3s;
}

.document-download-btn:hover {
    background: var(--accent-purple);
    color: white;
}

.document-download-btn i {
    font-size: 0.9rem;
}

/* Schedule Section Styles */
.schedule-intro {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
}

/* Schedule Content Display */
.schedule-content-display {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.schedule-content-display table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.schedule-content-display table th,
.schedule-content-display table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-content-display table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: white;
}

.schedule-content-display table tr:last-child td {
    border-bottom: none;
}

.schedule-content-display table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.schedule-content-display ul,
.schedule-content-display ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.schedule-content-display li {
    margin: 0.5rem 0;
}

.schedule-content-preview {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    max-height: 200px;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

/* Removed - now using base grid styles */

.schedule-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.schedule-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.schedule-grade-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(50, 50, 50, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-card-content {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-teacher {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.schedule-teacher-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.schedule-teacher-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.schedule-card-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.schedule-download-btn {
    background: rgba(60, 60, 60, 0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
    transition: background 0.3s;
}

.schedule-download-btn:hover {
    background: rgba(80, 80, 80, 0.9);
}

.schedule-download-btn i {
    font-size: 0.9rem;
}

/* Gallery Section Styles */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.gallery-header-text {
    flex: 1;
}

.gallery-view-all-btn {
    background: white;
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    transition: background 0.3s, border-color 0.3s;
}

.gallery-view-all-btn:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--card-bg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gallery-item-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
}

.gallery-item-icon i {
    font-size: 4rem;
    color: var(--text-light);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(0);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.gallery-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.3;
}

.gallery-view-btn {
    background: white;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    transition: background 0.3s, color 0.3s;
    align-self: flex-start;
}

.gallery-view-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Contacts Section Styles */
.contacts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.2rem;
    color: white;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--accent-purple);
}

.contact-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.social-media {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.social-icon i {
    font-size: 1.1rem;
}

.contact-form-wrapper {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2.5rem;
}

.contact-form-header {
    margin-bottom: 2rem;
}

.contact-form-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.contact-form-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.contact-form-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.form-input,
.form-textarea,
.form-select {
    background: rgba(50, 50, 50, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, background 0.3s;
}

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

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select-wrapper {
    position: relative;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
    background-color: rgba(50, 50, 50, 0.6);
}

.form-select:focus {
    background-color: rgba(50, 50, 50, 0.6);
}

/* Style for select options */
.form-select option {
    background: white;
    color: var(--text-dark);
    padding: 0.5rem;
}

.form-select option:checked,
.form-select option[selected] {
    background: var(--primary-color);
    color: white;
}

.form-select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    pointer-events: none;
    font-size: 0.9rem;
    z-index: 1;
}

.form-submit-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--primary-color));
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 0.5rem;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.form-submit-btn:active {
    transform: translateY(0);
}

/* Page Template Styles */
.page-hero-section {
    background: var(--dark-bg);
    padding: 4rem 2rem;
    text-align: center;
}

.page-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.page-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.page-main-content {
    margin-bottom: 4rem;
}

.page-main-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.page-main-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
}

.page-main-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem;
}

.about-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 4rem 0;
}

.about-feature-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.about-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.about-feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.about-feature-icon i {
    font-size: 2rem;
    color: var(--accent-purple);
}

.about-feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.about-feature-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
}

.key-directions-section {
    background: var(--dark-bg);
    padding: 3rem;
    border-radius: 12px;
    margin-top: 4rem;
}

.key-directions-section .section-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.key-directions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.5rem;
}

.key-direction-item {
    display: flex;
    align-items: center;
}

/* Entry Content Styles (for single posts) */
.entry-header {
    margin-bottom: 2rem;
}

.entry-header .card-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.entry-header .card-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.entry-thumbnail {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
}

.news-featured-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.entry-content {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: white;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h2 {
    font-size: 2rem;
    font-weight: 700;
}

.entry-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.entry-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.entry-content a:hover {
    color: var(--primary-dark);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-previous,
.nav-next {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
}

.nav-previous:hover,
.nav-next:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.page-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.page-links a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.page-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments for news cards */
@media (max-width: 768px) {
    .news-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card-image {
        height: 180px;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
}

.key-direction-item i {
    color: var(--accent-purple);
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.scroll-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
}

.scroll-to-top:active {
    transform: translateY(0);
}

.scroll-to-top i {
    color: white;
}

/* Footer */
.site-footer {
    background: var(--dark-bg);
    color: white;
    padding: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* Forms */
.contact-form {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 2.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}

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

.form-label {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit {
    background: var(--accent-purple);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.form-submit:hover {
    background: var(--primary-color);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-btn {
    background: white;
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}

/* ============================================
   RESPONSIVE DESIGN - COMPREHENSIVE ADAPTATION
   ============================================ */

/* Large Tablets and Small Desktops (769px - 1024px) */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-main-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .about-two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-cards-grid-2x2 {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .parents-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .psychology-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certification-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .staff-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .schedule-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .schedule-inline-grid {
        grid-template-columns: 1fr !important;
    }
    
    .content-section {
        padding: 3rem 1.5rem;
    }
    
    .hero-container {
        padding: 4rem 1.5rem;
    }
    
    .about-features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Documents */
    .documents-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Parents Header */
    .parents-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Key Directions */
    .key-directions-section {
        padding: 2.5rem 2rem;
    }
}

/* Tablets and Small Devices (481px - 768px) */
@media (max-width: 768px) {
    /* Header */
    .header-top {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-contacts {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .header-contacts .contact-item {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    .header-contacts .contact-item span {
        display: none;
    }
    
    .logo-small {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .logo-text {
        font-size: 0.9rem;
    }
    
    /* Navigation */
    .nav-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding: 0.5rem 0;
    }
    
    .nav-menu::-webkit-scrollbar {
        height: 4px;
    }
    
    .nav-menu::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
    
    .nav-menu li {
        flex-shrink: 0;
    }
    
    .nav-menu a {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Hero Section */
    .hero-title-large {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-container {
        padding: 3rem 1.5rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .content-section {
        padding: 2.5rem 1rem;
    }
    
    /* Cards Grids */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .parents-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .psychology-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .certification-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .staff-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .schedule-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .schedule-inline-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* Cards */
    .content-card {
        padding: 1.5rem;
    }
    
    .parents-card {
        padding: 2rem;
    }
    
    .news-card {
        padding: 1.5rem;
    }
    
    .staff-card {
        padding: 1.5rem;
    }
    
    /* About Section */
    .about-two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-cards-grid-2x2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Forms */
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Modals */
    #parents-resource-modal > div,
    #parents-resource-modal-single > div,
    #schedule-modal > div,
    #gallery-modal > div,
    #news-modal > div,
    #staff-modal > div,
    #document-modal > div,
    #library-modal > div {
        max-width: 95% !important;
        margin: 1rem auto !important;
        padding: 1.5rem !important;
    }
    
    /* Tables */
    table {
        font-size: 0.9rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        border-collapse: collapse;
    }
    
    table thead {
        display: none;
    }
    
    table tbody {
        display: block;
        width: 100%;
    }
    
    table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.05);
    }
    
    table td {
        display: block;
        text-align: right;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.7);
    }
    
    table td:last-child {
        border-bottom: none;
    }
    
    /* Schedule Cards */
    .schedule-card {
        padding: 1.5rem;
    }
    
    .schedule-inline-card {
        padding: 1.5rem;
    }
    
    /* Page Hero */
    .page-hero-title {
        font-size: 2rem;
    }
    
    .page-hero-description {
        font-size: 1rem;
    }
    
    .page-content-wrapper {
        padding: 2rem 1rem;
    }
    
    /* Post Navigation */
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .nav-next {
        text-align: left;
    }
    
    /* Documents Section */
    .documents-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .documents-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .document-card {
        padding: 1.5rem;
    }
    
    /* Schedule Inline */
    .schedule-section-inline {
        margin-top: 2rem;
    }
    
    .schedule-section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .schedule-inline-card {
        padding: 1.5rem;
    }
    
    /* Parents Header */
    .parents-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Key Directions */
    .key-directions-section {
        padding: 2rem 1.5rem;
    }
    
    /* Certification Teachers */
    .certification-teachers-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Staff Certification Link */
    .staff-certification-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* Library */
    .library-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .library-card {
        padding: 1.5rem;
    }
    
    /* Gallery Album Covers */
    .gallery-item {
        min-height: 250px;
    }
    
    /* Hero Info Cards */
    .hero-cards {
        gap: 1rem;
    }
    
    .info-card {
        padding: 1.25rem;
    }
}

/* Mobile Devices (up to 480px) */
@media (max-width: 480px) {
    /* Header */
    .header-top {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .logo-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .logo-small {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .logo-text {
        font-size: 0.8rem;
    }
    
    .logo-text small {
        font-size: 0.7rem;
    }
    
    .header-contacts {
        width: 100%;
        justify-content: center;
    }
    
    .header-contacts .contact-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .header-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    
    /* Navigation */
    .nav-menu {
        padding: 0.25rem 0;
    }
    
    .nav-menu a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Hero */
    .hero-title-large {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .hero-container {
        padding: 2rem 1rem;
    }
    
    .hero-main-content {
        gap: 1.5rem;
    }
    
    .hero-cards {
        gap: 1rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 0.95rem;
    }
    
    .content-section {
        padding: 2rem 0.75rem;
    }
    
    /* Cards */
    .content-card {
        padding: 1.25rem;
    }
    
    .parents-card {
        padding: 1.5rem;
    }
    
    .news-card {
        padding: 1.25rem;
    }
    
    .staff-card {
        padding: 1.25rem;
    }
    
    .schedule-card {
        padding: 1.25rem;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary,
    .download-btn,
    .schedule-download-btn,
    .schedule-download-btn-inline {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    /* Forms */
    .contact-form {
        padding: 1.25rem;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    /* Modals */
    #parents-resource-modal > div,
    #parents-resource-modal-single > div,
    #schedule-modal > div,
    #gallery-modal > div,
    #news-modal > div,
    #staff-modal > div,
    #document-modal > div,
    #library-modal > div {
        max-width: 100% !important;
        margin: 0.5rem !important;
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }
    
    #parents-resource-modal h2,
    #parents-resource-modal-single h2,
    #schedule-modal h2,
    #gallery-modal h2,
    #news-modal h2,
    #staff-modal h2,
    #document-modal h2,
    #library-modal h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Item Actions */
    .item-actions {
        top: 0.5rem !important;
        right: 0.5rem !important;
    }
    
    .item-actions button,
    .item-actions a {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }
    
    /* Tables - Mobile Stack */
    table {
        font-size: 0.85rem;
    }
    
    table thead {
        display: none;
    }
    
    table tbody {
        display: block;
    }
    
    table tr {
        display: block;
        margin-bottom: 0.75rem;
        padding: 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.05);
    }
    
    table td {
        display: block;
        text-align: right;
        padding: 0.4rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.7);
    }
    
    table td:last-child {
        border-bottom: none;
    }
    
    table th {
        display: none;
    }
    
    /* Gallery */
    .gallery-item {
        aspect-ratio: 1;
    }
    
    /* Footer */
    .site-footer {
        padding: 1.5rem 1rem;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
    }
    
    .footer-links {
        font-size: 0.85rem;
    }
    
    /* Scroll to Top */
    .scroll-to-top {
        width: 44px;
        height: 44px;
        bottom: 1rem;
        right: 1rem;
    }
    
    /* Page Hero */
    .page-hero-title {
        font-size: 1.75rem;
    }
    
    .page-hero-description {
        font-size: 0.95rem;
    }
    
    .page-content-wrapper {
        padding: 1.5rem 0.75rem;
    }
    
    /* Schedule Intro */
    .schedule-intro {
        margin-bottom: 2rem;
    }
    
    /* Documents */
    .documents-card {
        padding: 1.25rem;
    }
    
    /* Library */
    .library-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .library-card {
        padding: 1.25rem;
    }
    
    /* Documents Section */
    .documents-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .documents-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .document-card {
        padding: 1.25rem;
    }
    
    /* Schedule Inline */
    .schedule-section-inline {
        margin-top: 2rem;
    }
    
    .schedule-section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* Parents Header */
    .parents-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Key Directions */
    .key-directions-section {
        padding: 2rem 1.5rem;
    }
    
    /* Hero Info Cards */
    .hero-cards {
        gap: 1rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .info-card-icon {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .info-card-title {
        font-size: 0.75rem;
    }
    
    .info-card-text {
        font-size: 1rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-container {
        padding: 2rem 1.5rem;
    }
    
    .hero-title-large {
        font-size: 2.25rem;
    }
    
    .content-section {
        padding: 2rem 1.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn-primary,
    .btn-secondary,
    .card-link,
    .download-btn,
    .schedule-download-btn,
    .nav-menu a,
    .header-btn,
    button,
    .item-actions button,
    .item-actions a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .content-card:hover,
    .news-card:hover,
    .parents-card:hover,
    .staff-card:hover,
    .schedule-card:hover,
    .gallery-item:hover {
        transform: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    /* Better touch scrolling */
    .nav-menu,
    table,
    .modal-content,
    .schedule-intro,
    .entry-content {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Prevent text selection on buttons */
    button,
    .btn-primary,
    .btn-secondary,
    .card-link {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Touch device class */
.touch-device * {
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1);
}

.touch-device button,
.touch-device .btn-primary,
.touch-device .btn-secondary,
.touch-device .card-link {
    -webkit-tap-highlight-color: transparent;
}

/* Additional Responsive Fixes */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    /* Fix images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix iframes and embeds */
    iframe,
    embed,
    object {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix video */
    video {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix PDF viewer */
    .pdf-viewer,
    .pdf-viewer iframe {
        width: 100%;
        min-height: 400px;
    }
    
    /* Schedule class navigation */
    .schedule-class-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .schedule-class-nav-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.85rem !important;
    }
    
    /* Entry content */
    .entry-content {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .entry-content img {
        max-width: 100%;
        height: auto;
    }
    
    /* Modal close button on mobile */
    #close-parents-resource-modal,
    #close-parents-resource-modal-single,
    #close-schedule-modal,
    #close-gallery-modal,
    #close-news-modal,
    #close-staff-modal,
    #close-document-modal,
    #close-library-modal {
        width: 32px !important;
        height: 32px !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Form buttons stack */
    .form-actions,
    button[type="submit"] + button[type="button"],
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    /* Fix containers */
    .container {
        padding: 0 1rem;
    }
    
    /* Hero badges and buttons */
    .hero-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.65rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
    }
    
    /* News archive header */
    .news-archive-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    /* Parents header */
    .parents-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Documents header */
    .documents-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Staff grid adjustments */
    .staff-card-image {
        width: 120px;
        height: 120px;
        margin: 0 auto 1rem;
    }
    
    /* Gallery masonry */
    .gallery-masonry {
        column-count: 1;
        column-gap: 1rem;
    }
    
    /* Lightbox */
    .lightbox-overlay {
        padding: 1rem;
    }
    
    .lightbox-content {
        max-width: 100%;
        max-height: 90vh;
    }
    
    /* Contact form wrapper */
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    /* Schedule modal */
    .day-schedule-container {
        overflow-x: auto;
    }
    
    /* Library PDF viewer */
    .library-pdf-viewer {
        width: 100%;
        height: 500px;
    }
    
    /* Text adjustments */
    h1, .hero-title-large {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h2, .section-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h3, .card-title {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    /* Spacing adjustments */
    .content-section {
        padding: 2rem 1rem;
    }
    
    .section-light {
        padding: 2rem 1rem;
    }
    
    /* Grid gaps */
    .cards-grid,
    .parents-cards-grid,
    .news-cards-grid,
    .staff-cards-grid,
    .schedule-cards-grid,
    .gallery-grid {
        gap: 1.5rem;
    }
}

/* Extra Small Devices (up to 360px) */
@media (max-width: 360px) {
    .header-top {
        padding: 0.5rem;
    }
    
    .logo-small {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .logo-text {
        font-size: 0.75rem;
    }
    
    .logo-text small {
        font-size: 0.65rem;
    }
    
    .header-contacts .contact-item {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }
    
    .header-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .nav-menu a {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }
    
    .hero-title-large {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .content-section {
        padding: 1.5rem 0.5rem;
    }
    
    .content-card,
    .parents-card,
    .news-card,
    .staff-card,
    .schedule-card {
        padding: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
    
    #parents-resource-modal > div,
    #parents-resource-modal-single > div,
    #schedule-modal > div,
    #gallery-modal > div,
    #news-modal > div,
    #staff-modal > div,
    #document-modal > div,
    #library-modal > div {
        padding: 1rem !important;
    }
    
    #parents-resource-modal h2,
    #parents-resource-modal-single h2,
    #schedule-modal h2,
    #gallery-modal h2,
    #news-modal h2,
    #staff-modal h2,
    #document-modal h2,
    #library-modal h2 {
        font-size: 1.25rem !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-small img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .nav-menu,
    .scroll-to-top,
    .item-actions,
    .site-footer {
        display: none !important;
    }
    
    .content-section {
        padding: 1rem;
        page-break-inside: avoid;
    }
    
    .cards-grid,
    .parents-cards-grid,
    .news-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .content-card,
    .news-card,
    .parents-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Breadcrumbs responsive */
@media (max-width: 768px) {
    .breadcrumbs {
        padding: 0.75rem 1rem;
    }
    
    .breadcrumb-item {
        font-size: 0.85rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.4rem;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        padding: 0.5rem 0.75rem;
    }
    
    .breadcrumb-item {
        font-size: 0.8rem;
    }
    
    .breadcrumb-list {
        gap: 0.25rem;
    }
}

/* WordPress Editor Styles */
.wp-block-group,
.wp-block-columns,
.wp-block-column {
    margin-bottom: 2rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Item Actions for Schedule Cards - Always visible */
.schedule-card .item-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex !important;
    gap: 0.5rem;
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
}

.schedule-card:hover .item-actions {
    opacity: 1 !important;
    visibility: visible !important;
}

.schedule-card .edit-item-btn-frontend,
.schedule-card .delete-item-btn-frontend {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.schedule-card .delete-item-btn-frontend {
    background: #dc3545;
}

.schedule-card .edit-item-btn-frontend:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.schedule-card .delete-item-btn-frontend:hover {
    transform: scale(1.1);
    background: #c82333;
}

/* Schedule Class Navigation */
.schedule-class-nav {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.schedule-class-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.schedule-class-nav-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.schedule-class-nav-btn:active {
    transform: translateY(0);
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-item-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 1s ease-in-out, transform 0.3s ease;
}

.gallery-item:hover .gallery-item-image {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    opacity: 1;
    transition: opacity 0.3s;
}

.gallery-item-overlay > div {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.75));
    padding: 1.75rem 2rem;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item-title {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.875rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.gallery-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 2rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: none;
}

.gallery-view-btn:hover {
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.gallery-view-btn:hover i {
    transform: translateX(5px);
}

.gallery-item:hover .gallery-item-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.9) 100%);
}

.gallery-item:hover .gallery-item-overlay > div {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.9));
}

.gallery-photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Gallery Photos Masonry Layout */
.gallery-photos-masonry {
    columns: 4;
    column-gap: 1.5rem;
}

@media (max-width: 1200px) {
    .gallery-photos-masonry {
        columns: 3;
    }
}

@media (max-width: 768px) {
    .gallery-photos-masonry {
        columns: 2;
        column-gap: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-photos-masonry {
        columns: 1;
    }
}

.gallery-photo-item-masonry {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gallery-photo-item-masonry:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.gallery-photo-item-masonry:hover .gallery-photo-image-wrapper img {
    transform: scale(1.1);
}

.gallery-photo-item-masonry:hover .gallery-photo-overlay {
    opacity: 1;
}

.gallery-photo-item-masonry:hover .gallery-photo-overlay > div {
    transform: translateY(0);
}

.gallery-photo-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
}

.gallery-photo-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-photo-overlay > div {
    transform: translateY(20px);
    transition: transform 0.3s;
}

.gallery-photo-caption {
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    line-height: 1.5;
    backdrop-filter: blur(4px);
}

/* Lightbox Styles */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
    backdrop-filter: blur(10px);
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
    }
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-next {
        right: 10px;
    }
}

/* Library Styles */
.library-item {
    transition: transform 0.3s, box-shadow 0.3s;
}

.library-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.library-view-btn:hover {
    background: #8b5cf6 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.library-view-all-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px);
}

.library-pdf-viewer iframe {
    border-radius: 8px;
}

@media (max-width: 768px) {
    .library-grid {
        grid-template-columns: 1fr !important;
    }
    
    .library-pdf-viewer {
        padding: 1rem !important;
    }
    
    .library-pdf-viewer > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

.download-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background 0.3s;
}

.download-btn:hover {
    background: var(--primary-dark);
}

.file-info {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============================================
   UX IMPROVEMENTS: Toast Notifications
   ============================================ */

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary-color);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toast-content i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.toast-success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.toast-success .toast-content i {
    color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.toast-error .toast-content i {
    color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.toast-warning .toast-content i {
    color: #f59e0b;
}

.toast-info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.toast-info .toast-content i {
    color: #3b82f6;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text-dark);
}

.toast-close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .toast-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast-notification.show {
        transform: translateY(0);
    }
}

/* ============================================
   UX IMPROVEMENTS: Skeleton Loaders
   ============================================ */

.skeleton-loader {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    transition: opacity 0.3s;
}

.skeleton-header {
    width: 60%;
    height: 24px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    margin-bottom: 1rem;
    animation: skeleton-shimmer 1.5s infinite;
}

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

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-line:first-child {
    width: 100%;
}

.skeleton-line:nth-child(2) {
    width: 85%;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ============================================
   UX IMPROVEMENTS: Dark Mode
   ============================================ */

.dark-mode {
    --light-bg: #1e293b;
    --dark-bg: #0f172a;
    --text-dark: #f1f5f9;
    --text-light: #cbd5e1;
    --text-white: #ffffff;
    --border-color: #334155;
    --card-bg: #334155;
    --secondary-color: #f1f5f9;
}

.dark-mode body {
    background: var(--dark-bg);
    color: var(--text-dark);
}

.dark-mode .site-header {
    background: var(--card-bg);
    border-bottom-color: var(--border-color);
}

.dark-mode .content-card,
.dark-mode .info-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

.dark-mode .toast-notification {
    background: var(--card-bg);
    color: var(--text-dark);
}

.dark-mode .skeleton-loader {
    background: var(--card-bg);
}

.dark-mode .skeleton-header,
.dark-mode .skeleton-line {
    background: linear-gradient(90deg, #475569 25%, #64748b 50%, #475569 75%);
    background-size: 200% 100%;
}

.dark-mode-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin-left: 0.5rem;
}

.dark-mode-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dark-mode-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.dark-mode-toggle i {
    font-size: 1.1rem;
}

/* ============================================
   ACCESSIBILITY: Skip Link
   ============================================ */

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 10001;
    font-weight: 600;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    clip: auto !important;
    display: block;
    height: auto;
    width: auto;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 10001;
    font-weight: 600;
}

/* ============================================
   ACCESSIBILITY: Focus Styles
   ============================================ */

*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove outline for mouse users, keep for keyboard */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

/* ============================================
   PERFORMANCE: Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   AJAX SEARCH STYLES
   ============================================ */

.header-search {
    position: relative;
}

.search-form-ajax {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.search-input {
    width: 250px;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: var(--text-dark);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    width: 300px;
}

.search-submit {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.search-submit:hover {
    color: var(--primary-color);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    border: 1px solid var(--border-color);
}

.search-results.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

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

.search-loading,
.search-no-results,
.search-error {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
}

.search-results-list {
    padding: 0.5rem;
}

.search-result-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--card-bg);
}

.search-result-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-type {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0.25rem 0;
    line-height: 1.4;
}

.search-result-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0.25rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* ============================================
   INFINITE SCROLL: Load More Button
   ============================================ */

.load-more-news-btn {
    display: block;
    margin: 3rem auto;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.load-more-news-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.load-more-news-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.load-more-news-btn .fa-spinner {
    margin-right: 0.5rem;
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}

.reading-progress-bar[aria-valuenow] {
    opacity: 1;
}

.reading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-purple));
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* ============================================
   COPY TO CLIPBOARD BUTTON
   ============================================ */

.copy-to-clipboard-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-dark);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.7;
}

.copy-to-clipboard-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.copy-to-clipboard-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.copy-to-clipboard-btn i {
    font-size: 0.875rem;
}

/* ============================================
   PRINT BUTTON
   ============================================ */

.print-button {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 998;
    transition: all 0.3s ease;
}

.print-button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.print-button i {
    font-size: 1rem;
}

@media print {
    .print-button {
        display: none;
    }
}

@media (max-width: 768px) {
    .print-button {
        bottom: 4rem;
        right: 1rem;
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .print-button span {
        display: none;
    }
}

/* ============================================
   NATIVE SHARE BUTTON
   ============================================ */

.share-native-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.share-native-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.share-native-btn:active {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE: New Features
   ============================================ */

@media (max-width: 768px) {
    .reading-progress-bar {
        height: 3px;
    }
    
    .load-more-news-btn {
        width: 100%;
        max-width: 300px;
        margin: 2rem auto;
    }
    
    .copy-to-clipboard-btn {
        width: 28px;
        height: 28px;
    }
    
    .copy-to-clipboard-btn i {
        font-size: 0.75rem;
    }
}

.search-result-more {
    display: block;
    padding: 1rem;
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid var(--border-color);
    transition: background 0.2s;
}

.search-result-more:hover {
    background: var(--card-bg);
}

@media (max-width: 768px) {
    .search-input {
        width: 200px;
    }
    
    .search-input:focus {
        width: 250px;
    }
}

/* ============================================
   SOCIAL SHARE BUTTONS
   ============================================ */

.social-share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.social-share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.social-share-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.social-share-facebook {
    background: #1877F2;
}

.social-share-twitter {
    background: #1DA1F2;
}

.social-share-telegram {
    background: #0088cc;
}

.social-share-whatsapp {
    background: #25D366;
}

.social-share-viber {
    background: #7360F2;
}

.social-share-email {
    background: var(--text-dark);
}

.dark-mode .social-share-btn {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dark-mode .search-results {
    background: var(--card-bg);
    border-color: var(--border-color);
}

.dark-mode .search-result-item:hover {
    background: var(--dark-bg);
}

.dark-mode .search-input {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-dark);
}

/* ============================================
   NEWS FILTERS STYLES
   ============================================ */

.news-filters {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.filter-select {
    padding: 0.625rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-dark);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-reset-btn {
    padding: 0.625rem 1rem;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-reset-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .news-filters {
        padding: 1rem;
    }
    
    .filter-select {
        width: 100%;
        min-width: auto;
    }
}

/* ============================================
   VISUAL EDITOR STYLES
   ============================================ */

/* Режим редагування */
.visual-edit-mode .visual-editable {
    outline: 2px dashed var(--primary-color, #6366F1);
    outline-offset: 2px;
    cursor: pointer;
    transition: outline 0.2s;
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
    touch-action: pan-y;
}

.visual-edit-mode .visual-editable:hover {
    outline-color: var(--primary-dark-color, #4F46E5);
    background: rgba(99, 102, 241, 0.05);
}

.visual-edit-mode .visual-editable-image {
    outline: 2px dashed var(--primary-color, #6366F1);
    outline-offset: 2px;
    cursor: pointer;
    transition: outline 0.2s;
}

.visual-edit-mode .visual-editable-image:hover {
    outline-color: var(--primary-dark-color, #4F46E5);
    opacity: 0.9;
}

/* Обгортки для редагування - не повинні змінювати layout */
.visual-edit-wrapper {
    position: relative;
    /* Зберігаємо оригінальний display елемента */
}

.visual-edit-wrapper > * {
    /* Елемент всередині обгортки зберігає свої стилі */
    position: static;
}

.visual-edit-image-wrapper {
    position: relative;
    /* Для зображень зберігаємо оригінальний display */
}

.visual-edit-image-wrapper > img {
    /* Зображення всередині обгортки зберігає свої стилі */
    position: static;
    display: block;
    max-width: 100%;
    height: auto;
}

/* Мобільна підтримка для візуального редактора */
@media (max-width: 768px) {
    .visual-edit-indicator,
    .visual-delete-indicator {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
        top: -12px !important;
        right: -12px !important;
        left: -12px !important;
        opacity: 1 !important;
    }
    
    #visual-editor-toggle,
    #visual-add-elements-btn {
        bottom: 1rem !important;
        right: 1rem !important;
        padding: 1.25rem 1.75rem !important;
        font-size: 1.1rem !important;
        min-height: 48px;
    }
    
    #visual-add-elements-btn {
        bottom: 5rem !important;
    }
    
    .visual-edit-mode .visual-editable,
    .visual-edit-mode .visual-editable-image {
        outline-width: 3px;
        outline-offset: 3px;
    }
    
    .visual-text-editor,
    .visual-image-settings {
        width: 90% !important;
        max-width: 90% !important;
        padding: 1.5rem !important;
    }
    
    .visual-add-elements-menu {
        width: 90% !important;
        max-width: 90% !important;
        max-height: 70vh !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .visual-edit-indicator,
    .visual-delete-indicator {
        opacity: 1 !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
    
    .visual-edit-mode .visual-editable,
    .visual-edit-mode .visual-editable-image {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
    }
}

/* Індикатори редагування */
.visual-edit-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color, #6366F1);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.visual-edit-indicator:hover {
    transform: scale(1.1);
    background: var(--primary-dark-color, #4F46E5);
}

.visual-edit-wrapper:hover .visual-edit-indicator,
.visual-edit-image-wrapper:hover .visual-edit-indicator {
    opacity: 1;
}

/* Кнопка перемикання режиму */
#visual-editor-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color, #6366F1);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.95rem;
}

#visual-editor-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Редактор тексту */
.visual-text-editor {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 100000;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.visual-text-editor textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.visual-text-editor textarea:focus {
    outline: none;
    border-color: var(--primary-color, #6366F1);
}

/* Індикатор завантаження */
#visual-editor-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    background: rgba(255,255,255,0.9);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Повідомлення */
.visual-editor-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100002;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Drag and Drop - Покращена версія */
.visual-edit-mode [data-draggable="true"],
.visual-edit-mode [data-editable="true"],
.visual-edit-mode .visual-editable {
    cursor: move;
    transition: all 0.2s;
}

.visual-edit-mode [data-draggable="true"]:hover,
.visual-edit-mode [data-editable="true"]:hover,
.visual-edit-mode .visual-editable:hover {
    box-shadow: 0 0 0 2px var(--primary-color, #6366F1);
    outline: 2px dashed var(--primary-color, #6366F1);
    outline-offset: 2px;
}

.visual-edit-mode .drag-hover {
    background: rgba(99, 102, 241, 0.1) !important;
    border: 2px dashed var(--primary-color, #6366F1) !important;
}

.visual-edit-mode .drag-over {
    border-top: 3px solid var(--primary-color, #6366F1) !important;
    margin-top: 1rem !important;
}

.visual-edit-mode.dragging-active * {
    cursor: grabbing !important;
}

.visual-edit-mode [data-draggable="true"]:active {
    opacity: 0.7;
    transform: scale(0.98);
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary-color, #6366F1);
    border: 2px solid white;
    border-radius: 50%;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.2s;
}

.resize-handle-nw {
    top: -6px;
    left: -6px;
    cursor: nwse-resize;
}

.resize-handle-ne {
    top: -6px;
    right: -6px;
    cursor: nesw-resize;
}

.resize-handle-sw {
    bottom: -6px;
    left: -6px;
    cursor: nesw-resize;
}

.resize-handle-se {
    bottom: -6px;
    right: -6px;
    cursor: nwse-resize;
}

.visual-edit-wrapper:hover .resize-handle,
.visual-edit-image-wrapper:hover .resize-handle {
    opacity: 1;
}

.resize-handle:hover {
    background: var(--primary-dark-color, #4F46E5);
    transform: scale(1.2);
}

/* Індикатор збереження */
#visual-editor-save-indicator {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #28a745;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100000;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
}

/* Кнопка додавання елементів */
#visual-add-elements-btn {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    background: var(--primary-color, #6366F1);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    z-index: 99998;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.95rem;
}

#visual-add-elements-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Меню додавання елементів */
#visual-add-elements-menu {
    position: fixed;
    bottom: 10rem;
    right: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 100000;
    min-width: 250px;
    max-height: 70vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

/* Сезонні ефекти - переконаємося, що вони працюють */
canvas[aria-hidden="true"] {
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Сезонні ефекти - canvas */
#seasonal-effects-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 1 !important;
    display: block !important;
}

/* Кнопки Undo/Redo */
#visual-undo-btn,
#visual-redo-btn {
    position: fixed;
    background: white;
    color: var(--primary-color, #6366F1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 99997;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    border: 2px solid var(--primary-color, #6366F1);
}

#visual-undo-btn {
    bottom: 10rem;
    right: 2rem;
}

#visual-redo-btn {
    bottom: 15rem;
    right: 2rem;
}

#visual-undo-btn:hover,
#visual-redo-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color, #6366F1);
    color: white;
}

#visual-undo-btn:active,
#visual-redo-btn:active {
    transform: scale(0.95);
}

/* Діалог підтвердження виходу */
.visual-exit-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 100001;
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

/* Діалог підтвердження видалення */
.visual-delete-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 100002;
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

/* Кнопка видалення */
.visual-delete-indicator {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #dc3545;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.visual-delete-indicator:hover {
    background: #c82333;
    transform: scale(1.1);
}

.visual-edit-wrapper:hover .visual-delete-indicator,
.visual-edit-image-wrapper:hover .visual-delete-indicator {
    opacity: 1;
}

/* Адаптивність для undo/redo */
@media (max-width: 768px) {
    #visual-undo-btn,
    #visual-redo-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    #visual-undo-btn {
        bottom: 8rem;
        right: 1rem;
    }
    
    #visual-redo-btn {
        bottom: 12rem;
        right: 1rem;
    }
    
    .visual-delete-indicator {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }
}

/* Адаптивність */
@media (max-width: 768px) {
    #visual-editor-toggle {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .visual-text-editor {
        width: 95%;
        padding: 1.5rem;
    }
    
    .visual-editor-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
    
    .resize-handle {
        width: 10px;
        height: 10px;
    }
}
