/* ========================= style.css ========================= */

:root {
  --color-primary: #cf7d92;
  --color-primary-light: #e6c7cf;
  --color-primary-bg: #fff7f8;
  --color-text: #5b5555;
  --color-text-light: #6b6363;
  --color-muted: #a09a9a;
  --color-white: #ffffff;
  --radius-lg: 30px;
  --radius-md: 18px;
  --shadow-sm: 0 5px 20px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

::selection {
  background: #e6c7cf;
  color: #5b5555;
}

::-moz-selection {
  background: #e6c7cf;
  color: #5b5555;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #5b5555;
  line-height: 1.7;
  background: #fff7f8;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

body::before {
  width: 700px;
  height: 700px;
  background: linear-gradient(135deg, #cf7d92, #e6c7cf);
  top: -250px;
  right: -250px;
  animation: float 20s ease-in-out infinite;
}

body::after {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, #b8a9c9, #dca5b2);
  bottom: -200px;
  left: -200px;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ============================================
   HEADER & NAV
   ============================================ */

.header {
  position: static;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #f1dfe4;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  gap: 20px;
}

.nav h1,
.section-title,
.hero h2,
.text-card h3,
.video-content h3 {
  font-family: 'Cormorant Garamond', serif;
}

.nav h1 {
  color: #cf7d92;
  font-size: 40px;
}

.burger {
  display: none;
  background: #cf7d92;
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 28px;
  cursor: pointer;
}

.nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.nav nav a {
  text-decoration: none;
  color: #6b6363;
  transition: 0.3s;
}

.nav nav a:hover {
  color: #cf7d92;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  padding: 100px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 60px;
  align-items: center;
}

.hero h2 {
  font-size: 64px;
  margin: 20px 0;
  line-height: 1.1;
}

.hero h2 span {
  color: #cf7d92;
}

.hero p {
  margin-bottom: 25px;
}

.hero-image img {
  width: 300px;
  border-radius: 25px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

blockquote {
  border-left: 4px solid #dca5b2;
  padding-left: 20px;
  font-style: italic;
  margin-bottom: 25px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover,
.card:hover,
.gallery-card:hover,
.video-card:hover,
.text-card:hover {
  transform: translateY(-5px);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.primary {
  background: #cf7d92;
  color: white;
}

.secondary {
  border: 1px solid #e6c7cf;
  background: white;
  color: #6b6363;
}

/* ============================================
   CATALOG
   ============================================ */

.catalog {
  padding-bottom: 60px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 40px 20px;
  border-radius: 30px;
  text-align: center;
  text-decoration: none;
  color: #5b5555;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  transition: 0.3s;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: 100px 0;
}

.light {
  background: rgba(255,255,255,0.5);
}

.section-title {
  font-size: 52px;
  color: #cf7d92;
  margin-bottom: 40px;
}

.breadcrumbs {
  color: #a09a9a;
  margin-bottom: 15px;
}

/* ============================================
   CARDS & ACCORDION
   ============================================ */

.accordion-item,
.text-card,
.video-card,
.contest-box {
  background: white;
  border-radius: 30px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.text-card:nth-child(1) { animation-delay: 0.05s; }
.text-card:nth-child(2) { animation-delay: 0.1s; }
.text-card:nth-child(3) { animation-delay: 0.15s; }
.text-card:nth-child(4) { animation-delay: 0.2s; }

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 32px;
  font-family: 'Cormorant Garamond', serif;
  cursor: pointer;
}

/* ============================================
   GALLERY & VIDEO
   ============================================ */

.gallery,
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.gallery-card {
  background: white;
  border-radius: 30px;
  overflow: hidden;
  transition: 0.3s;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.gallery-card:nth-child(1) { animation-delay: 0.05s; }
.gallery-card:nth-child(2) { animation-delay: 0.1s; }
.gallery-card:nth-child(3) { animation-delay: 0.15s; }

.gallery-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-content,
.video-content {
  padding: 20px;
}

/* ============================================
   VIDEO (HTML5 PLAYER)
   ============================================ */

.video-card {
  background: white;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  transition: 0.3s;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 соотношение */
  background: #000;
  border-radius: 30px 30px 0 0;
  overflow: hidden;
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

.video-content {
  padding: 20px;
}

.video-content h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.video-content p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* ============================================
   AUDIO
   ============================================ */

audio {
  width: 100%;
  height: 40px;
  margin: 15px 0;
  border-radius: 50px;
  filter: sepia(0.2) saturate(1.2) hue-rotate(-10deg);
}

audio::-webkit-media-controls-panel {
  background: var(--color-primary-bg);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
  cursor: pointer;
}

/* ============================================
   FORMS
   ============================================ */

textarea,
input {
  width: 100%;
  padding: 15px;
  margin-top: 15px;
  border-radius: 18px;
  border: 1px solid #ead7dd;
}

.contest-form {
  margin-top: 30px;
}

/* ============================================
   ACCORDION (ALL TYPES)
   ============================================ */

.accordion-content,
.poem-full,
.prose-full,
.essay-full,
.story-full {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}

.accordion-content.active,
.poem-full.active,
.prose-full.active,
.essay-full.active,
.story-full.active {
  max-height: 2000px;
  opacity: 1;
  margin-top: 20px;
}

/* ============================================
   POEMS
   ============================================ */

.poem-accordion {
  position: relative;
}

.poem-preview {
  margin-bottom: 0;
}

.poem-preview p {
  margin: 0;
}

.poem-full p {
  margin: 0;
  padding-top: 0;
}

.poem-toggle {
  margin-right: 10px;
  margin-bottom: 10px;
}

/* ============================================
   PROSE
   ============================================ */

.prose-meta {
  margin-bottom: 12px;
  font-size: 13px;
  color: #888;
}

.prose-date {
  margin-right: 10px;
}

.prose-readtime {
  color: #aaa;
}

.prose-preview {
  margin-bottom: 0;
}

.prose-preview p {
  margin: 0;
}

.prose-full p {
  margin: 0;
  padding-top: 0;
}

.prose-actions {
  margin-top: 15px;
}

.prose-actions .btn {
  margin-right: 10px;
  margin-bottom: 5px;
}

/* ============================================
   ESSAYS
   ============================================ */

.essay-meta {
  margin-bottom: 12px;
  font-size: 13px;
  color: #888;
}

.essay-date {
  margin-right: 10px;
}

.essay-readtime {
  color: #aaa;
}

.essay-preview {
  margin-bottom: 0;
}

.essay-preview p {
  margin: 0;
}

.essay-full p {
  margin: 0;
  padding-top: 0;
}

.essay-toggle {
  margin-top: 15px;
  margin-right: 10px;
}

/* ============================================
   STORIES
   ============================================ */

.story-accordion small {
  display: block;
  margin-bottom: 12px;
  color: #888;
  font-size: 13px;
}

.story-preview {
  margin-bottom: 0;
}

.story-preview p {
  margin: 0;
}

.story-full p {
  margin: 0;
  padding-top: 0;
}

.story-toggle {
  margin-top: 15px;
  margin-right: 10px;
}

/* ============================================
   CERTIFICATES
   ============================================ */

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.cert-thumb {
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.cert-thumb:hover {
  transform: scale(1.02);
}

.cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================
   LIGHTBOX
   ============================================ */

.cert-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.cert-lightbox.active {
  display: flex;
}

.cert-lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  text-align: center;
}

.cert-lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#cert-lightbox-caption {
  color: #fff;
  margin-top: 15px;
  font-size: 16px;
  text-align: center;
}

.cert-lightbox-close,
.cert-lightbox-prev,
.cert-lightbox-next {
  position: absolute;
  color: #fff;
  font-size: 35px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  z-index: 10000;
}

.cert-lightbox-close:hover,
.cert-lightbox-prev:hover,
.cert-lightbox-next:hover {
  color: #ccc;
}

.cert-lightbox-close {
  top: 20px;
  right: 35px;
  font-size: 40px;
  font-weight: bold;
}

.cert-lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
}

.cert-lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: linear-gradient(135deg, #cf7d92 0%, #dca5b2 50%, #b8a9c9 100%);
    color: #fff;
    padding: 80px 0 30px;
    margin-top: 100px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23ffffff' d='M0,60 C240,10 480,0 720,30 C960,60 1200,20 1440,40 L1440,60 L0,60 Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
}

.footer-top {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.footer-brand h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    margin-bottom: 8px;
    color: #fff;
}

.footer-brand p {
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
}

.footer-nav a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-contact {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    line-height: 1.8;
}

.footer-contact span {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
}

.footer-contact a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: 0.3s;
}

.footer-contact a:hover {
    border-bottom-color: #fff;
}

.socials {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.socials a {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.socials a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.footer-bottom p {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .footer {
        padding: 60px 0 20px;
        margin-top: 60px;
    }
    
    .footer-brand h2 {
        font-size: 28px;
    }
    
    .footer-grid {
        gap: 30px;
        text-align: center;
    }
    
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-nav a:hover {
        padding-left: 0;
    }
    
    .socials {
        justify-content: center;
    }
    
    .socials a {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

*:focus-visible {
  outline: 3px solid #cf7d92;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {
  .header {
    position: static;
  }

  .burger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
  }

  .nav nav.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  .hero h2 {
    font-size: 44px;
  }

  .section-title {
    font-size: 40px;
  }

  .hero-image img {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
  }
}

/* ============================================
   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;
  }
}

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

@media print {
  .header,
  .burger,
  .catalog,
  .footer,
  .btn,
  .poem-toggle,
  .prose-toggle,
  .essay-toggle,
  .story-toggle,
  .gallery-buttons,
  .cert-lightbox {
    display: none !important;
  }

  .poem-full,
  .prose-full,
  .essay-full,
  .story-full,
  .accordion-content {
    max-height: none !important;
    opacity: 1 !important;
    margin-top: 20px !important;
    overflow: visible !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .text-card,
  .accordion-item {
    box-shadow: none !important;
    border: 1px solid #ddd;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}