/* =========================================
   Krajowy.edu.pl — Custom Styles
   Primary: #1B2A4A (navy)
   Primary Dark: #0F1B32
   Accent: #C9A84C (gold)
   Accent Light: #D4B56A
   ========================================= */

/* Tailwind config override via inline styles */
:root {
  --color-primary: #1B2A4A;
  --color-primary-dark: #0F1B32;
  --color-accent: #C9A84C;
  --color-accent-light: #D4B56A;
}

/* Base */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
.font-heading, h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Color utilities */
.bg-primary { background-color: #1B2A4A; }
.bg-primary-dark { background-color: #0F1B32; }
.bg-accent { background-color: #C9A84C; }
.bg-accent-light { background-color: #D4B56A; }
.text-primary { color: #1B2A4A; }
.text-primary-dark { color: #0F1B32; }
.text-accent { color: #C9A84C; }
.text-accent-light { color: #D4B56A; }
.border-accent { border-color: #C9A84C; }
.border-primary { border-color: #1B2A4A; }

/* Hover variants */
.hover\:bg-accent:hover { background-color: #C9A84C; }
.hover\:bg-accent-light:hover { background-color: #D4B56A; }
.hover\:text-accent:hover { color: #C9A84C; }
.hover\:text-primary:hover { color: #1B2A4A; }
.hover\:border-accent:hover { border-color: #C9A84C; }

/* Ring */
.focus\:ring-accent:focus { --tw-ring-color: #C9A84C; }

/* Navigation */
#mainNav {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#mainNav.scrolled {
  background-color: #0F1B32;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Desktop Dropdown */
.nav-dropdown .dropdown-menu {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: block !important;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown .dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Active nav link */
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Mobile menu */
#mobileMenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mobileMenu.open {
  max-height: 800px;
  display: block !important;
}

/* Mobile accordion */
.mobile-accordion .accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-accordion .accordion-content.open {
  max-height: 300px;
  display: block !important;
}

.mobile-accordion .accordion-arrow.rotated {
  transform: rotate(180deg);
}

/* Hero sections */
.hero-gradient {
  background: linear-gradient(135deg, #1B2A4A 0%, #0F1B32 50%, #1B2A4A 100%);
}

.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201, 168, 76, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 60% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
}

/* Page hero (subpages) */
.page-hero {
  background: linear-gradient(135deg, #1B2A4A 0%, #0F1B32 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(201, 168, 76, 0.1) 0%, transparent 70%);
}

/* Cards */
.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

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

.card-flat {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-flat:hover {
  border-color: #C9A84C;
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.15);
}

/* Stats section */
.stats-bar {
  background: linear-gradient(135deg, #0F1B32 0%, #1B2A4A 100%);
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #C9A84C;
  line-height: 1.2;
}

.stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: #C9A84C;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #1B2A4A;
  text-align: left;
}

.faq-question:hover {
  background-color: #f9fafb;
}

.faq-question .faq-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1rem;
}

/* Timeline */
.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #C9A84C;
}

@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-item {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .timeline-item {
    padding-left: 0;
    width: 50%;
  }
  .timeline-item:nth-child(odd) {
    padding-right: 2.5rem;
    text-align: right;
  }
  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 2.5rem;
  }
}

.timeline-dot {
  position: absolute;
  left: 0.75rem;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  background: #C9A84C;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #C9A84C;
  z-index: 1;
}

@media (min-width: 768px) {
  .timeline-dot {
    left: auto;
    right: -0.5rem;
  }
  .timeline-item:nth-child(even) .timeline-dot {
    left: -0.5rem;
    right: auto;
  }
}

/* Program filter buttons */
.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #4b5563;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #C9A84C;
  color: #1B2A4A;
}

.filter-btn.active {
  background: #1B2A4A;
  color: white;
  border-color: #1B2A4A;
}

/* Testimonial cards */
.testimonial-card {
  position: relative;
  padding: 2rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.testimonial-card::before {
  content: '\201C';
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  color: #C9A84C;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  line-height: 1;
  opacity: 0.3;
}

/* Department cards */
.dept-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 2rem;
  transition: all 0.3s ease;
  background: white;
}

.dept-card:hover {
  border-color: #C9A84C;
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.15);
  transform: translateY(-2px);
}

.dept-card .dept-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(201, 168, 76, 0.1);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C9A84C;
  margin-bottom: 1rem;
}

/* Faculty photo placeholder */
.faculty-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

/* Event date badge */
.event-date-badge {
  background: #C9A84C;
  color: #0F1B32;
  border-radius: 0.75rem;
  padding: 0.75rem;
  text-align: center;
  min-width: 4.5rem;
}

.event-date-badge .month {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.event-date-badge .day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  font-family: 'Playfair Display', serif;
}

/* Type badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-primary {
  background: rgba(27, 42, 74, 0.1);
  color: #1B2A4A;
}

.badge-accent {
  background: rgba(201, 168, 76, 0.15);
  color: #8B7335;
}

.badge-green {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #1D4ED8;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: #C9A84C;
  color: #0F1B32;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease, transform 0.1s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #D4B56A;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: #C9A84C;
  color: #C9A84C;
}

.btn-outline-dark {
  display: inline-block;
  background: transparent;
  color: #1B2A4A;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 2px solid #1B2A4A;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline-dark:hover {
  background: #1B2A4A;
  color: white;
}

/* Form inputs */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: #C9A84C;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

/* Map placeholder */
.map-placeholder {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  border-radius: 0.75rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 1.125rem;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 500;
  z-index: 9999;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success { background: #047857; }
.toast-error { background: #DC2626; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #C9A84C;
}

.breadcrumb .separator {
  color: rgba(255, 255, 255, 0.3);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Selection color */
::selection {
  background: rgba(201, 168, 76, 0.3);
  color: #0F1B32;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.375rem;
}

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

/* Print styles */
@media print {
  #mainNav, #mobileMenu, .toast, footer { display: none !important; }
  .page-hero { background: #1B2A4A !important; -webkit-print-color-adjust: exact; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
