/* =============================================
   RTI Blog
   ============================================= */

:root {
  --navy: #12014f;
  --orange: #ff7d00;
  --orange-dark: #e06e00;
  --teal: #01acac;
  --teal-dark: #018e8e;
  --dark: #22292e;
  --dark-2: #2b323a;
  --dark-3: #363c46;
  --light-gray: #f1f1f1;
  --text: #22292e;
  --text-light: #6b7280;
  --white: #ffffff;
  --radius: 12px;
  --container: 1180px;
  --shadow: 0 10px 30px rgba(18, 1, 79, 0.08);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M50 80h80v90H50z'/%3E%3Cpath d='M70 80V62a20 20 0 0140 0v18'/%3E%3Crect x='250' y='50' width='110' height='75' rx='8'/%3E%3Cpath d='M268 65v45M284 65v45M300 65v45M318 65v45M334 65v45'/%3E%3C/g%3E%3C/svg%3E");
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 800; line-height: 1.2; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
svg { width: 24px; height: 24px; flex-shrink: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-orange { color: var(--orange); }

.btn {
  display: inline-block;
  padding: 14px 34px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); box-shadow: 0 8px 20px rgba(1,172,172,.35); }
.btn-outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: var(--white); }

/* =============================================
   HEADER
   ============================================= */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(34,41,46,.97); backdrop-filter: blur(6px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 20px; position: relative; }
.brand { align-self: flex-start; margin-bottom: -46px; flex-shrink: 0; }
.brand-badge {
  display: flex; align-items: center; justify-content: center;
  background: var(--white); padding: 14px 22px 34px; border-radius: 0 0 18px 18px;
  box-shadow: 0 18px 30px rgba(0,0,0,.35); position: relative; z-index: 30;
}
.brand-logo { height: 46px; width: auto; max-width: none; }
.main-nav ul { display: flex; gap: 34px; align-items: center; }
.main-nav a { position: relative; color: #e7e9ec; font-weight: 500; font-size: .98rem; transition: color .15s ease; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.main-nav a:hover { color: var(--orange); }
.main-nav a:hover::after { transform: scaleX(1); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 100%; height: 2px; background: #fff; border-radius: 2px; }

/* =============================================
   HERO
   ============================================= */
.blog-hero {
  background: var(--dark);
  color: var(--white);
  padding: 90px 0 70px;
  position: relative;
  text-align: center;
}
.blog-hero::before {
  content: ""; position: absolute; inset: 0; background-image: var(--pattern); opacity: .5;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); text-transform: uppercase; letter-spacing: .5px; }
.blog-hero p { max-width: 560px; margin: 0 auto; color: #c9cdd3; font-size: 1.05rem; }

/* =============================================
   POST GRID
   ============================================= */
.section { padding: 70px 0; }
.section-title { font-size: clamp(1.6rem, 2.8vw, 2.2rem); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 40px; }

.featured-post {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--light-gray);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 56px;
}
.featured-post .post-media { height: 100%; min-height: 320px; }
.featured-post .post-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-post .post-body { padding: 20px 44px 20px 0; }
.post-tag {
  display: inline-block; background: var(--orange); color: var(--white); font-weight: 700;
  font-size: .75rem; letter-spacing: 1px; text-transform: uppercase; padding: 6px 14px; border-radius: 20px;
  margin-bottom: 16px;
}
.post-date { color: var(--text-light); font-size: .88rem; margin-bottom: 10px; display: block; }
.featured-post h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.featured-post .post-excerpt { color: var(--text-light); }
.read-more { color: var(--teal); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; transition: gap .15s ease; }
.read-more:hover { gap: 10px; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.post-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(18,1,79,.14); }
.post-card .post-media { height: 190px; }
.post-card .post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card .post-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.post-card .post-excerpt { color: var(--text-light); font-size: .92rem; flex: 1; }
.post-card .read-more { margin-top: 14px; font-size: .92rem; }

.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 50px; }
.pagination a, .pagination span {
  width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--navy); background: var(--light-gray); transition: background .15s ease, color .15s ease;
}
.pagination a:hover { background: var(--teal); color: var(--white); }
.pagination .active { background: var(--teal); color: var(--white); }

.empty-state { text-align: center; color: var(--text-light); padding: 60px 0; }

/* =============================================
   SINGLE POST
   ============================================= */
.post-header { background: var(--dark); color: var(--white); padding: 70px 0 50px; text-align: center; }
.post-header .post-tag { background: var(--teal); }
.post-header h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); max-width: 820px; margin: 0 auto 14px; }
.post-header .post-date { color: #c9cdd3; }
.post-hero-image { max-width: 900px; margin: -60px auto 0; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.25); position: relative; z-index: 2; }
.post-hero-image img { width: 100%; max-height: 460px; object-fit: cover; }

.post-article { max-width: 760px; margin: 0 auto; padding: 60px 24px 20px; }
.post-article h2 { font-size: 1.5rem; margin-top: 1.4em; color: var(--navy); }
.post-article h3 { font-size: 1.2rem; margin-top: 1.2em; }
.post-article p { font-size: 1.05rem; color: #333a42; }
.post-article ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.post-article ul li { margin-bottom: .5em; color: #333a42; }
.post-article a { color: var(--teal-dark); text-decoration: underline; }
.post-article a:hover { color: var(--teal); }

.post-back { max-width: 760px; margin: 10px auto 60px; padding: 0 24px; }
.post-back a { color: var(--teal-dark); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

.related-posts { background: var(--light-gray); padding: 60px 0 70px; }

/* =============================================
   CONTACTO
   ============================================= */
.contact-section { background: var(--dark-2) var(--pattern); color: var(--white); padding: 80px 0; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: center; }
.contact-info h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.contact-info > p { color: #c9cdd3; }
.contact-list { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list svg { color: var(--orange); width: 26px; height: 26px; flex-shrink: 0; }
.contact-list a, .contact-list span { font-weight: 600; font-size: 1.02rem; line-height: 1.4; }
.contact-social { display: flex; gap: 24px; margin-top: 28px; }
.contact-social a { color: var(--orange); transition: transform .15s ease, color .15s ease; }
.contact-social a:hover { color: #ff9a3d; transform: translateY(-3px); }
.contact-social svg { width: 30px; height: 30px; }

.contact-form-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 34px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 14px; }
.form-field input, .form-field textarea {
  width: 100%; background: #e9eaec; border: none; border-radius: 8px; padding: 14px 16px;
  font-family: inherit; font-size: 1rem; color: var(--text); resize: vertical;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #5b626b; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--teal); }
.hp-field { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.form-msg { margin-top: 14px; font-size: .9rem; min-height: 1.2em; }
.form-msg.success { color: #4ade80; }
.form-msg.error { color: #f87171; }
#submitBtn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.recaptcha-hint { display: block; margin-top: 12px; font-size: .78rem; color: #9aa0a8; }
.recaptcha-hint a { color: #c9cdd3; text-decoration: underline; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: #1b2127; color: #dfe2e6; padding: 24px 0; text-align: center; font-size: .92rem; }
.site-footer a { color: var(--orange); }

.whatsapp-fab {
  position: fixed; right: 24px; bottom: 80px; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: var(--white); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 90; transition: transform .15s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 30px; height: 30px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 980px) {
  .main-nav { position: fixed; top: 70px; left: 0; right: 0; background: var(--dark); max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .main-nav.is-open { max-height: 400px; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 24px 20px; }
  .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-toggle { display: flex; }
  .nav-contact { display: none; }

  .featured-post { grid-template-columns: 1fr; }
  .featured-post .post-media { min-height: 260px; }
  .featured-post .post-body { padding: 28px 28px 34px; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  .section { padding: 50px 0; }
  .blog-hero { padding: 70px 0 50px; }
  .posts-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form-card { padding: 24px; }
  .post-hero-image { margin-top: -30px; }
  .header-inner { padding-top: 10px; padding-bottom: 10px; }
  .brand-badge { padding: 10px 14px 22px; }
  .brand-logo { height: 34px; }
  .brand { margin-bottom: -30px; }
}
