/*
Theme Name: Minimal Pro
Theme URI: https://example.com/minimal-pro
Author: Minimal Pro Team
Author URI: https://example.com
Description: Tema minimalista con header, carrusel, grid, buscador, sección de noticias y pie de página totalmente editable desde WordPress.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: minimal-pro
Tags: minimal, blog, news, custom-logo, custom-menu, featured-images, footer-widgets, translation-ready
*/

/* ─── RESET & BASE ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:       #ffffff;
  --color-surface:  #f7f7f7;
  --color-border:   #e5e5e5;
  --color-text:     #1a1a1a;
  --color-muted:    #6b6b6b;
  --color-accent:   #0f4c81;
  --color-accent2:  #e8f0fb;
  --color-white:    #ffffff;

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

  --radius:         4px;
  --radius-lg:      8px;
  --transition:     0.2s ease;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,.10);

  --container:      1240px;
  --gap:            32px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

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

/* ─── TOPBAR ────────────────────────────────────────────────────────── */
.topbar {
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 12.5px;
  letter-spacing: .02em;
  padding: 8px 0;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar-links {
  display: flex;
  gap: 20px;
}
.topbar-links a {
  color: rgba(255,255,255,.85);
  transition: color var(--transition);
  white-space: nowrap;
}
.topbar-links a:hover { color: #fff; }

.topbar-texts {
  display: flex;
  gap: 20px;
  color: rgba(255,255,255,.75);
}
.topbar-texts span { white-space: nowrap; }

/* ─── HEADER ────────────────────────────────────────────────────────── */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.site-logo { display: flex; align-items: center; }
.site-logo img { height: 44px; width: auto; }
.site-logo .logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--color-accent);
}

/* NAV */
.main-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}
.main-nav ul li a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  transition: background var(--transition), color var(--transition);
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a {
  background: var(--color-accent2);
  color: var(--color-accent);
}
.main-nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 8px;
  min-width: 200px;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
}
.main-nav ul li { position: relative; }
.main-nav ul li:hover > ul { display: flex; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── CAROUSEL ──────────────────────────────────────────────────────── */
.carousel-section { position: relative; overflow: hidden; background: #000; }
.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1);
}
.carousel-slide {
  min-width: 100%;
  position: relative;
}
.carousel-slide img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  opacity: .72;
}
.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 64px;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
  color: #fff;
}
.carousel-caption .cat-tag {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.carousel-caption h2 {
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -.02em;
}
.carousel-caption p { font-size: 15px; color: rgba(255,255,255,.85); max-width: 560px; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(4px);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 10;
}
.carousel-btn:hover { background: rgba(255,255,255,.3); }
.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-dots {
  position: absolute;
  bottom: 20px;
  right: 64px;
  display: flex;
  gap: 8px;
}
.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  transition: background var(--transition), transform var(--transition);
}
.carousel-dots button.active {
  background: #fff;
  transform: scale(1.25);
}

/* ─── FEATURES GRID ─────────────────────────────────────────────────── */
.features-section {
  padding: 56px 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
}
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 14px; color: var(--color-muted); line-height: 1.55; }

/* ─── SEARCH ────────────────────────────────────────────────────────── */
.search-section {
  padding: 56px 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.search-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.search-inner .section-title { margin-bottom: 24px; }
.search-form {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-form:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent2);
}
.search-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 22px;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  color: var(--color-text);
}
.search-form button {
  background: var(--color-accent);
  color: #fff;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background var(--transition);
  white-space: nowrap;
}
.search-form button:hover { background: #0a3d6b; }

/* ─── NEWS / BLOG ────────────────────────────────────────────────────── */
.news-section { padding: 64px 0; background: var(--color-bg); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 40px;
}
.news-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition);
}
.news-card:hover { box-shadow: var(--shadow-md); }
.news-card .thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--color-surface);
}
.news-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .thumb img { transform: scale(1.04); }
.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card .cat-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent2);
  border-radius: var(--radius);
  padding: 3px 8px;
  margin-bottom: 10px;
  align-self: flex-start;
}
.news-card h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.news-card h3 a:hover { color: var(--color-accent); }
.news-card .excerpt {
  font-size: 13.5px;
  color: var(--color-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 14px;
}
.news-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: auto;
}
.news-card .card-meta .date { display: flex; align-items: center; gap: 5px; }
.news-card .read-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.news-card .read-more:hover { text-decoration: underline; }

.news-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.news-pagination a,
.news-pagination span {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: background var(--transition), color var(--transition);
}
.news-pagination a:hover,
.news-pagination .current {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ─── SECOND CAROUSEL ───────────────────────────────────────────────── */
.promo-carousel-section {
  background: var(--color-accent);
  color: #fff;
  padding: 56px 0;
  overflow: hidden;
}
.promo-carousel-inner {
  display: flex;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1);
}
.promo-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  gap: 64px;
  padding: 0 80px;
}
.promo-slide-text { flex: 1; }
.promo-slide-text .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: 12px;
}
.promo-slide-text h2 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.promo-slide-text p {
  font-size: 16px;
  color: rgba(255,255,255,.8);
  max-width: 480px;
  margin-bottom: 28px;
}
.promo-slide-text .btn-white {
  display: inline-block;
  background: #fff;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}
.promo-slide-text .btn-white:hover { opacity: .9; }
.promo-slide-image { flex: 0 0 380px; }
.promo-slide-image img {
  border-radius: var(--radius-lg);
  height: 260px;
  width: 100%;
  object-fit: cover;
  opacity: .85;
}
.promo-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.promo-nav button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  transition: background var(--transition), transform var(--transition);
}
.promo-nav button.active {
  background: #fff;
  transform: scale(1.3);
}

/* ─── FOOTER ────────────────────────────────────────────────────────── */
.site-footer {
  background: #111;
  color: rgba(255,255,255,.75);
  font-size: 14px;
}
.footer-top {
  padding: 56px 0 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap);
}
.footer-col .footer-logo {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.footer-col .footer-about {
  color: rgba(255,255,255,.55);
  font-size: 13.5px;
  line-height: 1.65;
  margin-bottom: 20px;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
  font-size: 13.5px;
}
.footer-col ul li a:hover { color: #fff; }
.footer-socials { display: flex; gap: 10px; margin-top: 4px; }
.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
}
.footer-socials a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: rgba(255,255,255,.35);
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a {
  color: rgba(255,255,255,.35);
  transition: color var(--transition);
}
.footer-bottom-links a:hover { color: rgba(255,255,255,.7); }

/* ─── RESPONSIVE ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .promo-slide { padding: 0 40px; gap: 40px; }
  .promo-slide-image { flex: 0 0 280px; }
}

@media (max-width: 768px) {
  :root { --gap: 20px; }
  .topbar .container { flex-direction: column; gap: 8px; }
  .topbar-texts { flex-wrap: wrap; justify-content: center; }
  .topbar-links { flex-wrap: wrap; justify-content: center; }
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-bg); border-top: 1px solid var(--color-border); padding: 16px; box-shadow: var(--shadow-md); }
  .main-nav.open ul { flex-direction: column; gap: 4px; }
  .hamburger { display: flex; }
  .carousel-caption { padding: 24px; }
  .carousel-slide img { height: 300px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .promo-slide { flex-direction: column; padding: 0 24px; text-align: center; }
  .promo-slide-image { flex: none; width: 100%; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .header-inner { height: 60px; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .carousel-slide img { height: 240px; }
  .carousel-caption h2 { font-size: 18px; }
}
