/*=========================================
  ГЛОБАЛЬНІ ЗМІННІ ТА СКИДАННЯ
=========================================*/
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Bona Nova', 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/*=========================================
  КОНТЕЙНЕРИ ТА СІТКИ
=========================================*/
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-base {
    padding: 6rem 5%;
}

.section-title {
    font-family: 'Bona Nova', serif;
    font-weight: 700;
    font-size: 3.2rem;
    color: #ffffff;
    text-shadow: -1px -1px 0 #02723e, 1px -1px 0 #02723e, -1px 1px 0 #6b0385, 1px 1px 0 #6b0385;
    margin-bottom: 40px;
    text-transform: uppercase;
    text-align: center;
}

/*=========================================
  ШАПКА ТА НАВІГАЦІЯ
=========================================*/
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 5%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-area img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-library-btn {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    font-size: 1.6rem;
}

.nav-library-btn:hover {
    color: var(--primary-color);
}

/*=========================================
  ВИПАДАЮЧЕ МЕНЮ
=========================================*/
.nav-login-wrapper {
    position: relative;
}

.nav-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.6rem;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.dropdown-arrow {
    font-size: 1.8rem;
    transition: transform 0.3s;
}

.nav-login.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.8rem);
    right: 0;
    width: 280px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.4rem;
    transition: var(--transition);
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: var(--bg-tertiary);
}

.user-info {
    padding: 1.2rem 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.user-email {
    font-weight: 600;
    font-size: 1.4rem;
    word-break: break-all;
}

.user-role {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* ============ ПЕРЕМИКАЧ GUTENBERG ============ */
.gutenberg-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 15px;
}

.gutenberg-toggle-item .toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #3b82f6;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/*=========================================
  ГЕРОЇЧНА СЕКЦІЯ
=========================================*/
.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 5%;
    background: linear-gradient(180deg, #97e1f3 0%, #f0f794 100%);
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.hero-section h1 {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-section h3 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-top: 3rem;
    font-weight: 400;
}

/*=========================================
  КНОПКИ
=========================================*/
.cta-button {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1.6rem;
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/*=========================================
  КАРТКИ ТА СІТКА КРОКІВ
=========================================*/
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.step-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.step-card .material-symbols-outlined {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.step-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.step-text {
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1.5;
}

.step-num {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.card--light {
    background: var(--bg-secondary);
}

.card--border {
    border: 2px solid var(--primary-light);
}

/*=========================================
  ФУТЕР
=========================================*/
.main-footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 5% 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-col h4 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col p {
    font-size: 1.4rem;
    color: #94a3b8;
    line-height: 1.5;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 1.4rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid #334155;
    font-size: 1.2rem;
    color: #64748b;
}

/*=========================================
  СПОВІЩЕННЯ
=========================================*/
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/*=========================================
  МОДАЛЬНІ ВІКНА
=========================================*/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

/*=========================================
  ПРОГРЕС-БАР
=========================================*/
.progress-bar {
    background: #e2e8f0;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    background: var(--primary-color);
    height: 100%;
    transition: width 0.3s ease;
}

/*=========================================
  АДАПТИВНІСТЬ
=========================================*/
@media (max-width: 768px) {
    html {
        font-size: 55%;
    }
    
    .main-header {
        padding: 1rem 4%;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .hero-section h3 {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 2.8rem;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .main-nav {
        gap: 1rem;
    }
    
    .nav-login {
        padding: 0.6rem 1.2rem;
        font-size: 1.2rem;
    }
    
    .user-dropdown {
        width: 260px;
        right: -20px;
    }
    
    .hero-section h1 {
        font-size: 2.8rem;
    }
}