@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Outfit:wght@700&display=swap');

:root {
  /* Colors - Fresh Sky Blue & Orange */
  --color-primary: #0ea5e9;
  --color-primary-light: #38bdf8;
  --color-primary-dark: #0284c7;
  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-secondary: #8b5cf6;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-bg: #ffffff;
  --color-bg-secondary: #f0f9ff;
  --color-dark: #1e293b;
  --color-dark-secondary: #334155;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-border: #bae6fd;
  
  /* Fresh Gradients */
  --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  --gradient-hero: linear-gradient(135deg, rgba(14, 165, 233, 0.95) 0%, rgba(2, 132, 199, 0.92) 100%);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
  
  /* Border radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* 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);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* Container */
  --container-max-width: 1200px;
  --container-padding: var(--spacing-md);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  margin: 0;
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--color-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: var(--shadow-md);
  border: none;
  border-radius: var(--radius-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Section */
.section {
  padding: var(--spacing-3xl) 0;
}

.section.section-dark {
  background: #f1f5f9;
  color: var(--color-text);
}

.section.section-dark h2,
.section.section-dark h3 {
  color: var(--color-text);
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.125rem;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Services Grid - 5 items: 3 narrow + 2 wide */
.services-grid {
  display: grid;
  gap: var(--spacing-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  /* First 3 items take 2 columns each (smaller) */
  .services-grid > *:nth-child(1),
  .services-grid > *:nth-child(2),
  .services-grid > *:nth-child(3) {
    grid-column: span 2;
  }
  
  /* Last 2 items take 3 columns each (larger) */
  .services-grid > *:nth-child(4),
  .services-grid > *:nth-child(5) {
    grid-column: span 3;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in-up {
  animation: fadeInUp var(--transition-slow) ease-out;
}

.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

/* Scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design - Mobile First */

/* Extra Small Devices (phones, less than 480px) */
@media (max-width: 479px) {
  :root {
    --container-padding: 1rem;
    --spacing-3xl: 2.5rem;
    --spacing-2xl: 2rem;
  }
  
  body {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .card {
    padding: 1rem;
  }
}

/* Small Devices (phones, 480px to 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  :root {
    --container-padding: 1.25rem;
    --spacing-3xl: 3rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Medium Devices (tablets, 768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --container-padding: 1.5rem;
  }
  
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large Devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Utility classes */
.text-center {
  text-align: center;
}

.text-light {
  color: var(--color-text-light);
}

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.bg-secondary {
  background-color: var(--color-bg-secondary);
}

.bg-white {
  background-color: white;
}

/* Mobile Navigation Styles */
@media (max-width: 767px) {
  /* Show both burger buttons on mobile */
  #mobile-menu-btn,
  #admin-burger-btn {
    display: block !important;
  }
  
  /* Hide desktop admin panel button on mobile */
  .desktop-admin-btn {
    display: none !important;
  }
  
  #nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--gradient-primary);
    flex-direction: column;
    gap: 0 !important;
    padding: 0; /* Start with 0 padding to be invisible */
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden; /* Hide from clicks */
    transition: all 0.3s ease-in-out;
  }
  
  #nav-menu.active {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
    padding: 1.5rem; /* Add padding only when active */
  }
  
  #nav-menu li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  #nav-menu li:last-child {
    border-bottom: none;
  }
  
  #nav-menu a {
    display: block;
    font-size: 1.125rem;
    padding-left: 0.5rem;
  }
}

/* Desktop and tablet: show burger for admin */
@media (min-width: 768px) {
  #admin-burger-btn {
    display: block !important;
  }
  
  /* Hide desktop admin panel button when admin burger is shown */
  .desktop-admin-btn {
    display: none !important;
  }
}

/* Large desktop: show desktop admin button, hide burger */
@media (min-width: 1024px) {
  #admin-burger-btn {
    display: none !important;
  }
  
  .desktop-admin-btn {
    display: flex !important;
  }
}

/* Additional Responsive Helpers */
@media (max-width: 767px) {
  /* Contact section - make it single column on mobile */
  section > div > div[style*="grid-template-columns: 1fr 1.5fr"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Footer grid - single column on mobile */
  footer div[style*="grid-template-columns: repeat(auto-fit"] {
    text-align: center !important;
  }
  
  /* Button groups - stack vertically */
  div[style*="display: flex"][style*="gap: 1rem"] {
    flex-direction: column;
  }
  
  /* Hero buttons */
  section a.btn-primary,
  section a.btn-outline {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Contact section - maintain 2 columns on tablets but adjust ratio */
  section > div > div[style*="grid-template-columns: 1fr 1.5fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
}
