@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    scroll-behavior: smooth;
  }
  
  body {
    @apply bg-white text-gray-900 leading-relaxed text-lg;
  }
  
  h1, h2, h3, h4, h5, h6 {
    @apply font-bold leading-tight tracking-tight;
  }
  
  h1 {
    @apply text-5xl md:text-6xl lg:text-7xl;
  }
  
  h2 {
    @apply text-4xl md:text-5xl lg:text-6xl;
  }
  
  h3 {
    @apply text-3xl md:text-4xl lg:text-5xl;
  }
  
  a {
    @apply text-blue-600 hover:text-blue-800 transition-colors;
  }
}

@layer components {
  .btn {
    @apply inline-flex items-center justify-center px-8 py-4 text-base font-semibold text-white bg-blue-600 hover:bg-blue-700 focus:outline-none transition-all duration-200;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: 1px solid transparent;
  }
  
  .btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }
  
  .btn-secondary {
    @apply inline-flex items-center justify-center px-8 py-4 text-base font-semibold bg-white text-gray-700 border border-gray-300 hover:bg-gray-50 focus:outline-none transition-all duration-200;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
  }
  
  .btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    border-color: #9ca3af;
  }
  
  .card {
    @apply bg-white rounded-lg shadow-sm hover:shadow-md transition-shadow duration-200;
  }
  
  .logo-slider-container {
    @apply relative;
    min-height: 5rem;
  }
  
  .logo-slider-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    height: 5rem;
    display: flex;
    align-items: center;
  }
  
  .logo-slider-scroll {
    display: flex;
    animation: logo-scroll 10s linear infinite;
    white-space: nowrap;
    align-items: center;
    height: 100%;
  }
  
  .logo-slider-scroll:hover {
    animation-play-state: paused;
  }
  
  .logo-item {
    margin-right: 4rem;
    flex-shrink: 0;
    height: 3rem;
    display: flex;
    align-items: center;
  }
  
  .logo-spacer {
    width: 8rem;
    height: 3rem;
    flex-shrink: 0;
  }
  
  
  .announcement-banner {
    @apply bg-gradient-to-r from-blue-600 to-purple-600 text-white py-3 font-medium relative;
    overflow: hidden;
  }
  
  .announcement-wrapper {
    overflow: hidden;
    width: calc(100% - 3rem);
  }
  
  .announcement-scroll {
    display: flex;
    animation: announcement-scroll 60s linear infinite;
    white-space: nowrap;
  }
  
  .announcement-text {
    padding-right: 4rem;
    white-space: nowrap;
  }
  
  .announcement-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
  }
  
  .announcement-close:hover {
    opacity: 0.7;
  }
}

@layer utilities {
  .animate-scroll {
    animation: scroll 30s linear infinite;
  }
  
  .animate-announcement-scroll {
    animation: announcement-scroll 60s linear infinite;
  }
  
  @keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }
  
  @keyframes logo-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
  }
  
  @keyframes announcement-scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
  }
  
  .prose-custom {
    @apply prose prose-lg prose-gray max-w-none;
  }
  
  .prose-custom h1 {
    font-size: 1.875rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 1.25rem !important;
    margin-top: 1.5rem !important;
    letter-spacing: -0.025em !important;
    line-height: 1.4 !important;
  }
  
  @media (min-width: 768px) {
    .prose-custom h1 {
      font-size: 2.25rem !important;
    }
  }
  
  .prose-custom h2 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-bottom: 1rem !important;
    margin-top: 1.5rem !important;
    letter-spacing: -0.025em !important;
    line-height: 1.4 !important;
  }
  
  @media (min-width: 768px) {
    .prose-custom h2 {
      font-size: 1.875rem !important;
    }
  }
  
  .prose-custom h3 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-bottom: 0.75rem !important;
    margin-top: 1.25rem !important;
    letter-spacing: -0.025em !important;
    line-height: 1.5 !important;
  }
  
  @media (min-width: 768px) {
    .prose-custom h3 {
      font-size: 1.5rem !important;
    }
  }
  
  .prose-custom h4 {
    @apply text-xl md:text-2xl font-semibold text-gray-700 mb-3 mt-5;
  }
  
  .prose-custom h5, .prose-custom h6 {
    @apply text-lg md:text-xl font-semibold text-gray-700 mb-2 mt-4;
  }
  
  .prose-custom p {
    font-size: 1rem !important;
    color: #4b5563 !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
  }
  
  @media (min-width: 768px) {
    .prose-custom p {
      font-size: 1.0625rem !important;
    }
  }
  
  .prose-custom ul, .prose-custom ol {
    font-size: 1rem !important;
    color: #4b5563 !important;
    margin-top: 1.25rem !important;
    margin-bottom: 1.25rem !important;
    padding-left: 1.5rem !important;
  }

  .prose-custom ul {
    list-style-type: disc !important;
  }

  .prose-custom ol {
    list-style-type: decimal !important;
  }
  
  @media (min-width: 768px) {
    .prose-custom ul, .prose-custom ol {
      font-size: 1.0625rem !important;
    }
  }
  
  .prose-custom li {
    margin-bottom: 0.5rem !important;
    line-height: 1.6 !important;
  }
  
  .prose-custom strong {
    color: #111827 !important;
    font-weight: 600 !important;
  }
  
  .prose-custom em {
    @apply text-gray-700 italic;
  }
  
  .prose-custom blockquote {
    @apply text-lg text-gray-700 italic border-l-4 border-blue-500 pl-6 mb-10 bg-gray-50 py-4;
  }
  
  .prose-custom a {
    @apply text-blue-500 hover:text-blue-700 font-semibold underline transition-colors;
    color: #2563eb !important;
  }
  
  .prose-custom code {
    @apply bg-gray-100 text-blue-600 px-2 py-1 rounded font-mono text-sm;
  }
  
  .prose-custom pre {
    @apply bg-gray-900 text-gray-100 rounded-lg overflow-x-auto;
    margin-top: 1.5rem !important;
    margin-bottom: 1.75rem !important;
    padding: 1.25rem !important;
  }
  
  .prose-custom pre code {
    @apply bg-transparent text-gray-100 p-0;
  }
  
  .prose-custom hr {
    @apply my-8 border-gray-300;
  }
  
  .prose-custom img {
    @apply rounded-lg shadow-md;
  }

  /* Callout boxes */
  .callout {
    @apply border-l-4 pl-6 py-4 my-6 rounded-r-lg;
  }

  .callout-warning {
    @apply bg-yellow-50 border-yellow-400 text-gray-700;
  }

  .callout-note {
    @apply bg-blue-50 border-blue-400 text-blue-800;
  }

  .callout-tip {
    @apply bg-green-50 border-green-400 text-green-800;
  }

  .callout-danger {
    @apply bg-red-50 border-red-400 text-red-800;
  }

  .callout-warning:before {
    content: "⚠️ WARNING";
    @apply block font-bold text-yellow-900 mb-2 text-lg uppercase tracking-wide;
  }

  .callout-note:before {
    content: "ℹ️ NOTE";
    @apply block font-bold text-blue-900 mb-2;
  }

  .callout-tip:before {
    content: "💡 TIP";
    @apply block font-bold text-green-900 mb-2;
  }

  .callout-danger:before {
    content: "🚨 DANGER";
    @apply block font-bold text-red-900 mb-2;
  }
}