/*
Theme Name: Yotta Desarrollos
Theme URI: https://yotta.com
Author: Yotta Desarrollos
Author URI: https://yotta.com
Description: Tema corporativo a medida para Yotta Desarrollos. Diseño moderno con efectos diagonales "katana", header sticky, botón "volver arriba" y totalmente responsive.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yotta-desarrollos
Tags: business, custom-colors, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready
*/

/* =========================================================
   VARIABLES & RESET
   ========================================================= */
:root {
  --color-primary: #0B5FFF;
  --color-primary-dark: #0742B8;
  --color-primary-light: #3B82F6;
  --color-navy: #0A1B33;
  --color-navy-light: #14253F;
  --color-text: #0F172A;
  --color-text-muted: #64748B;
  --color-bg: #FFFFFF;
  --color-bg-soft: #F1F4F9;
  --color-placeholder: #B8C5D6;
  --color-placeholder-dark: #94A8C2;
  --color-border: #E5EAF2;

  --font-display: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --container: 1280px;
  --radius-card: 14px;
  --radius-btn: 10px;

  --shadow-card: 0 6px 20px rgba(15, 23, 42, 0.06);
  --shadow-btn: 0 8px 20px rgba(11, 95, 255, 0.25);
  --shadow-header: 0 4px 20px rgba(10, 27, 51, 0.08);

  --header-h: 96px;
  --header-h-mobile: 70px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--color-text);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .2px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-arrow svg { width: 16px; height: 16px; transition: transform .2s ease; flex-shrink: 0; }
.btn-arrow:hover svg { transform: translateX(4px); }

/* =========================================================
   HEADER - sticky with diagonal "katana" cut
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  pointer-events: none;
  transition: transform .3s ease;
}

.header-katana {
  height: var(--header-h);
  width: 80%;
  max-width: calc(var(--container) + 100px);
  pointer-events: auto;
  display: flex;
  align-items: center;
  position: relative;
  transition: height .3s ease;
}

/* Background as pseudo-element so clip-path doesn't clip the nav drawer */
.header-katana::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 110px) 100%, 0 100%);
  box-shadow: var(--shadow-header);
  z-index: -1;
  transition: box-shadow .3s ease;
}

/* When scrolled, header gets a bit smaller and more solid */
.site-header.is-scrolled .header-katana {
  height: calc(var(--header-h) - 16px);
}
.site-header.is-scrolled .header-katana::before {
  box-shadow: 0 8px 30px rgba(10, 27, 51, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  /* Extra right padding so content doesn't collide with diagonal cut */
  padding: 0 140px 0 48px;
  gap: 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-mark {
  width: 46px;
  height: 32px;
  background: var(--color-placeholder);
  border-radius: 3px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-mark::before {
  content: "";
  width: 70%;
  height: 65%;
  background: var(--color-placeholder-dark);
  clip-path: polygon(0 0, 50% 100%, 100% 0, 70% 0, 50% 60%, 30% 0);
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-text strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--color-text);
  letter-spacing: .5px;
}
.logo-text span {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--color-text-muted);
  margin-top: 3px;
  font-weight: 600;
}

/* Nav */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--color-text);
  position: relative;
  display: inline-block;
  padding: 8px 0;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .active > a {
  color: var(--color-primary);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width .25s ease;
}
.main-nav a:hover::after,
.main-nav .current-menu-item > a::after,
.main-nav .active > a::after {
  width: 100%;
}
.main-nav .menu-item-has-children > a::after { content: " ▾"; position: static; background: none; font-size: 10px; }

.header-cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* Make the header contact button slightly smaller so it never collides with cut */
.header-contact-btn {
  padding: 12px 22px;
  font-size: 14px;
}

/* Burger menu (only visible on small screens) */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.menu-toggle:hover { background: var(--color-primary-dark); }
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: all .25s ease;
}
.menu-toggle span::before { content:""; position:absolute; top:-7px; left:0; }
.menu-toggle span::after  { content:""; position:absolute; top: 7px; left:0; }

/* burger -> X when nav is open */
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  position: relative;
  min-height: 640px;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--header-h) + 70px) 24px 80px;
  gap: 60px;
  align-items: center;
  z-index: 2;
}

.hero-text { max-width: 520px; }

.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 24px;
}
.hero h1 .highlight {
  color: var(--color-primary);
  display: block;
}

.hero-lead {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--color-text-muted);
  margin-bottom: 36px;
  max-width: 440px;
  line-height: 1.55;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0;
  margin: 0;
}
.hero-bullets li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  list-style: none;
}
.hero-bullets li svg { flex-shrink: 0; }

/* Hero image / placeholder with diagonal katana cut */
.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 58%;
  height: 100%;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(135deg, var(--color-placeholder) 0%, var(--color-placeholder-dark) 100%);
  z-index: 1;
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(11, 95, 255, .55) 25%, transparent 25%),
    linear-gradient(225deg, rgba(11, 95, 255, .35) 25%, transparent 25%);
  background-size: 220px 220px;
  background-position: top right, top left;
  background-repeat: no-repeat;
  opacity: .6;
  mix-blend-mode: multiply;
}

.hero-image::after {
  content: "";
  position: absolute;
  top: 22%;
  right: 8%;
  width: clamp(140px, 18vw, 240px);
  height: clamp(140px, 18vw, 240px);
  background: var(--color-primary);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  opacity: .85;
}

/* =========================================================
   SERVICES
   ========================================================= */
.services {
  position: relative;
  padding: 80px 0 120px;
  background: #fff;
}

.services .section-title {
  text-align: center;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 56px;
  padding: 0 24px;
}

.services-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  align-items: stretch;
}

.services-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(11, 95, 255, .12);
}
.service-card .icon {
  width: 48px; height: 48px;
  background: rgba(11, 95, 255, .08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
  margin-bottom: 22px;
}
.service-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.25;
}
.service-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.55;
}

/* Blue diagonal panel */
.tech-panel {
  background: var(--color-primary);
  color: #fff;
  padding: 48px 38px;
  border-radius: var(--radius-card);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.tech-panel h3 {
  color: #fff;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 18px 40px;
}
.tech-panel hr {
  border: none;
  width: 48px;
  height: 2px;
  background: rgba(255,255,255,.6);
  margin: 0 0 0 40px;
}

/* =========================================================
   STATS + TRUSTED BY
   ========================================================= */
.stats-section {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  gap: 0;
  align-items: stretch;
}

.stats {
  background: var(--color-navy);
  color: #fff;
  padding: 48px 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-radius: var(--radius-card) 0 0 var(--radius-card);
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.5vw, 44px);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
}
.stat .label {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  font-weight: 400;
}

.trusted {
  background: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.trusted .label {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  margin: 0;
}
.trusted-logos {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.trusted-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .3px;
}
.trusted-logo .dot {
  width: 14px;
  height: 14px;
  background: var(--color-primary);
  border-radius: 3px;
  display: inline-block;
}

/* =========================================================
   CTA SECTION
   ========================================================= */
.cta-section {
  padding: 80px 0;
  background: #fff;
  text-align: center;
}
.cta-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.cta-inner h2 {
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 700;
  margin: 0;
}
.cta-inner p {
  color: var(--color-text-muted);
  margin: 0 0 12px;
  font-size: 15px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,.75);
  padding: 64px 0 28px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 40px;
}
.footer-brand .logo-text strong { color: #fff; }
.footer-brand .logo-text span { color: rgba(255,255,255,.5); }
.footer-brand p {
  margin-top: 18px;
  line-height: 1.6;
  color: rgba(255,255,255,.6);
}
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,.7); }
.footer-col a:hover { color: #fff; }
.footer-contact div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  word-break: break-word;
}
.footer-contact svg {
  flex-shrink: 0;
  color: var(--color-primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 22px 24px 0;
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a:hover { color: #fff; }

/* =========================================================
   BACK TO TOP BUTTON
   ========================================================= */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease, background .2s ease;
  box-shadow: 0 8px 24px rgba(11, 95, 255, 0.35);
  z-index: 90;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-4px);
}
.back-to-top:active { transform: translateY(0); }

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

/* ----- Tablet and below ----- */
@media (max-width: 1100px) {
  .header-katana {
    width: 94%;
  }
  .header-katana::before {
    clip-path: polygon(0 0, 100% 0, calc(100% - 60px) 100%, 0 100%);
  }
  .header-inner {
    padding: 0 90px 0 28px;
  }
  .main-nav ul { gap: 24px; }
  .main-nav a { font-size: 14px; }
}

/* ----- Tablet ----- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: calc(var(--header-h) + 40px) 24px 60px;
    gap: 30px;
  }
  .hero-image {
    position: relative;
    width: 100%;
    height: 320px;
    clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%);
    margin-top: 20px;
  }

  .services-layout { grid-template-columns: 1fr; }
  .services-cards { grid-template-columns: repeat(2, 1fr); }
  .tech-panel { clip-path: polygon(0 14%, 100% 0, 100% 100%, 0 100%); }

  .stats-section { grid-template-columns: 1fr; }
  .stats { border-radius: var(--radius-card) var(--radius-card) 0 0; }
  .trusted { border-radius: 0 0 var(--radius-card) var(--radius-card); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ----- Mobile (large) ----- */
@media (max-width: 820px) {
  :root { --header-h: var(--header-h-mobile); }

  /* Switch header to full width on mobile, smaller katana cut */
  .header-katana {
    width: 100%;
    height: var(--header-h-mobile);
  }
  .header-katana::before {
    clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 100%, 0 100%);
  }
  .header-inner {
    padding: 0 50px 0 20px;
    gap: 12px;
  }
  .logo-text strong { font-size: 17px; }
  .logo-text span { font-size: 8px; letter-spacing: 2px; }
  .logo-mark { width: 38px; height: 28px; }

  /* Hide desktop nav, show burger */
  .main-nav { display: none; }
  .header-contact-btn { display: none; }
  .menu-toggle { display: flex; }

  /* Mobile nav drawer */
  .main-nav.is-open {
    display: block;
    position: fixed;
    top: var(--header-h-mobile);
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 24px 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
    border-top: 1px solid var(--color-border);
    z-index: 200;
    max-height: calc(100vh - var(--header-h-mobile));
    overflow-y: auto;
  }
  .main-nav.is-open ul {
    flex-direction: column;
    gap: 4px;
  }
  .main-nav.is-open li {
    border-bottom: 1px solid var(--color-border);
  }
  .main-nav.is-open li:last-child { border-bottom: none; }
  .main-nav.is-open a {
    display: block;
    padding: 14px 4px;
    font-size: 16px;
    font-weight: 500;
  }
  .main-nav.is-open a::after { display: none; }

  /* Mobile menu also needs a contact button at the bottom */
  .main-nav.is-open::after {
    content: "";
    display: block;
  }

  /* Body scroll lock when menu open */
  body.nav-open { overflow: hidden; }

  /* Hero on mobile */
  .hero { min-height: auto; }
  .hero-grid {
    padding: calc(var(--header-h-mobile) + 30px) 20px 50px;
    gap: 28px;
  }
  .hero h1 { font-size: 38px; }
  .hero-lead { font-size: 16px; margin-bottom: 28px; }
  .hero-buttons { gap: 10px; }
  .hero-buttons .btn { padding: 13px 22px; font-size: 14px; }
  .hero-bullets { gap: 14px 20px; }
  .hero-image {
    height: 260px;
    clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%);
  }

  /* Services */
  .services { padding: 60px 0 80px; }
  .services .section-title { margin-bottom: 36px; }
  .services-cards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .service-card { padding: 24px 20px; }
  .tech-panel {
    padding: 36px 28px;
    min-height: 220px;
  }
  .tech-panel h3, .tech-panel hr { margin-left: 24px; }

  /* Stats */
  .stats-section { padding: 0 16px; }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
    padding: 36px 28px;
  }
  .trusted { padding: 36px 24px; }
  .trusted-logos { gap: 14px; }
  .trusted-logo { font-size: 13px; }

  /* CTA */
  .cta-section { padding: 60px 20px; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 0 24px 32px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  /* Back to top - smaller on mobile */
  .back-to-top {
    width: 46px;
    height: 46px;
    bottom: 20px;
    right: 20px;
  }
}

/* ----- Mobile (small phones) ----- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .header-inner { padding: 0 50px 0 16px; }

  .hero h1 { font-size: 32px; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .hero-bullets { flex-direction: column; gap: 10px; }

  .services-cards { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

/* ----- Very small screens ----- */
@media (max-width: 360px) {
  .logo-text strong { font-size: 16px; }
  .logo-text span { font-size: 7px; }
  .hero h1 { font-size: 28px; }
  .stats { grid-template-columns: 1fr 1fr; padding: 28px 20px; }
}

/* ----- Reduce motion preference ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
