/* ============================
   FinanKairos - Design System
   Brand Architecture v2.0
   ============================ */

/* === Import Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* === CSS Variables === */
:root {
  /* Brand Colors - FinanKairos Official Palette */
  --brand-navy: #012340;
  --brand-corporate: #225473;
  --brand-gray-blue: #7B95A6;
  --brand-bg: #F2F2F2;

  /* Legacy color variables for compatibility */
  --primary-blue: #225473;
  --primary-blue-dark: #012340;
  --primary-blue-light: #7B95A6;
  --dark-gray: #012340;
  --text-primary: #012340;
  --text-secondary: #7B95A6;
  --bg-white: #ffffff;
  --bg-light: #F2F2F2;
  --bg-dark: #012340;

  /* Typography - Cinzel & Montserrat */
  --font-authority: 'Cinzel', serif;
  --font-brand: 'Montserrat', sans-serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Montserrat', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Transitions */
  --transition-base: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

/* === Global Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.8;
  background-color: var(--brand-bg);
  overflow-x: hidden;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--spacing-sm);
}

/* === Top Bar === */
.top-bar {
  background-color: var(--bg-light);
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid #e0e0e0;
}

.top-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  color: var(--brand-gray-blue);
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.social-icons a:hover {
  color: var(--brand-corporate);
  transform: translateY(-2px);
}

.language-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #7B95A6;
  background-color: rgba(1, 35, 64, 0.05);
  padding: 4px 8px;
  border-radius: 5px;
}

.language-selector a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-gray-blue);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.language-selector a img {
  width: 18px;
  height: auto;
  border-radius: 2px;
  display: block;
}

.language-selector a.active,
.language-selector a:hover {
  background-color: var(--brand-corporate);
  color: white;
}

/* === Header & Navigation === */
header {
  background-color: var(--bg-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-base);
}

header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  max-height: 60px;
  height: auto;
  width: auto;
  transition: var(--transition-fast);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.logo img:hover {
  opacity: 0.85;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--brand-navy);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand-corporate);
  transition: var(--transition-fast);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--brand-corporate);
}

/* === Hero Section (Updated) === */
.hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  color: white;
  padding: var(--spacing-xl) var(--spacing-md);
  min-height: 400px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 2rem;
}

.hero::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 1200 600"><path d="M0,300 Q300,200 600,300 T1200,300 L1200,600 L0,600 Z" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat center bottom;
  background-size: cover;
  opacity: 0.5;
}

.hero-content {
  grid-column: 2;
  max-width: 800px;
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 1.3rem;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* Logo en hero - zona izquierda */
.hero-logo {
  grid-column: 1;
  justify-self: end;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding-right: 20px;
}

.hero-logo img {
  max-height: 390px;
  width: auto;
  height: auto;
  opacity: 1;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  filter: none;
  display: block;
}

/* Zona derecha vacía */
.hero-spacer {
  grid-column: 3;
  width: 100%;
}

/* === Content Sections === */
.section {
  padding: var(--spacing-xl) var(--spacing-md);
}

.section:nth-child(even) {
  background-color: var(--bg-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.two-column.reverse {
  direction: rtl;
}

.two-column.reverse>* {
  direction: ltr;
}

.column-text h3 {
  color: var(--brand-navy);
  margin-bottom: var(--spacing-sm);
}

.column-text p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.column-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: var(--transition-base);
}

.column-image img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

/* === Team Grid === */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.team-member {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition-base);
  text-align: center;
  flex: 0 1 calc(33.333% - var(--spacing-md));
  min-width: 300px;
  /* Minimum width before wrapping */
  margin-bottom: var(--spacing-md);
}

@media (max-width: 992px) {
  .team-member {
    flex: 0 1 calc(50% - var(--spacing-md));
  }
}

@media (max-width: 768px) {
  .team-member {
    flex: 0 1 100%;
  }
}

.team-member {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition-base);
  text-align: center;
}

.team-member:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.team-member img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.team-member-info {
  padding: var(--spacing-sm);
}

.team-member h4 {
  color: var(--primary-blue);
  margin-bottom: 0.25rem;
}

.team-member p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* === Clients Section === */
.clients-strip {
  padding: var(--spacing-md) 0;
  overflow: hidden;
}

.clients-logos {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.client-logo {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition-fast);
  max-width: 150px;
  height: auto;
}

.client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* === Footer === */
footer {
  background-color: var(--bg-dark);
  color: white;
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.footer-section h3 {
  color: var(--primary-blue-light);
  margin-bottom: var(--spacing-sm);
  font-size: 1.2rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-section a:hover {
  color: var(--primary-blue-light);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Mobile Menu Toggle === */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-blue);
  transition: var(--transition-fast);
}

/* === Responsive Design === */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background-color: white;
    width: 100%;
    padding: var(--spacing-md);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition-base);
    gap: 1rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  /* Hero Mobile Adjustments */
  .hero {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .hero-logo,
  .hero-spacer {
    display: none;
  }

  .hero-content {
    grid-column: auto;
  }
}

/* === Values Section === */
.values-strip {
  background-color: #F2F2F2;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 3rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.value-item i {
  color: #225473;
  /* Brand corporate blue */
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.value-item h4 {
  font-family: var(--font-brand);
  /* Montserrat */
  font-weight: 700;
  font-size: 1rem;
  color: #012340;
  /* Brand navy */
  margin-bottom: 0;
}

.value-item p {
  font-family: var(--font-brand);
  /* Montserrat */
  font-weight: 300;
  /* Light */
  font-size: 0.85rem;
  color: #555;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
}


/* === Polished Services Updates === */
.team-member h4 {
  font-family: var(--font-heading);
  /* Cinzel */
  color: #012340;
  /* Brand Navy */
  margin-bottom: 0.25rem;
}

.team-member p {
  font-family: var(--font-brand);
  /* Montserrat */
  color: #225473;
  /* Corporate Blue */
  font-size: 0.9rem;
  margin: 0;
}
/* === Contact Links === */
.contact-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #225473; /* Corporate Blue */
}

