/**
 * ===================================================================
 * РАЗДЕЛ 1: RESET & BASE STYLES
 * ===================================================================
 */

:root {
    /* -- Цвета (без изменений) -- */
    --clr-primary-800: #102a4e;
    --clr-primary-700: #1a365d;
    --clr-primary-600: #2a4365;
    --clr-accent-600: #1565c0;
    --clr-accent-500: #1e88e5;
    --clr-neutral-900: #1a202c;
    --clr-neutral-800: #2d3748;
    --clr-neutral-700: #4a5568;
    --clr-neutral-500: #718096;
    --clr-neutral-200: #e2e8f0;
    --clr-neutral-100: #edf2f7;
    --clr-neutral-50:  #f7fafc;
    --clr-neutral-0:   #ffffff;
    --clr-error: #e53e3e;
    --clr-success: #38a169;
     --clr-accent-200: #cae5ff;

    /* -- Типографика -- */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-size-base: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);
    --line-height-base: 1.65;
    --line-height-heading: 1.2;

    /* -- Отступы -- */
    --space-xs:  clamp(0.33rem, 0.3rem + 0.17vw, 0.42rem);
    --space-sm:  clamp(0.5rem, 0.43rem + 0.33vw, 0.67rem);
    --space-md:  clamp(1rem, 0.87rem + 0.67vw, 1.33rem);
    --space-lg:  clamp(2rem, 1.73rem + 1.33vw, 2.67rem);
    --space-xl:  clamp(4rem, 3.47rem + 2.67vw, 5.33rem);


    /* -- Разметка -- */
    --container-max-width: 1280px;
    --container-padding: var(--space-md);
    --section-padding-y: var(--space-xl);

    /* -- UI Элементы -- */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-base: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* -- Анимации -- */
    --duration-fast: 200ms;
    --duration-normal: 300ms;
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-base: all var(--duration-normal) var(--ease-out);

    /* -- Слои -- */
    --z-index-content: 1;
    --z-index-header: 1000;
    --z-index-dropdown: 1010;
    --z-index-modal-backdrop: 9998;
    --z-index-modal-window: 9999;
}

/* -- Глобальный сброс -- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-width: 0;
    border-style: solid;
    border-color: var(--clr-neutral-200);
}

::selection {
    background-color: var(--clr-accent-500);
    color: var(--clr-neutral-0);
}

html {
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body::-webkit-scrollbar {
    width: 12px;
}
body::-webkit-scrollbar-track {
    background-color: var(--clr-neutral-100);
}
body::-webkit-scrollbar-thumb {
    background-color: var(--clr-neutral-500);
    border-radius: var(--radius-full);
    border: 3px solid var(--clr-neutral-100);
}
body::-webkit-scrollbar-thumb:hover {
    background-color: var(--clr-primary-600);
}

body {
    font-family: var(--font-sans);
    color: var(--clr-neutral-800);
    background-color: var(--clr-neutral-50);
    line-height: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* -- Базовые стили для элементов -- */
main, article, aside, nav, section, header, footer, figcaption, figure, hgroup {
    display: block;
}

ol, ul {
    list-style: none;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--clr-primary-700);
    font-weight: 600;
    line-height: var(--line-height-heading);
    margin-bottom: 0.75em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 1.5rem + 4vw, 4rem); }
h2 { font-size: clamp(2rem, 1.25rem + 3vw, 3.25rem); }
h3 { font-size: clamp(1.75rem, 1.1rem + 2.5vw, 2.5rem); }
h4 { font-size: clamp(1.5rem, 1rem + 2vw, 2rem); }
h5 { font-size: clamp(1.25rem, 0.9rem + 1.5vw, 1.75rem); }
h6 { font-size: clamp(1.1rem, 0.85rem + 1.25vw, 1.25rem); }

p {
    margin-bottom: var(--space-sm);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--clr-primary-600);
    text-decoration: none;
    transition: color var(--duration-fast) ease-in-out;
}

a:hover {
    color: var(--clr-accent-500);
}

/* -- Доступность (Accessibility) -- */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
    outline: 3px solid var(--clr-primary-600);
    outline-offset: 3px;
    border-radius: var(--radius-md);
}

:focus:not(:focus-visible) {
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/**
 * ===================================================================
 * РАЗДЕЛ 2: LAYOUT & SECTION STYLES
 * ===================================================================
 */

.main-content {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}

.page-section {
    max-width: 1440px; 
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section-title {
    font-family: var(--font-serif);
    color: var(--clr-primary-700);
    font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
    font-weight: 600;
    line-height: var(--line-height-heading);
    text-align: center;
    margin-bottom: var(--space-lg);
}

/**
 * ===================================================================
 * РАЗДЕЛ 3: EDUCATION SELECTOR
 * ===================================================================
 */

.education-selector {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
    perspective: 800px;
}

.selector-track {
    display: inline-flex;
    position: relative;
    padding: 8px;
    background-color: var(--clr-neutral-0);
    border-radius: var(--radius-full);
    border: 1px solid var(--clr-neutral-200);
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.06);
}

.selector-option {
    position: relative;
    z-index: 2;
    padding: clamp(0.8rem, 0.7rem + 0.5vw, 1.1rem) clamp(1.6rem, 1.4rem + 1vw, 2.4rem);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
    font-weight: 500;
    color: var(--clr-neutral-700);
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.4s var(--ease-out), transform 0.2s ease;
}

.selector-option:active {
    transform: scale(0.96);
    transition-duration: 0.1s;
}

.selector-option > span {
    display: inline-block;
    transition: transform 0.3s var(--ease-out);
}

.selector-option:not(.selector-option--active):hover {
    color: var(--clr-primary-700);
}

.selector-option:not(.selector-option--active):hover > span {
    transform: translateY(-2px) scale(1.02);
}

/* Стиль для активной опции */
.selector-option--active {
    font-weight: 600;
    color: var(--clr-neutral-0);
    cursor: default;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition-delay: 150ms;
}

.selector-indicator {
    position: absolute;
    z-index: 1;
    top: 8px;
    left: 8px;
    height: calc(100% - 16px);
    background-image: linear-gradient(135deg, var(--clr-accent-500), var(--clr-accent-600));
    border-radius: var(--radius-full);
    box-shadow: 0 10px 25px -8px rgba(30, 136, 229, 0.55);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}



/**
 * ===================================================================
 * РАЗДЕЛ 4 & 5: CONTENT BLOCK & TYPOGRAPHY (Версия "Aura")
 * ===================================================================
 */

@keyframes cascade-in {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes aura-pulse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.education-content {
    position: relative;
}

.education-pane {
    display: none;
    animation: content-prestige-intro 0.5s ease-out backwards;
}

@keyframes content-prestige-intro {
    from { opacity: 0; }
    to { opacity: 1; }
}

.education-pane--active {
    display: block;
}

.info-block {
    position: relative;
    text-align: center;
    background-color: var(--clr-neutral-0);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.info-block::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: inherit; 

    background: conic-gradient(
        from 90deg,
        var(--clr-accent-500),
        var(--clr-primary-600),
        var(--clr-accent-500)
    );

    filter: blur(20px) opacity(0.3);
    
    animation: aura-pulse 15s linear infinite;
}

.info-block > * {
    animation: cascade-in 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards;
}

.info-block .education-pane__title { animation-delay: 0.2s; }
.info-block .education-pane__description { animation-delay: 0.3s; }
.info-block .spo-additional-info,
.info-block .dmsh-subtitle,
.info-block .document-buttons-grid,
.info-block .accordion-wrapper { animation-delay: 0.4s; }


.education-pane__title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 1.5rem + 1.5vw, 2.8rem);
    color: var(--clr-primary-800);
    line-height: var(--line-height-heading);
    margin: 0;
    position: relative;
    padding-bottom: var(--space-sm);
}

.education-pane__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-image: linear-gradient(90deg, var(--clr-accent-500) 0%, var(--clr-primary-600) 100%);
    border-radius: var(--radius-full);
}

.education-pane__description {
    display: inline-block;
    font-size: clamp(0.9rem, 0.85rem + 0.25vw, 1.05rem);
    font-weight: 500;
    color: var(--clr-primary-700);
    margin-top: var(--space-md);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--clr-neutral-0);
    border-radius: var(--radius-full);
    border: 1px solid var(--clr-neutral-200);
}

.spo-subtitle,
.dmsh-subtitle {
    text-align: center;
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 1.05rem + 0.75vw, 1.6rem);
    font-weight: 500;
    color: var(--clr-primary-700);
    margin: var(--space-lg) auto;
    max-width: 800px;
}

.spo-subtitle::before, .spo-subtitle::after,
.dmsh-subtitle::before, .dmsh-subtitle::after {
    content: none;
}


.info-block p,
.info-block li,
.program-info p {
    text-align: left;
    color: var(--clr-neutral-700);
}

/**
 * ===================================================================
 * РАЗДЕЛ 6: SPECIALTIES SHOWCASE
 * ===================================================================
 */

.jewel-box-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(320px, 1fr);
    gap: var(--space-md);
    
    overflow-x: auto;
    padding: 1rem 0.5rem;
    margin: var(--space-xl) -0.5rem;

    scrollbar-width: thin;
    scrollbar-color: var(--clr-neutral-200) transparent;
}

.jewel-box-grid::-webkit-scrollbar {
    height: 8px;
}
.jewel-box-grid::-webkit-scrollbar-track {
    background: transparent;
}
.jewel-box-grid::-webkit-scrollbar-thumb {
    background-color: var(--clr-neutral-200);
    border-radius: var(--radius-full);
}
.jewel-box-grid::-webkit-scrollbar-thumb:hover {
    background-color: var(--clr-neutral-500);
}

.jewel-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.jewel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px -10px rgba(0, 0, 0, 0.1);
}

/* 
 * 3. ОСНОВНАЯ, ВИДИМАЯ ЧАСТЬ КАРТОЧКИ 
 */
.jewel-card__main {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background-color: var(--clr-neutral-0);
    border: 1px solid var(--clr-neutral-200);
    
    /* NEW: Эффект "вдавленности" с помощью внутренней тени */
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
    
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
}

.jewel-card__code {
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--clr-neutral-500);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jewel-card__title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.15rem; /* Миниатюрный, но читаемый */
    color: var(--clr-primary-700);
    line-height: 1.4;
    margin: 0;
}

.jewel-card__drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--space-sm) var(--space-lg);
    background-color: var(--clr-accent-500);
    color: var(--clr-neutral-0);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* NEW: При наведении на карточку - "ящичек" выезжает */
.jewel-card:hover .jewel-card__drawer {
    transform: translateY(0);
}

.jewel-card__qualification {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}



/**
 * ===================================================================
 * РАЗДЕЛ 7: FOOTNOTES (Версия "Signature" - Исправлено)
 * ===================================================================
 */

.specialties-footnote {
    display: flex;
    align-items: flex-start; 
    gap: var(--space-md);
    
    background-color: var(--clr-neutral-50);
    border: 1px solid var(--clr-neutral-200);
    border-radius: var(--radius-lg);
    
    padding: var(--space-md);
    margin: var(--space-xl) 0;
}

.footnote__icon-wrapper {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    
    background-image: linear-gradient(145deg, var(--clr-accent-500), var(--clr-accent-600));
    box-shadow: 0 4px 10px -2px rgba(30, 136, 229, 0.3);
    
    display: flex;
    align-items: center;
    justify-content: center;
}

.footnote__icon-wrapper .fas {
    font-size: 1.25rem;
    color: var(--clr-neutral-0);
}

.footnote__content {
    flex-grow: 1;
    padding-top: 2px;
}

.footnote__content p {
    font-size: 0.9rem;
    color: var(--clr-neutral-700);
    line-height: 1.7;
    margin: 0;
}

.footnote__content p + p {
    margin-top: var(--space-sm);
}

/**
 * ===================================================================
 * РАЗДЕЛ 8: BUTTONS (Финальная версия "Halo")
 * ===================================================================
 */

.document-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

/* 1. ОСНОВНОЙ КОНТЕЙНЕР КНОПКИ */
.btn-craft {
    display: flex;
    align-items: stretch;
    border-radius: var(--radius-full);
    
    /* UPDATED: Фон теперь всегда чистый белый */
    background-color: var(--clr-neutral-0);
    
    /* 
     * CRITICAL UPDATE: Создаем "Ореол"
     * Используем новый, светло-голубой цвет для рамки в состоянии покоя.
     */
    border: 2px solid var(--clr-accent-200); 
    
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    
    transition: transform var(--duration-normal) var(--ease-out), 
                box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
}

.btn-craft:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px -5px rgba(189, 224, 254, 0.7); /* Тень в цвет ореола */
    
    /* Ореол "усиливается" до основного акцентного цвета */
    border-color: var(--clr-accent-500);
}

/* 2. БЛОК С ИКОНКОЙ */
.btn-craft__icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: clamp(0.9rem, 0.7rem + 1vw, 1.4rem);
    
    /* UPDATED: Фон прозрачный, чтобы соответствовать основному */
    background-color: transparent; 
    
    /* UPDATED: Тонкая серая линия для элегантного разделения */
    border-right: 1px solid var(--clr-neutral-200);
    
    transition: background-color var(--duration-normal) var(--ease-out);
}

.btn-craft:hover .btn-craft__icon-wrapper {
    background-color: var(--clr-accent-500); 
    border-color: var(--clr-accent-500); /* Граница тоже окрашивается */
}

.btn-craft__icon-wrapper .fas {
    color: var(--clr-accent-500);
    font-size: 1.2rem;
    line-height: 1;
    transition: transform var(--duration-normal) var(--ease-out),
                color var(--duration-normal) var(--ease-out);
}

.btn-craft:hover .btn-craft__icon-wrapper .fas {
    color: var(--clr-neutral-0);
    transform: scale(1.15) rotate(-8deg);
}

/* 3. БЛОК С ТЕКСТОМ */
.btn-craft__text {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    width: 100%;
    
    background-color: transparent; /* Фон соответствует основному */
    
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
    font-weight: 500;
    color: var(--clr-primary-700);
    
    white-space: normal;
    text-align: left;
    
    transition: color var(--duration-fast) ease-in-out,
                font-weight var(--duration-fast) ease-in-out;
}

.btn-craft:hover .btn-craft__text {
    color: var(--clr-accent-600); /* Используем более темный синий для контраста */
    font-weight: 600;
}


/**
 * ===================================================================
 * РАЗДЕЛ 9: Карточки с ключевой информацией
 * ===================================================================
 */

@keyframes crystal-fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.crystal-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.crystal-widget {
    flex: 1 1 230px;
    max-width: 270px;
    aspect-ratio: 1 / 1;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;
    text-align: center;
    background-color: var(--clr-neutral-0);
    border: 1px solid var(--clr-neutral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    opacity: 0;
    animation: crystal-fade-in 0.5s var(--ease-out) forwards;
    transition: transform 0.3s var(--ease-out), 
                box-shadow 0.3s var(--ease-out),
                border-color 0.3s var(--ease-out);
}

/* Каскадные задержки */
.crystal-widget:nth-child(1) { animation-delay: 0.1s; }
.crystal-widget:nth-child(2) { animation-delay: 0.15s; }
.crystal-widget:nth-child(3) { animation-delay: 0.2s; }
.crystal-widget:nth-child(4) { animation-delay: 0.25s; }
.crystal-widget:nth-child(5) { animation-delay: 0.3s; }
.crystal-widget:hover {
    transform: translateY(-8px);
    border-color: var(--clr-accent-500);
    box-shadow: 0 15px 30px -10px rgba(30, 136, 229, 0.2);
}


/* 3. ЭЛЕМЕНТЫ ВНУТРИ КРИСТАЛЛА */
.crystal-widget__icon-wrapper .fas {
    font-size: 1.8rem;
    color: var(--clr-accent-500);
    transition: transform 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.crystal-widget:hover .crystal-widget__icon-wrapper .fas {
    transform: scale(1.1);
    color: var(--clr-accent-600);
}

.crystal-widget__value {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs) 0;
    
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--clr-primary-700);
    line-height: 1.4;
}

.crystal-widget__label {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--clr-neutral-500);
    line-height: 1.3;
}



/**
 * ===================================================================
 * РАЗДЕЛ 10: ACCORDIONS (Версия "Curator's Drawer")
 * ===================================================================
 */

.accordion-wrapper {
    /* Используем наши новые, компактные отступы */
    margin: var(--space-md) 0;
}

.accordion {
    background-color: var(--clr-neutral-0);
    border: 1px solid var(--clr-neutral-200);
    border-radius: var(--radius-lg);
    
    /* 
     * NEW: Используем Grid для плавной анимации.
     * 1-й ряд (auto) - для заголовка.
     * 2-й ряд (0fr) - для контента (изначально схлопнут).
     */
    display: grid;
    grid-template-rows: auto 0fr;
    
    /* Анимируем изменение высоты ряда и тени */
    transition: grid-template-rows 0.4s var(--ease-out),
                box-shadow 0.3s var(--ease-out);
}

.accordion:hover {
    box-shadow: var(--shadow-base);
}

/* NEW: Когда аккордеон открыт, его контентный ряд "расширяется" */
.accordion.is-open {
    grid-template-rows: auto 1fr;
}


/* 2. ЗАГОЛОВОК АККОРДЕОНА */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    
    width: 100%;
    /* UPDATED: Увеличиваем отступы для удобства */
    padding: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    
    font-family: var(--font-sans);
    font-size: 1.05rem; /* Чуть крупнее */
    font-weight: 600;
    color: var(--clr-primary-700);
    text-align: left;
    
    background-color: transparent;
    border: none;
    cursor: pointer;
    position: relative; /* Для псевдо-элемента рамки */
    border-radius: inherit;
}

/* NEW: Элегантная рамка при фокусе/наведении */
.accordion-header::after {
    content: '';
    position: absolute;
    top: -1px; bottom: -1px; left: -1px; right: -1px;
    border: 2px solid transparent;
    border-radius: inherit;
    transition: border-color 0.3s var(--ease-out);
}
.accordion-header:hover::after,
.accordion-header:focus-visible::after {
    border-color: var(--clr-accent-500);
}


.accordion-icon {
    color: var(--clr-accent-500);
    font-size: 1.2rem;
    flex-shrink: 0;
    /* UPDATED: Более "живая" анимация вращения */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* В открытом состоянии иконка повернута */
.accordion.is-open .accordion-header .accordion-icon {
    transform: rotate(180deg);
}


/* 3. КОНТЕНТ АККОРДЕОНА */
.accordion-content {
    /* NEW: Эта обертка нужна для плавной анимации Grid */
    overflow: hidden;
}

/* 
 * CRITICAL FIX: Внутренний блок с увеличенными отступами.
 * Именно он решает вашу проблему "прилипания" контента.
 */
.accordion-content .document-buttons-grid {
    padding: var(--space-md) var(--space-lg);
    margin: 0;
    border-top: 1px solid var(--clr-neutral-200); /* Четкий разделитель */
}

