/* ==========================================================================
   Antilles Lawyers & Advisors - Production Styles
   ========================================================================== */

/* Transitions & Micro-interactions */
a, .btn-primary, .btn-outline-light { 
  transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease; 
}
a:hover, .btn-primary:hover, .btn-outline-light:hover { 
  transform: translateY(-2px); 
}

/* Card polish */
.card, .shadow-soft { 
  transition: box-shadow .3s ease, transform .3s ease; 
}
.card:hover { 
  transform: translateY(-3px); 
  box-shadow: 0 12px 28px rgba(0,0,0,.12); 
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 100;
}
.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: #1a3a52;
  transition: all .3s ease;
  border-radius: 2px;
}
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(251,244,183,.98);
  backdrop-filter: blur(10px);
  z-index: 90;
  padding-top: 100px;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.mobile-nav.active {
  display: flex;
}
.mobile-nav a {
  font-size: 1.25rem;
  color: #1a3a52;
  padding: 0.75rem 1.5rem;
}
.mobile-nav a:hover {
  color: #C41E3A;
}

@media (max-width: 767px) {
  .mobile-menu-btn {
    display: flex;
  }
  header nav > ul {
    display: none !important;
  }
  header nav .hidden.md\\:inline-flex {
    display: none !important;
  }
}

/* ==========================================================================
   Floating CTA (mobile only)
   ========================================================================== */
.fab-cta {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.1rem;
  border-radius: 999px;
  background: #C41E3A;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 28px rgba(196,30,58,.35);
  text-decoration: none;
}
@media (min-width: 768px) { 
  .fab-cta { display: none; } 
}

/* ==========================================================================
   Header & Logo
   ========================================================================== */
.logo { 
  display: block; 
  height: 44px; 
  width: auto; 
}
header .h-24 { 
  height: 5rem; 
}
.logo + span { 
  display: inline-block; 
  line-height: 1.1; 
  margin-left: .25rem; 
}
@media (max-width: 640px) {
  .logo + span { display: none; }
  .logo { height: 40px; }
  header .h-24 { height: 4rem; }
}

/* ==========================================================================
   Team Page Pattern Background
   ========================================================================== */
.team-section {
  position: relative;
  background: #f8f4e8;
}
.team-section::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .06;
  background-image: url('pattern.png');
  background-size: 500px;
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
}
.team-section > * {
  position: relative;
  z-index: 1;
}

/* Team member cards */
.team-card {
  background: rgba(255,255,255,.92);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  backdrop-filter: blur(4px);
}

/* ==========================================================================
   Mobile Responsive Fixes
   ========================================================================== */

/* Hero section mobile */
@media (max-width: 640px) {
  .hero {
    min-height: 70vh;
    height: auto;
  }
  .hero h1 {
    font-size: 2.25rem !important;
    line-height: 1.2;
  }
  .hero p {
    font-size: 1rem;
  }
  .hero .flex-wrap {
    flex-direction: column;
  }
  .hero .flex-wrap a {
    width: 100%;
    text-align: center;
  }
}

/* Grid sections mobile */
@media (max-width: 767px) {
  .grid.md\\:grid-cols-2,
  .grid.md\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  /* Practice areas cards */
  section .p-6 {
    padding: 1.25rem;
  }
  
  /* Team images on mobile - full width, less height */
  .team-card img,
  main section img {
    height: 280px !important;
    margin-bottom: 1rem;
  }
  
  /* Contact form mobile */
  .firm-tab {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  /* Maps mobile */
  iframe {
    height: 200px !important;
  }
  
  /* Footer mobile */
  footer {
    padding: 2rem 1rem;
    margin-top: 3rem !important;
  }
  footer img {
    height: 48px !important;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  .max-w-7xl {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ==========================================================================
   Typography Mobile
   ========================================================================== */
@media (max-width: 640px) {
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.125rem !important; }
  p, li { font-size: 0.9375rem; line-height: 1.6; }
  
  main {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* ==========================================================================
   Touch Targets & Accessibility
   ========================================================================== */
@media (max-width: 767px) {
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
  
  input, textarea, select {
    font-size: 16px !important; /* Prevents iOS zoom */
    padding: 0.875rem;
  }
  
  .btn-primary, .btn-outline-light {
    padding: 1rem 1.5rem;
  }
}

/* ==========================================================================
   WhatsApp Button Mobile
   ========================================================================== */
@media (max-width: 767px) {
  a[href*="wa.me"] {
    bottom: 80px !important;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  header, footer, .fab-cta, a[href*="wa.me"] {
    display: none !important;
  }
  body {
    background: white !important;
  }
  .shadow-soft {
    box-shadow: none !important;
  }
}

/* ==========================================================================
   Smooth Scroll & Performance
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* GPU acceleration for animations */
[data-animate], .parallax {
  will-change: transform, opacity;
}
