/* ============================================================
   Crane Truck & Special Services S.A.S — Estilos globales
   Complementa Tailwind CSS. Para cambiar colores o fuentes,
   edita las variables en :root y el tailwind.config en cada HTML.
   ============================================================ */

/* ------------------------------------------------------------
   Variables de marca
   ------------------------------------------------------------ */
:root {
  --color-brand:       #0368ce;
  --color-brand-dark:  #1a3a6b;
  --font-heading:      'Montserrat', sans-serif;
  --font-body:         'Open Sans', sans-serif;

  /* Imágenes de fondo reutilizables */
  --bg-hero:           url('/static/banner-fondo-2-1920w.jpg');
  --bg-footer:         url('/static/banner-piedepagina-1920w.jpg');
}

/* ------------------------------------------------------------
   Base
   ------------------------------------------------------------ */
body {
  font-family: var(--font-body);
  font-size: 16px;           /* text-base por defecto */
  color: #374151;            /* gray-700 */
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* ------------------------------------------------------------
   Barra superior (topbar)
   ------------------------------------------------------------ */
.ct-topbar {
  background: var(--color-brand-dark);
  color: #fff;
  text-align: center;
  padding: 6px 16px;
  font-size: 0.8rem;
}

.ct-topbar a {
  text-decoration: underline;
  color: inherit;
}

.ct-topbar a:hover {
  color: #bfdbfe; /* blue-200 */
}

/* ------------------------------------------------------------
   Header / Navegación
   ------------------------------------------------------------ */
.ct-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.1);
}

.ct-nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: #1f2937;            /* gray-800 */
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  transition: color .2s, border-color .2s;
}

.ct-nav-link:hover,
.ct-nav-link.active {
  color: var(--color-brand);
  border-bottom-color: var(--color-brand);
}

/* ------------------------------------------------------------
   Hero / Banner de sección
   ------------------------------------------------------------ */
.ct-hero {
  background-image: var(--bg-hero);
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 64px 16px;
}

.ct-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 58, 107, 0.75); /* brand-dark 75% */
}

.ct-hero-content {
  position: relative;
  text-align: center;
  color: #fff;
}

.ct-hero-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: .05em;
}

.ct-hero-content p {
  margin-top: 8px;
  font-size: 0.8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #bfdbfe; /* blue-200 */
}

/* ------------------------------------------------------------
   Slider (solo home)
   ------------------------------------------------------------ */
#ct-slider {
  position: relative;
  width: 100%;
  max-width: 966px;       /* ancho nativo de las imágenes — sin upscaling */
  margin-inline: auto;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-brand-dark);
}

#ct-slider ul {
  display: flex;
  width: 400%;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.6s ease;
}

#ct-slider ul li {
  width: 25%;
  flex-shrink: 0;
}

#ct-slider ul li img {
  width: 100%;
  height: auto;           /* respeta la proporción original 966×392 */
  display: block;
  object-fit: contain;
}

@media (max-width: 640px) {
  #ct-slider ul li img { height: 180px; object-fit: cover; }
}

@media (max-width: 640px) {
  #ct-slider ul li img { height: 220px; }
}

/* Flechas */
.ct-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: background .2s, transform .2s;
  color: var(--color-brand-dark);
}

.ct-slider-arrow svg {
  width: 20px;
  height: 20px;
}

.ct-slider-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.ct-slider-arrow--left  { left: 12px; }
.ct-slider-arrow--right { right: 12px; }

/* Dots */
.ct-slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.ct-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .25s, border-color .25s, transform .25s;
}

.ct-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.25);
}

/* ------------------------------------------------------------
   Secciones de contenido
   ------------------------------------------------------------ */
.ct-section {
  max-width: 80rem;          /* max-w-7xl */
  margin-inline: auto;
  padding: 64px 32px;
}

.ct-section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  color: var(--color-brand-dark);
  text-align: center;
  margin-bottom: 2rem;
}

/* Fondo alterno gris para secciones */
.ct-section-alt {
  background: #f9fafb;       /* gray-50 */
  padding-block: 64px;
}

/* ------------------------------------------------------------
   Tarjetas de equipos (empresa)
   ------------------------------------------------------------ */
.ct-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 640px)  { .ct-equipment-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .ct-equipment-grid { grid-template-columns: repeat(4, 1fr); } }

.ct-equipment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  font-size: 1rem;           /* text-base */
  color: #374151;
}

.ct-equipment-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Botones
   ------------------------------------------------------------ */
.ct-btn {
  display: inline-block;
  background: var(--color-brand);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: .05em;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background .2s;
}

.ct-btn:hover {
  background: var(--color-brand-dark);
}

/* ------------------------------------------------------------
   Formulario de contacto
   ------------------------------------------------------------ */
.ct-input {
  width: 100%;
  border: 1px solid #d1d5db;  /* gray-300 */
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.ct-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(3, 104, 206, .15);
}

.ct-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 6px;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.ct-footer {
  background-image: var(--bg-footer);
  background-size: cover;
  background-position: center;
}

.ct-footer-overlay {
  background: rgba(26, 58, 107, 0.80);
  padding: 40px 32px 24px;
}

.ct-footer-title {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #93c5fd;             /* blue-300 */
  margin-bottom: 12px;
}

.ct-footer a {
  color: #bfdbfe;             /* blue-100 */
  transition: color .15s;
}

.ct-footer a:hover {
  color: #fff;
}

.ct-footer-copy {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 16px;
  font-size: 0.75rem;
  color: #93c5fd;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ------------------------------------------------------------
   WhatsApp flotante
   ------------------------------------------------------------ */
.ct-whatsapp {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 50;
}

.ct-whatsapp img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transition: transform .2s;
}

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