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

/* --- Content from main.css --- */
/* ===================================
   MAIN CUSTOM STYLES - REFACTORED
   =================================== */

/* CSS Custom Properties */
:root {
    /* Colors */
    --color-primary: #0f9b0f;
    --color-primary-light: #4ca1af;
    --color-secondary: #005c97;
    --color-secondary-dark: #363795;
    --color-admin-primary: #1e3c72;
    --color-admin-secondary: #2a5298;
    --color-whatsapp: #25d366;
    --color-spinner: #06b6d4;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    --gradient-secondary: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    --gradient-admin: linear-gradient(to bottom, var(--color-admin-primary), var(--color-admin-secondary));
    
    /* Animation */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-all: all var(--transition-base);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }
  
  /* ===================================
     BASE STYLES
     =================================== */
  
  /* Smooth Scroll */
  html {
    scroll-behavior: smooth;
  }
  
  /* ===================================
     UTILITY CLASSES
     =================================== */
  
  /* Section Padding */
  .section-padding {
    @apply py-16 px-4 md:px-8 lg:px-16;
  }
  
  /* Text Shadow */
  .hero-text-shadow {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  }
  
  /* ===================================
     GRADIENT BACKGROUNDS
     =================================== */
  
  .hero-gradient {
    background: var(--gradient-primary);
  }
  
  .gulf-blue-gradient {
    background: var(--gradient-secondary);
  }
  
  .admin-sidebar-gradient {
    background: var(--gradient-admin);
  }
  
  /* ===================================
     BUTTON COMPONENTS
     =================================== */
  
  /* Base Button Styles */
  .btn {
    @apply font-medium py-2 px-6 rounded-lg shadow-md transform transition-all duration-300;
  }
  
  .btn:hover {
    @apply shadow-lg;
  }
  
  .btn:active {
    transform: translateY(0) scale(0.98);
  }
  
  /* Button Variants */
  .btn-primary {
    @apply bg-gradient-to-r from-emerald-600 to-teal-500 text-white;
    background: linear-gradient(135deg, #059669, #0d9488);
  }
  
  .btn-primary:hover {
    background: linear-gradient(135deg, #047857, #0f766e);
  }
  
  .btn-secondary {
    @apply bg-gradient-to-r from-indigo-600 to-purple-600 text-white;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
  }
  
  .btn-secondary:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
  }
  
  .btn-outline {
    @apply border-2 border-emerald-500 text-emerald-500 hover:bg-emerald-500 hover:text-white;
    border-color: #10b981;
    color: #10b981;
  }
  
  .btn-outline:hover {
    background-color: #10b981;
    border-color: #10b981;
  }
  
  /* ===================================
     CARD COMPONENTS
     =================================== */
  
  .card-hover {
    @apply transform transition-transform duration-300 hover:scale-105 hover:shadow-xl;
  }
  
  /* ===================================
     FORM COMPONENTS
     =================================== */
  
  .input-field,
  .textarea-field {
    @apply w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-emerald-500 transition;
    border-color: #d1d5db;
    border-radius: var(--radius-lg);
  }
  
  .input-field:focus,
  .textarea-field:focus {
    --tw-ring-color: rgb(16 185 129 / var(--tw-ring-opacity));
    border-color: #10b981;
  }
  
  .textarea-field {
    @apply resize-none;
  }
  
  /* ===================================
     ALERT COMPONENTS
     =================================== */
  
  .alert {
    @apply border-l-4 p-4 rounded mb-4;
  }
  
  .alert-success {
    @apply bg-green-100 border-green-500 text-green-700;
    background-color: #dcfce7;
    border-left-color: #22c55e;
    color: #166534;
  }
  
  .alert-error {
    @apply bg-red-100 border-red-500 text-red-700;
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
  }
  
  .alert-info {
    @apply bg-blue-100 border-blue-500 text-blue-700;
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
  }
  
  /* ===================================
     LOADING & SKELETON
     =================================== */
  
  .spinner {
    width: 2rem;
    height: 2rem;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--color-spinner);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  .skeleton {
    @apply bg-gray-200 animate-pulse rounded;
    background-color: #e5e7eb;
  }
  
  /* ===================================
     ANIMATIONS
     =================================== */
  
  /* Floating Animation */
  .floating {
    animation: floating 3s ease-in-out infinite;
  }
  
  @keyframes floating {
    0%, 100% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-10px);
    }
  }
  
  /* Spin Animation */
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  /* ===================================
     3D EFFECTS
     =================================== */
  
  .icon-3d {
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
    transform: perspective(500px) rotateX(10deg);
    transition: transform var(--transition-base);
  }
  
  .icon-3d:hover {
    transform: perspective(500px) rotateX(0deg) scale(1.1);
  }
  
  /* ===================================
     GLASSMORPHISM
     =================================== */
  
  .glass-card {
    @apply backdrop-blur-md bg-white/30 border border-white/20 rounded-xl shadow-lg;
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
  }
  
  /* ===================================
     WHATSAPP FLOATING BUTTON
     =================================== */
  
  .whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: var(--color-whatsapp);
    color: #fff;
    border-radius: var(--radius-full);
    text-align: center;
    font-size: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    animation: pulse 2s infinite;
    transition: transform var(--transition-base);
  }
  
  .whatsapp-float:hover {
    transform: scale(1.1);
  }
  
  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
      box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
  }
  
  /* ===================================
     RESPONSIVE EMBED
     =================================== */
  
  .embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: var(--radius-lg);
  }
  
  .embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-lg);
  }
  
  /* ===================================
     ADMIN PANEL STYLES
     =================================== */
  
  .table-row-hover:hover {
    @apply bg-gray-50 dark:bg-gray-700;
    background-color: #f9fafb;
  }
  
  .table-row-hover:hover.dark {
    background-color: #374151;
  }
  
  .sidebar-item-active {
    @apply bg-emerald-600 text-white;
    background-color: #059669;
  }
  
  /* ===================================
     CUSTOM SCROLLBAR
     =================================== */
  
  .custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f1f1;
  }
  
  .custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  .custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }
  
  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background-color var(--transition-base);
  }
  
  .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
  }
  
  /* ===================================
     RESPONSIVE DESIGN
     =================================== */
  
  /* Mobile Optimizations */
  @media (max-width: 640px) {
    .section-padding {
      @apply py-8 px-4;
    }
    
    .whatsapp-float {
      width: 50px;
      height: 50px;
      bottom: 20px;
      right: 20px;
      font-size: 24px;
    }
  }
  
  /* Dark mode support */
  @media (prefers-color-scheme: dark) {
    .custom-scrollbar::-webkit-scrollbar-track {
      background: #1f2937;
    }
    
    .custom-scrollbar::-webkit-scrollbar-thumb {
      background: #4b5563;
    }
    
    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
      background: #6b7280;
    }
  }

/* --- Content from index.php <style> block --- */
body {
    font-family: 'Inter', 'Poppins', sans-serif;
}

.hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff10"><polygon points="0,0 1000,0 1000,100 0,50"/></svg>') repeat-x;
    background-size: 100px 100px;
    opacity: 0.1;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from { box-shadow: 0 0 20px rgba(52, 211, 153, 0.3); }
    to { box-shadow: 0 0 30px rgba(52, 211, 153, 0.6); }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translate(0,  0px); }
    50%  { transform: translate(0, -10px); }
    100%   { transform: translate(0, -0px); }
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.country-flag {
    width: 40px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotateY(360deg);
}
