/**
 * company-our-story.css - Our Story page specific styles
 * Global styles in main.css | Company shared styles in company.css
 * This file: page-specific overrides + missing component styles
 * 
 * FIXES APPLIED:
 * 1. Added .premium-card styles (was undefined - no background/padding)
 * 2. Added .timeline clearfix (float children weren't cleared - next section overlapped)
 * 3. Proper section isolation so sections don't bleed into each other
 * 4. Fixed Naval Advantage cards layout
 */

/* =============================================
 * LOADING OVERLAY
 * ============================================= */

#loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--dark-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#loading-overlay .spinner {
  width: 50px; height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

#loading-overlay .loading-text {
  color: var(--dark-text-primary);
  font-size: 1.2rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =============================================
 * SECTION SPACING & ISOLATION
 * ============================================= */

.section {
  padding: 5rem 0;
  background-color: var(--dark-color);
  /* FIXED: Each section is a new block formatting context */
  overflow: hidden;
  position: relative;
  clear: both;
}

.section:nth-child(even) {
  background-color: var(--dark-secondary);
}

/* =============================================
 * PREMIUM SECTION HEADERS
 * ============================================= */

.premium-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.premium-section-header h2 {
  color: var(--dark-text-primary);
  margin-bottom: 1rem;
  font-size: 2.5rem;
  font-weight: 700;
}

.premium-section-header p {
  color: var(--dark-text-secondary);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto;
}

/* =============================================
 * PREMIUM CARD - WAS MISSING ENTIRELY
 * Used by: timeline cards, founder quote, naval advantage cards
 * ============================================= */

.premium-card {
  background: rgba(30, 30, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.premium-card:hover {
  border-color: rgba(251, 191, 36, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(251, 191, 36, 0.08);
  transform: translateY(-5px);
}

/* =============================================
 * TIMELINE - CLEARFIX FIX
 * The timeline uses float:left/right for items.
 * Without clearing, the next section overlaps.
 * ============================================= */

.timeline {
  /* FIXED: Clear floated children so next section doesn't overlap */
  overflow: hidden;
}

/* Also add clearfix via ::after as belt-and-suspenders */
.timeline::after {
  content: '';
  display: table;
  clear: both;
}

/* =============================================
 * STORY IMAGE
 * ============================================= */

.story-image {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.story-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.story-image:hover img {
  transform: scale(1.03);
}

/* =============================================
 * SECTION TITLE
 * ============================================= */

.section-title {
  font-size: 2rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
  border-radius: 2px;
}

/* =============================================
 * CTA SECTION
 * ============================================= */

.cta-section {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-gold));
  padding: 3rem;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(45deg, rgba(255,255,255,0.05), transparent, rgba(255,255,255,0.05));
}

/* =============================================
 * ANIMATE ITEMS
 * ============================================= */

.animate-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.animate-item.animated {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
 * WHATSAPP BUTTON
 * ============================================= */

.whatsapp-btn {
  position: fixed;
  bottom: 30px; right: 30px;
  z-index: 1000;
  border-radius: 50%;
  width: 60px; height: 60px;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
}

/* =============================================
 * RESPONSIVE
 * ============================================= */

@media (max-width: 991px) {
  .premium-section-header h2 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .premium-section-header h2 {
    font-size: 1.75rem;
  }
  
  .premium-section-header p {
    font-size: 1rem;
  }
  
  .premium-card {
    padding: 1.5rem;
  }
  
  .cta-section {
    padding: 2rem 1.5rem;
  }
  
  .cta-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .premium-card {
    padding: 1.25rem;
  }
}