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

/* Custom Styles */
:root {
  --primary-color: #0A4B8F;
  --secondary-color: #2D9CDB;
  --accent-color: #F59E0B;
  --dark-gray: #1A202C;
  --medium-gray: #4A5568;
  --light-gray: #F7FAFC;
  --white: #FFFFFF;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--dark-gray);
  line-height: 1.6;
  background-color: var(--light-gray);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

/* Custom Components */
.card {
  @apply bg-white rounded-lg shadow-sm transition-all duration-300 hover:shadow-md;
}

.btn {
  @apply px-4 py-2 rounded font-medium transition-all duration-300;
}

.btn-primary {
  @apply bg-[#0A4B8F] text-white hover:bg-opacity-90;
}

.btn-secondary {
  @apply bg-[#2D9CDB] text-white hover:bg-opacity-90;
}

.btn-accent {
  @apply bg-[#F59E0B] text-white hover:bg-opacity-90;
}

/* Navigation */
.navbar {
  @apply fixed top-0 left-0 right-0 bg-white shadow-sm z-50;
}

.navbar a {
  @apply text-sm;
}

.navbar .hidden.md\:flex {
  @apply space-x-5;
}

.navbar input[type="text"] {
  @apply w-32;
}

/* Hero Section */
.hero {
  @apply relative h-[600px] flex items-center justify-center overflow-hidden;
}

.hero-bg {
  @apply absolute inset-0 bg-cover bg-center;
}

.hero-overlay {
  @apply absolute inset-0 bg-black bg-opacity-60;
}

/* Data Cards */
.data-card {
  @apply bg-white rounded-lg shadow-sm p-6 text-center transition-all duration-300 hover:shadow-md;
}

/* Treatment Cards */
.treatment-card {
  @apply bg-white rounded-lg shadow-sm p-6 transition-all duration-300 hover:shadow-md;
}

/* Hospital Cards */
.hospital-card {
  @apply bg-white rounded-lg shadow-sm p-6 transition-all duration-300 hover:shadow-md;
}

/* Patient Story Cards */
.patient-story-card {
  @apply bg-white rounded-lg shadow-sm p-6 transition-all duration-300 hover:shadow-md;
}

/* City Cards */
.city-card {
  @apply bg-white rounded-lg shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md;
}

/* FAQ */
.faq-item {
  @apply border-b border-gray-200 py-4;
}

.faq-question {
  @apply flex justify-between items-center cursor-pointer font-medium;
}

.faq-answer {
  @apply mt-2 text-gray-600 hidden;
}

.faq-answer.active {
  @apply block;
}

/* Blog Cards */
.blog-card {
  @apply bg-white rounded-lg shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md;
}

/* Footer */
.footer {
  @apply bg-[#1A202C] text-white py-12;
}

.footer-link {
  @apply text-gray-300 hover:text-white transition-colors;
}

/* Breadcrumbs */
.breadcrumbs {
  @apply text-sm text-gray-500 mb-6;
}

/* Sidebar */
.sidebar {
  @apply sticky top-24;
}

/* Table Styles */
.table-container {
  @apply overflow-x-auto;
}

.table {
  @apply w-full border-collapse;
}

.table th {
  @apply bg-gray-100 px-4 py-3 text-left font-medium;
}

.table td {
  @apply border-t px-4 py-3;
}

/* Ad Placeholders */
.ad-placeholder {
  @apply bg-gray-200 rounded flex items-center justify-center text-gray-500;
}

/* FAQ Styles */
.faq-item {
  @apply mb-3 md:mb-4 rounded-xl border border-gray-200 overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-300;
}

.faq-question {
  @apply flex justify-between items-center p-4 md:p-5 bg-gray-50 cursor-pointer hover:bg-gray-100 transition-all duration-200;
}

.faq-question span:first-child {
  @apply font-semibold text-base md:text-lg text-gray-800 pr-4;
}

.faq-icon {
  @apply text-primary font-bold text-lg md:text-xl min-w-[24px] text-center flex-shrink-0;
}

.faq-answer {
  @apply p-4 md:p-5 bg-white border-t border-gray-100 hidden;
}

.faq-answer.active {
  @apply block animate-fadeIn;
}

.faq-answer p {
  @apply text-medium leading-relaxed text-gray-600;
}

/* FAQ Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}

/* Image Carousel */
.carousel {
  @apply relative overflow-hidden;
}

.carousel-slide {
  @apply absolute inset-0 opacity-0 transition-opacity duration-500;
}

.carousel-slide.active {
  @apply opacity-100;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero {
    @apply h-[300px];
  }
  
  .navbar {
    @apply py-2;
  }
  
  .navbar-menu {
    @apply hidden;
  }
  
  .navbar-menu.active {
    @apply block;
  }
  
  /* Mobile Typography */
  h1 {
    @apply text-2xl md:text-3xl lg:text-4xl;
  }
  
  h2 {
    @apply text-xl md:text-2xl;
  }
  
  h3 {
    @apply text-lg md:text-xl;
  }
  
  p {
    @apply text-sm md:text-base;
  }
  
  /* Mobile Padding/Margin */
  .container {
    @apply px-3;
  }
  
  /* Mobile Card Adjustments */
  .card, .treatment-card, .hospital-card, .patient-story-card, .city-card, .blog-card {
    @apply p-4;
  }
  
  /* Mobile Grid Adjustments */
  .grid {
    @apply gap-4;
  }
  
  /* Mobile Hero Text */
  .hero h1 {
    @apply text-2xl md:text-3xl;
  }
  
  .hero p {
    @apply text-sm md:text-base;
  }
  
  /* Mobile Search Input */
  .navbar input[type="text"] {
    @apply w-24 text-sm;
  }
  
  /* Mobile Button Sizing */
  .btn {
    @apply px-3 py-2 text-sm;
  }
  
  /* Mobile Data Cards */
  .data-card {
    @apply p-4;
  }
  
  .data-card div:first-child {
    @apply text-2xl;
  }
  
  /* Mobile FAQ */
  .faq-question span:first-child {
    @apply text-base;
  }
  
  /* Mobile Footer */
  .footer {
    @apply py-8;
  }
}

@media (max-width: 480px) {
  .hero {
    @apply h-[250px];
  }
  
  .hero h1 {
    @apply text-xl;
  }
  
  .hero p {
    @apply text-xs;
  }
  
  .navbar input[type="text"] {
    @apply w-20;
  }
  
  .container {
    @apply px-2;
  }
}

/* Loading Animation */
.loading {
  @apply animate-pulse;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  @apply w-2;
}

::-webkit-scrollbar-track {
  @apply bg-gray-100;
}

::-webkit-scrollbar-thumb {
  @apply bg-gray-400 rounded;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-gray-500;
}

/* Accessibility */
.sr-only {
  @apply absolute w-1 h-1 p-0 -m-1 overflow-hidden whitespace-nowrap border-0;
}

/* Focus Styles */
*:focus {
  @apply outline-none ring-2 ring-[#0A4B8F] ring-opacity-50;
}

/* Selection Styles */
::selection {
  @apply bg-[#0A4B8F] text-white;
}

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

/* Disable Text Selection */
.no-select {
  @apply select-none;
}