/* GoDipl Static Homepage Styles */

/* CSS Variables */
:root {
  --background: #f8f8f9;
  --foreground: #222831;
  --c-primary: #2e75df;
  --c-gray: #787d83;
  --pressed-btn-primary: #2a6bcb;
  --disabled-btn-primary: #cbdcf7;
  --hover-btn-text: #2e75df;
  --pressed-btn-text: #2c70d6;
  --disabled-btn-text: #a1a4a9;
  --hover-btn-subtle: #2e75df0d;
  --pressed-btn-subtle: #2e75df1a;
  --border-btn-outline: #2e75df1a;
  --hover-btn-outline: #2e75df0d;
  --pressed-btn-outline: #2e75df1a;
  --c-h3: #111720;
  --c-h4: #111720;
  --c-h5: #222831;
  --c-p: #222831;
  --c-card-label: #222831;
  --c-subscribe-field: #2e75df0d;
  --c-error-text: #c34731;
  --c-success-text: #1ca14d;
  --c-error-border: #c347311a;
  --c-error-bg: #c347310d;
  --c-focus-border: #2e75df1a;
  --c-hover-border: #96baef;
  --c-input-bg: #2e75df0d;
  --footer-foot: #222831;
  --separator: #050c1533;
  --tabs-list-bg: #2e75df0d;
  --tabs-list-text: #676c73;
  --tabs-list-text-active: #222831;
  --breadcrumb-active: #a1a4a9;
  --border-light: #2e75df0d;
}

/* Global Styles */
html, body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Open Sans', sans-serif;
}

footer {
  margin-top: auto;
}

/* Hero Slider Styles */
.hero-slider-wrapper {
  position: relative;
  min-height: 320px;
}

@media (max-width: 1079px) {
  .hero-slider-wrapper {
    min-height: 231px;
  }
}

@media (max-width: 607px) {
  .hero-slider-wrapper {
    min-height: 364px;
  }
}

.hero-swiper {
  height: 100%;
  width: 100%;
}

.hero-swiper .swiper-wrapper {
  background-color: rgba(203, 220, 247, 1);
  border-radius: 0.5rem;
}

.hero-swiper .swiper-slide {
  padding: 2.5rem 3.5rem;
}

@media (max-width: 1279px) {
  .hero-swiper .swiper-slide {
    padding: 2rem 3.5rem;
  }
}

@media (max-width: 1079px) {
  .hero-swiper .swiper-slide {
    padding: 1rem 3.125rem;
  }
}

@media (max-width: 607px) {
  .hero-swiper .swiper-slide {
    padding: 1rem;
  }

  .hero-swiper {
    padding-bottom: 1.5rem;
  }
}

.hero-swiper .swiper-pagination-horizontal {
  display: none;
}

.hero-swiper .swiper-pagination-bullet {
  width: 0.75rem;
  height: 0.75rem;
  background-color: rgba(203, 220, 247, 1);
  opacity: 1;
}

.hero-swiper .swiper-pagination-bullet-active {
  background-color: rgba(46, 117, 223, 1);
}

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
  height: 1.75rem;
  width: 1.75rem;
  border-radius: 0.5rem;
  background-color: white;
}

.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after {
  font-size: 0.563rem;
  color: rgba(34, 40, 49, 1);
}

@media (max-width: 607px) {
  .hero-swiper .swiper-pagination-horizontal {
    display: block;
    height: fit-content;
    bottom: -6px;
  }

  .hero-swiper .swiper-button-prev,
  .hero-swiper .swiper-button-next {
    display: none;
  }
}

/* Feedback Swiper Styles */
.feedback-swiper {
  margin-top: 2rem;
  padding-bottom: 36px;
}

.feedback-swiper .swiper-slide {
  height: auto;
}

.feedback-swiper .swiper-pagination-bullet {
  width: 0.6rem;
  height: 0.6rem;
  background-color: #cbdcf7;
}

.feedback-swiper .swiper-pagination-bullet-active {
  background-color: #6d9ee9;
}

.feedback-swiper .swiper-button-prev,
.feedback-swiper .swiper-button-next {
  height: 1.75rem;
  width: 1.75rem;
  border-radius: 0.5rem;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  top: 50%;
}

.feedback-swiper .swiper-button-prev::after,
.feedback-swiper .swiper-button-next::after {
  font-size: 0.563rem;
  color: rgba(34, 40, 49, 1);
}

.feedback-swiper .swiper-button-prev {
  left: -4px;
}

.feedback-swiper .swiper-button-next {
  right: -4px;
}

@media (max-width: 768px) {
  .feedback-swiper .swiper-button-prev,
  .feedback-swiper .swiper-button-next {
    display: none;
  }
}

/* Tabs Styles */
.buy-diploma-tabs {
  max-width: 1120px;
}

.buy-diploma-tabs-nav {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(130px, 1fr);
  padding: 0.25rem;
  background: var(--tabs-list-bg);
  border-radius: 0.625rem;
}

.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 8.125rem;
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  color: var(--tabs-list-text);
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tab-btn__icon {
  display: none;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.tab-btn + .tab-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 1px;
  background: rgba(5, 12, 21, 0.08);
}

.tab-btn.active {
  background-color: white;
  color: var(--tabs-list-text-active);
  box-shadow: 0 1px 2px rgba(5, 12, 21, 0.04);
}

.buy-diploma-tab-panel {
  display: grid;
  gap: 1rem;
}

.buy-diploma-card-list {
  display: grid;
  gap: 0.75rem;
}

.buy-diploma-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(5, 12, 21, 0.06);
  border-radius: 0.5rem;
  background: white;
  box-shadow: 0 12px 32px rgba(17, 23, 32, 0.04);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.buy-diploma-card__image {
  aspect-ratio: 212 / 120;
  overflow: hidden;
  background: rgba(46, 117, 223, 0.08);
}

.buy-diploma-card__image img {
  display: block;
}

.buy-diploma-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.875rem;
}

.buy-diploma-card__title {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--foreground);
}

.buy-diploma-card__link-block {
  margin-top: auto;
  text-align: right;
}

.buy-diploma-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--c-gray);
  transition: color 0.2s ease;
}

.buy-diploma-card:hover {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(17, 23, 32, 0.08);
}

.buy-diploma-card:hover .buy-diploma-card__link {
  color: var(--c-primary);
}

.buy-diploma-side-cta {
  display: flex;
}

.buy-diploma-side-cta__link {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(5, 12, 21, 0.08);
  border-radius: 0.5rem;
  background: white;
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.buy-diploma-side-cta__link svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.buy-diploma-side-cta__link:hover {
  border-color: rgba(46, 117, 223, 0.14);
  background: rgba(46, 117, 223, 0.05);
  color: var(--c-primary);
}

.featured-documents-swiper {
  width: 100%;
}

.featured-documents-swiper .swiper-slide {
  height: auto;
}

.featured-documents-swiper .swiper-pagination-bullet {
  width: 0.6rem;
  height: 0.6rem;
  background-color: #cbdcf7;
}

.featured-documents-swiper .swiper-pagination-bullet-active {
  background-color: #6d9ee9;
}

.featured-documents-list {
  align-items: start;
  background: transparent;
}

.featured-documents-slide {
  height: auto;
}

.featured-document-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0.8125rem 0.625rem 1.375rem;
  border: 0;
  border-radius: 0;
  background: white;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.featured-document-card:hover {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(17, 23, 32, 0.08);
}

.featured-document-card__media {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.featured-document-card__image {
  aspect-ratio: 160 / 96;
  overflow: hidden;
  border: 1px solid rgba(5, 12, 21, 0.08);
  background: white;
}

.featured-document-card__image > img,
.featured-document-card__image .card-swiper {
  width: 100%;
  height: 100%;
}

.featured-document-card__image .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.featured-document-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(46, 117, 223, 0.12), rgba(46, 117, 223, 0.04));
}

.featured-document-card__controls {
  display: grid;
  grid-template-columns: 16px 1fr 16px;
  align-items: center;
  min-height: 0.875rem;
  color: var(--foreground);
}

.featured-document-card__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
}

.featured-document-card__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.featured-document-card__pagination .swiper-pagination-bullet {
  width: 0.6rem;
  height: 0.6rem;
  margin: 0;
  background: #cbd4e3;
  opacity: 1;
}

.featured-document-card__pagination .swiper-pagination-bullet-active {
  background: var(--c-primary);
}

.featured-document-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.featured-document-card__title {
  margin: 0;
  min-height: 3rem;
  max-height: 3rem;
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.5rem;
  font-weight: 500;
  color: var(--foreground);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.featured-document-card__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.featured-document-card__price {
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.featured-document-card__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 2.25rem 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--c-primary);
  color: white;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  white-space: nowrap;
}

.featured-document-card__cta-icon {
  position: absolute;
  right: 0.875rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

@media (min-width: 480px) {
  .buy-diploma-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .buy-diploma-tab-panel {
    grid-template-columns: minmax(0, 1fr) 188px;
    align-items: center;
    gap: 2rem;
  }

  .buy-diploma-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    padding: 0;
  }

  .buy-diploma-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .buy-diploma-side-cta {
    align-items: center;
  }

  .buy-diploma-side-cta__link {
    width: 100%;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
  }
}

@media (max-width: 639px) {
  .buy-diploma-tabs-nav {
    display: flex;
    width: 100%;
  }

  .tab-btn {
    min-width: 0;
    flex: 1;
    padding-inline: 0.75rem;
  }
}

@media (max-width: 1023px) {
  .buy-diploma-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    padding: 0;
    border-radius: 0;
  }

  .buy-diploma-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .buy-diploma-card:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 399px) {
  .buy-diploma-tabs-nav {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .tab-btn,
  .tab-btn.active {
    width: 100%;
    min-height: 2.875rem;
    padding: 0.9375rem 1.25rem;
    border-radius: 0.625rem;
    background: #4678d7;
    color: white;
    box-shadow: none;
  }

  .tab-btn + .tab-btn::before {
    display: none;
  }

  .tab-btn__icon {
    display: block;
  }

  .buy-diploma-section .tab-content,
  .buy-diploma-section .tab-content.active {
    display: none;
  }
}

/* Card Hover Effects */
.card-hover:hover {
  position: relative;
  box-shadow: 0 0 1rem 0 rgba(5, 12, 21, 0.1);
  transition: 0.1s ease;
  z-index: 1;
}

/* Form Input Focus States */
input:focus,
textarea:focus {
  border-color: var(--c-focus-border);
}

input:hover,
textarea:hover {
  border-color: var(--c-hover-border);
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .animate-pulse,
  .mobile-accordion-content,
  #mega-menu,
  #mega-menu-overlay,
  #mobile-menu {
    animation: none;
    transition: none;
  }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--c-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-primary);
}

/* Selection Styles */
::selection {
  background-color: var(--c-primary);
  color: white;
}

/* Mobile Menu Styles */
#mobile-menu {
  animation: fadeIn 0.15s ease;
}

#mobile-nav.mobile-nav-closed {
  transform: translateX(100%);
}

#mobile-nav.mobile-nav-open {
  transform: translateX(0);
}

@media (min-width: 608px) and (max-width: 1079px) {
  #mobile-nav.mobile-nav-closed {
    transform: translateX(calc(100% + 1rem));
  }
}

/* Hide native search clear icon to avoid layout overlap */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* Mega Menu Styles */
#mega-menu {
  top: 100%;
  transform-origin: top center;
  will-change: opacity, transform;
  animation: megaMenuIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.mega-menu-content {
  min-height: 300px;
}

#mega-menu-overlay {
  animation: overlayFadeIn 0.18s ease;
}

.mega-menu-content h4 {
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.mega-menu-content ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mega-menu-content ul li a {
  display: block;
  transition: color 0.15s ease;
  font-size: 13px;
  color: var(--c-gray);
}

.mega-menu-content ul li a:hover {
  color: var(--c-primary);
}

/* Mobile Accordion Styles */
.mobile-accordion-arrow {
  transition: transform 0.2s ease;
}

.mobile-accordion-content {
  animation: slideDown 0.2s ease;
}

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

/* Header with mega menu */
#header {
  position: sticky;
  top: 0;
}

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

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

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

/* Hero sidebar active state */
.hero-sidebar-item.active,
.hero-sidebar-item:hover {
  background-color: rgba(46, 117, 223, 0.05);
}

.hero-sidebar-item.active span,
.hero-sidebar-item:hover span {
  color: var(--c-primary);
}

/* Responsive Adjustments */
@media (max-width: 607px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Modal Animation */
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-modal-in {
  animation: modalIn 0.2s ease-out;
}

/* Documents Grid */
.documents-grid .featured-document-card {
  box-shadow: 0 0 16px rgba(5, 12, 21, 0.1);
}

/* Sort Dropdown */
.sort-dropdown {
  position: relative;
}

.sort-dropdown__menu {
  position: absolute;
  top: 44px;
  right: 0;
  width: 216px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(5, 12, 21, 0.1);
  padding-bottom: 8px;
  z-index: 20;
}

/* SEO Text Block */
.seo-text {
  font-size: 0.875rem;
  line-height: 1.625;
  color: #787d83;
}

.seo-text h2,
.seo-text h3,
.seo-text h4,
.seo-text h5,
.seo-text h6,
.seo-text strong {
  font-size: 1rem;
  font-weight: 500;
  color: #111720;
  margin-bottom: 0.5rem;
}

.seo-text p {
  margin-bottom: 0.75rem;
}

.seo-text p:last-child {
  margin-bottom: 0;
}

.seo-text a {
  color: #2e75df;
  text-decoration: underline;
}

/* Print Styles */
@media print {
  header, footer {
    display: none;
  }

  body {
    background: white;
  }
}
