/* Base styles */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* Custom Base Styles */
@layer base {
  html {
    @apply scroll-smooth;
  }
  
  body {
    @apply font-body text-dark-gray text-lg leading-relaxed;
  }
  
  h1, h2, h3, h4, h5, h6 {
    @apply font-heading text-navy leading-tight;
  }
  
  h1 {
    @apply text-4xl md:text-5xl lg:text-6xl;
  }
  
  h2 {
    @apply text-3xl md:text-4xl;
  }
  
  h3 {
    @apply text-2xl md:text-3xl;
  }
  
  h4 {
    @apply text-xl md:text-2xl;
  }
  
  h5 {
    @apply text-lg md:text-xl;
  }
  
  h6 {
    @apply text-base md:text-lg;
  }
  
  p {
    @apply mb-4;
  }
  
  a {
    @apply transition-colors duration-300;
  }
}

/* Custom Components */
@layer components {
  .btn {
    @apply inline-block px-6 py-3 rounded-md font-ui font-semibold text-center transition-all duration-300 transform hover:scale-105;
  }
  
  .btn-primary {
    @apply bg-teal text-white hover:bg-teal/90;
  }
  
  .btn-secondary {
    @apply bg-navy text-white hover:bg-navy/90;
  }
  
  .btn-outline {
    @apply bg-transparent border-2 transition-colors duration-300;
  }
  
  .form-input,
  .form-textarea,
  .form-select {
    @apply w-full px-4 py-2 border border-light-gray rounded-md focus:outline-none focus:ring-2 focus:ring-teal focus:border-transparent transition duration-300;
  }
  
  .card {
    @apply bg-white rounded-lg shadow-md overflow-hidden transition-shadow duration-300 hover:shadow-lg;
  }
  
  .section-padding {
    @apply py-12 md:py-16 lg:py-20;
  }
  
  .container-padding {
    @apply px-4 md:px-6 lg:px-8;
  }
}

/* Custom Utilities */
@layer utilities {
  .text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  }
  
  .bg-gradient-primary {
    background: linear-gradient(135deg, #1E3A5F 0%, #2A7D7D 100%);
  }
  
  .bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231E3A5F' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  .container {
    @apply px-4;
  }
  
  h1 {
    @apply text-3xl;
  }
  
  h2 {
    @apply text-2xl;
  }
  
  h3 {
    @apply text-xl;
  }
  
  .btn {
    @apply px-4 py-2 text-sm;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-in forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s ease-out forwards;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(20px);
  animation: slideInRight 0.8s ease-out forwards;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.8s ease-out forwards;
}

/* Animation Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from { 
    opacity: 0;
    transform: translateX(20px);
  }
  to { 
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from { 
    opacity: 0;
    transform: translateX(-20px);
  }
  to { 
    opacity: 1;
    transform: translateX(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #1E3A5F;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2A7D7D;
}

/* Print Styles */
@media print {
  .no-print {
    display: none;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  
  a {
    text-decoration: none;
    color: #000;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus {
  outline: 2px solid #2A7D7D;
  outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .dark-mode-support {
    --color-bg: #121212;
    --color-text: #f5f5f5;
    --color-primary: #3a8f8f;
    --color-secondary: #2d5a8b;
    
    background-color: var(--color-bg);
    color: var(--color-text);
  }
  
  .dark-mode-support a {
    color: var(--color-primary);
  }
  
  .dark-mode-support .btn-primary {
    background-color: var(--color-primary);
  }
  
  .dark-mode-support .btn-secondary {
    background-color: var(--color-secondary);
  }
}
