/**
 * TWSI Group - Estilos del sitio
 * Color primario: #154F25 | Fuente: Inter
 */

/* ---- Variables ---- */
:root {
  --primary: #154F25;
  --primary-dark: #0f3a1b;
  --primary-light: #1e6b33;
  --accent: #2d8a47;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --light-bg: #f6f8f6;
  --white: #ffffff;
}

/* ---- Fuente Inter (local, TTF prefijo Inter_18pt-) ---- */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-RegularItalic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---- Base ---- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text);
}

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

a:hover {
  color: var(--primary-dark);
}

/* ---- Navbar ---- */
.navbar-twsigroup {
  background: var(--white) !important;
  box-shadow: 0 1px 0 rgba(21, 79, 37, 0.08);
}

.navbar-twsigroup .navbar-brand {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.navbar-twsigroup .navbar-brand img.navbar-logo-img {
  height: 40px;
  min-height: 32px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.navbar-twsigroup .navbar-brand {
  line-height: 0;
}

.navbar-twsigroup .nav-link {
  font-weight: 500;
  color: var(--text) !important;
  padding: 0.5rem 1rem !important;
}

.navbar-twsigroup .nav-link:hover,
.navbar-twsigroup .nav-link.active {
  color: var(--primary) !important;
}

.navbar-twsigroup .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.navbar-twsigroup .btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ---- Hero ---- */
.hero-twsigroup {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 4rem 0 5rem;
}

.hero-twsigroup h1 {
  color: var(--white);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.hero-twsigroup .lead {
  opacity: 0.95;
  font-size: 1.1rem;
}

.hero-twsigroup .btn-light {
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
  border: none;
}

.hero-twsigroup .btn-light:hover {
  background: var(--light-bg);
  color: var(--primary-dark);
}

.hero-twsigroup .btn-outline-light:hover {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

/* Hero right image (graph-banner.png 600×600) */
.hero-banner-img-wrap {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner-img {
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: min(380px, 50vw);
  object-fit: contain;
}

@media (min-width: 992px) {
  .hero-banner-img-wrap {
    padding: 1.5rem 0 1.5rem 1.5rem;
  }
  .hero-banner-img {
    max-height: 320px;
  }
}

/* ---- Secciones ---- */
.section-twsigroup {
  padding: 4rem 0;
}

.section-twsigroup .section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.section-twsigroup .section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ---- Servicios (cards) ---- */
.card-twsigroup {
  border: 1px solid rgba(21, 79, 37, 0.12);
  border-radius: 12px;
  transition: box-shadow 0.25s, transform 0.2s;
  height: 100%;
}

.card-twsigroup:hover {
  box-shadow: 0 12px 24px rgba(21, 79, 37, 0.12);
  transform: translateY(-2px);
}

.card-twsigroup .card-icon {
  width: 56px;
  height: 56px;
  background: rgba(21, 79, 37, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-twsigroup .card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.card-twsigroup .card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---- About / bloque destacado ---- */
.bg-twsigroup-light {
  background: var(--light-bg);
}

/* ---- CTA ---- */
.cta-twsigroup {
  background: var(--primary);
  color: var(--white);
  padding: 3rem 0;
}

.cta-twsigroup h3 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.cta-twsigroup .btn-light {
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
}

.cta-twsigroup .btn-light:hover {
  background: var(--light-bg);
  color: var(--primary-dark);
}

/* ---- Footer ---- */
.footer-twsigroup {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}

.footer-twsigroup a {
  color: rgba(255,255,255,0.9);
}

.footer-twsigroup a:hover {
  color: var(--white);
}

.footer-twsigroup .footer-logo img {
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  /* Sin filter: mismo logo que la navbar, colores originales sobre fondo verde oscuro */
}

.footer-twsigroup .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

/* ---- Market Analysis (3 columns) ---- */
.market-card .card-title {
  font-size: 1.1rem;
}

/* ---- Portfolio gallery ---- */
.portfolio-filters .btn {
  font-weight: 500;
}

.portfolio-filters .portfolio-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.portfolio-filters .portfolio-btn:not(.active):hover {
  border-color: var(--primary);
  color: var(--primary);
}

.portfolio-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--light-bg);
  aspect-ratio: 1;
}

.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-link:hover .portfolio-img {
  transform: scale(1.05);
}

/* Portfolio modal */
#portfolioModal .modal-content {
  box-shadow: none;
}

#portfolioModal .btn-close-white {
  filter: brightness(0) invert(1);
}

#portfolioModal .modal-body {
  max-height: 90vh;
}

#portfolioModal .modal-body img {
  max-height: 90vh;
  width: auto;
  object-fit: contain;
}

/* ---- Utilidades ---- */
.text-primary-twsigroup { color: var(--primary) !important; }
.bg-primary-twsigroup { background-color: var(--primary) !important; }
.btn-primary-twsigroup {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.btn-primary-twsigroup:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}
