/* 
 * Shared Components CSS
 * Common styles for header, footer, navigation, and layout components
 * Used across all pages to maintain consistency
 */

/* =============================================================================
   HEADER STYLES
   ============================================================================= */

.header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 1000 !important;
  background: linear-gradient(135deg, #0a1428 0%, #1a2744 25%, #0f1b35 50%, #1e2d4a 75%, #0a1428 100%) !important;
}

body {
  padding-top: 60px !important;
}

.header-tagline {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #14b8a6 !important;
  font-size: 28px !important;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(20, 184, 166, 0.4);
  white-space: nowrap;
  z-index: 1001 !important;
}

/* =============================================================================
   RESPONSIVE HEADER STYLES
   ============================================================================= */

@media (max-width: 768px) {
  .header {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
  }
  
  body {
    padding-top: 50px !important;
  }
  
  .header-tagline {
    font-size: 16px !important;
    letter-spacing: 1px !important;
    visibility: hidden;
  }
  
  .header-tagline::after {
    content: "M365 Consulting Services";
    visibility: visible;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #14b8a6;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(20, 184, 166, 0.4);
    white-space: nowrap;
  }
  
  /* Spanish mobile tagline variants */
  .es-mobile .header-tagline::after {
    content: "Servicios de Consultoría M365";
  }

  .es-resources .header-tagline::after {
    content: "Recursos Gratuitos M365";
  }

  /* Script pages mobile tagline variant */
  .scripts-mobile .header-tagline::after {
    content: "PnP PowerShell Scripts";
  }
}

/* =============================================================================
   LAYOUT COMPONENTS
   ============================================================================= */

.main-container {
  position: relative !important;
  z-index: 1 !important;
}

/* =============================================================================
   NAVIGATION COMPONENTS
   ============================================================================= */

.header-right {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1002;
}

.language-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  padding: 0px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 36px;
}

.toggle-option {
  color: white;
  text-decoration: none;
  font-size: 16px;
  padding: 1px 3px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  border-radius: 2px;
  font-weight: 400;
  border: 1px solid transparent;
}

.toggle-option.active {
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.4);
  color: #14b8a6;
  font-weight: 500;
}

.toggle-option:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(20, 184, 166, 0.2);
}

/* Home button styling */
.cg-btn {
  display: inline-block;
  transition: transform 0.3s ease;
}

.cg-btn:hover {
  transform: translateY(-2px);
}

/* =============================================================================
   FOOTER STYLES
   ============================================================================= */

.foot {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(95, 62, 142, 0.3);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  flex-basis: 100%;
  width: 100%;
}

.foot p {
  margin: 0;
  line-height: 1.6;
}

.foot a {
  color: #14b8a6;
  text-decoration: none;
  transition: color 0.3s ease;
}

.foot a:hover {
  color: #7C4DFF;
  text-decoration: underline;
}

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

@media (max-width: 884px) {
  .main-container {
    padding: 0 20px !important;
  }
}

/* =============================================================================
   HOMEPAGE CARD GRID STYLES
   ============================================================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(95, 62, 142, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: rgba(95, 62, 142, 0.6);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(95, 62, 142, 0.2);
}

.service-card.wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

.service-card.wide .card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-card.wide .card-image {
  width: 300px;
  height: 200px;
  margin: 0;
}

.card-icon {
  text-align: center;
  margin-bottom: 1rem;
}

.card-icon i {
  font-size: 2.5rem;
  color: #14b8a6;
  background: linear-gradient(135deg, #14b8a6, #0f9488);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-content h3 {
  font-size: 1.5rem;
  color: #14b8a6;
  margin-bottom: 1rem;
  font-weight: 600;
}

.card-content p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  min-height: 120px;
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
  margin-top: auto;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.card-action {
  margin-top: auto;
}

.card-cta {
  display: inline-block;
  background: linear-gradient(135deg, #5F3E8E, #7C4DFF);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.card-cta:hover {
  background: linear-gradient(135deg, #7C4DFF, #5F3E8E);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(95, 62, 142, 0.3);
}

/* Hero section */
.hero-section {
  text-align: center;
  margin-bottom: 4rem;
  padding: 3rem 0;
  background: linear-gradient(135deg, rgba(95, 62, 142, 0.05), rgba(124, 77, 255, 0.05));
  border-radius: 12px;
  border: 1px solid rgba(95, 62, 142, 0.2);
}

.hero-section h1 {
  font-size: 2.5rem !important;
  color: #14b8a6 !important;
  margin-bottom: 1.5rem !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 900px;
  margin: 0 auto;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, rgba(95, 62, 142, 0.1), rgba(124, 77, 255, 0.1));
  border: 1px solid rgba(95, 62, 142, 0.4);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  margin-top: 4rem;
}

.cta-content h2 {
  color: #14b8a6;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta-button {
  background: linear-gradient(135deg, #14b8a6, #0d8f8a);
  color: white;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.cta-button:hover {
  background: linear-gradient(135deg, #0d8f8a, #14b8a6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3);
}

/* =============================================================================
   ABOUT PAGE CERTIFICATIONS
   ============================================================================= */

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.cert-item {
  text-align: center;
  background: rgba(0, 255, 136, 0.05);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.2);
  transition: all 0.3s ease;
}

.cert-item:hover {
  transform: translateY(-5px);
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.4);
}

.cert-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 10px;
}

.cert-item h4 {
  margin: 0;
  font-size: 14px;
  color: #fff;
  line-height: 1.3;
}

/* LinkedIn button */
.linkedin-btn {
  color: #fff !important;
  text-decoration: none;
  display: inline-block;
  padding: 15px 20px;
  border: 2px solid #00ff88;
  border-radius: 8px;
  background: rgba(0, 255, 136, 0.1);
  transition: all 0.3s ease;
  animation: pulse 4s ease-in-out infinite;
}

.linkedin-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    border-color: #00ff88;
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4);
  }
  50% {
    border-color: #14b8a6;
    box-shadow: 0 0 0 10px rgba(0, 255, 136, 0);
  }
}

/* =============================================================================
   RESPONSIVE CARD LAYOUTS
   ============================================================================= */

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .service-card {
    padding: 1rem;
  }
  
  .service-card.wide {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .service-card.wide .card-image {
    width: 100%;
    margin: 0 auto;
  }
  
  .card-icon i {
    font-size: 2rem;
  }
  
  .hero-section {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .cta-section {
    padding: 2rem 1rem;
  }
  
  .cta-content h2 {
    font-size: 1.5rem;
  }
  
  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* =============================================================================
   WORKFLOWS & POWERAPPS PAGE STYLES
   ============================================================================= */

.resources-filter {
  margin: 20px 0;
  padding: 15px;
  background: rgba(95, 62, 142, 0.1);
  border-radius: 8px;
}

.search-box {
  width: 50%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #5F3E8E;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tag-filter {
  padding: 5px 12px;
  background: rgba(95, 62, 142, 0.3);
  border: 1px solid #5F3E8E;
  border-radius: 15px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.tag-filter:hover, .tag-filter.active {
  background: #5F3E8E;
  color: #fff;
}

.scripts-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  overflow: hidden;
}

.scripts-table th,
.scripts-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(95, 62, 142, 0.2);
}

.scripts-table th {
  background: rgba(95, 62, 142, 0.2);
  font-weight: 600;
  color: #fff;
}

.scripts-table tr:hover {
  background: rgba(95, 62, 142, 0.1);
}

.script-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.script-tag {
  padding: 2px 8px;
  background: rgba(95, 62, 142, 0.4);
  border-radius: 10px;
  font-size: 10px;
  color: #fff;
}

.script-row {
  transition: all 0.3s ease;
}

.script-row.hidden {
  display: none;
}

@media (max-width: 768px) {
  .scripts-table {
    font-size: 14px;
  }
  .scripts-table th,
  .scripts-table td {
    padding: 8px 10px;
  }
  .filter-tags {
    justify-content: center;
  }
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

/* For pages that need specific mobile taglines */
.page-training .header-tagline::after {
  content: "SharePoint Training Hub";
}

.page-spanish .header-tagline::after {
  content: "Servicios de Consultoría M365";
}

.page-scripts .header-tagline::after {
  content: "PnP PowerShell Scripts";
}