/* ================================
   FUZZY DASHBOARD - CSS
   ================================ */

:root {
    --fuzzy-ocean: #006a87;
    --fuzzy-night: #001f3d;
    --fuzzy-aqua: #00b76c;
    --fuzzy-cyan: #32ecfd;
    --fuzzy-lime: #b2d56a;
    --fuzzy-mint: #a9ffcf;

    --fuzzy-ocean-light: rgba(0, 106, 135, 0.1);
    --fuzzy-cyan-light: rgba(50, 236, 253, 0.1);

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafb;
    --text-primary: var(--fuzzy-night);
    --text-secondary: #5a6c7d;
    --border-color: #e1e8ed;

    --topnav-height: 64px;
    --sidebar-width: 280px;

    --shadow-sm: 0 1px 3px rgba(0, 31, 61, 0.08);
}

/* ================================
   RESET & BASE
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ================================
   TOP NAVIGATION BAR
   ================================ */
.topnav {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topnav-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.topnav-container {
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topnav-left {
    display: flex;
    align-items: center;
}

.topnav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

.nav-link {
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: var(--fuzzy-ocean-light);
    color: var(--fuzzy-ocean);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--fuzzy-cyan-light), var(--fuzzy-ocean-light));
    color: var(--fuzzy-ocean);
    font-weight: 600;
}


.topnav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* Mobile rows — ocultas en desktop */
.topnav-mobile-row1 { display: none; }
.topnav-mobile-row2 { display: none; }

/* ================================
   SEARCH BOX
   ================================ */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px 16px;
    min-width: 280px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--fuzzy-cyan);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px var(--fuzzy-cyan-light);
}

.search-box svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-primary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--fuzzy-cyan-light), var(--fuzzy-ocean-light));
    color: var(--fuzzy-ocean);
    transform: translateY(-2px);
}

.search-btn:active {
    transform: scale(0.95);
}

/* ================================
   ICON BUTTONS
   ================================ */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: var(--fuzzy-cyan-light);
    color: var(--fuzzy-cyan);
    transform: translateY(-2px);
}

/* ================================
   HAMBURGER BUTTON
   ================================ */
.hamburger-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-btn.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.is-active span:nth-child(2) { opacity: 0; }
.hamburger-btn.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================
   SIDEBAR
   ================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(
        170deg,
        #002a52 0%,
        var(--fuzzy-night) 40%,
        #003d6b 75%,
        var(--fuzzy-ocean) 100%
    );
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
}
/* ── Imagen decorativa arriba-derecha (fija a la pantalla) ── */
.sidebar-deco-top {
    position: absolute;
    top: 4px;
    left: -30px;
    width: 135px;
    height: 135px;
    object-fit: contain;
    pointer-events: none;
    z-index: 1099;  /* justo debajo del sidebar content */
    filter: blur(0.5px);
}

/* ── Imagen decorativa centrada pegada al borde derecho del sidebar ── */
.sidebar-deco-mid {
    position: fixed;
    top: 60%;
    left: 82px;
    transform: translateY(-50%);
    width: 200px;
    object-fit: contain;
    pointer-events: none;
    z-index: 1099;
    filter: blur(0.3px);
}
@media (max-width: 768px) {
    .sidebar-deco-top,
    .sidebar-deco-mid {
        display: none;
    }
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar .logo {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    z-index: 1100;
}

.sidebar .logo img {
    width: 100px;
    height: auto;
    display: block;
}

.sidebar-announcement {
    padding: 14px 16px;
    margin: -20px -16px 20px -16px;
    background: rgba(50, 236, 253, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.sidebar-announcement:hover {
    background: rgba(50, 236, 253, 0.45);
}

.announcement-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 2;
    text-align: center;
}

.announcement-text strong {
    display: block;
    font-size: 15px;
    color: white;
}

.sidebar-announcement img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
}

.sidebar-menu {
    flex: 1;
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-section h2 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fuzzy-aqua);
    margin-bottom: 10px;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-section li a {
    display: block;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    padding: 7px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-section li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-section li a.active {
    color: var(--fuzzy-cyan);
    background: rgba(50, 236, 253, 0.1);
}

.sidebar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    flex-shrink: 0;
}

.sidebar-footer a,
.sidebar-footer button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: none;
    padding: 4px;
}

.sidebar-footer a:hover,
.sidebar-footer button:hover {
    color: #fff;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 31, 61, 0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.is-visible {
    display: block;
    opacity: 1;
}

/* ================================
   MAIN CONTENT
   ================================ */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topnav-height);
    padding: 40px;
    min-height: calc(100vh - var(--topnav-height));
}

.content-wrapper {
    max-width: 1200px;
}

.content-wrapper h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--fuzzy-night);
    margin-bottom: 12px;
}

.content-wrapper p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ================================
   LANGUAGE BUTTON
   ================================ */
.lang-btn {
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-btn:hover {
    background: linear-gradient(135deg, var(--fuzzy-cyan-light), var(--fuzzy-ocean-light));
    color: var(--fuzzy-ocean);
    border-color: var(--fuzzy-cyan);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 106, 135, 0.15);
}

.lang-btn:active {
    transform: scale(0.96);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--fuzzy-cyan), var(--fuzzy-ocean));
    color: white;
    border: none;
}

/* ================================
   RESPONSIVE — TABLET (≤ 1024px)
   ================================ */
@media (max-width: 1024px) {
    .topnav {
        left: 0;
        height: var(--topnav-height);
    }

    .topnav-menu { display: none; }

    .main-content {
        margin-left: 0;
        margin-top: var(--topnav-height);
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .hamburger-btn { display: flex; }
}

/* ================================
   RESPONSIVE — MOBILE (≤ 768px)
   ================================ */
@media (max-width: 768px) {

    /* Nav crece para acomodar 2 filas */
    .topnav {
        height: auto;
    }

    /* Container: columna simple */
    .topnav-container {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 12px;
        gap: 8px;
        height: auto;
    }

    /* Ocultar todo lo de desktop */
    .topnav-left  { display: none; }
    .topnav-right { display: none; }

    /* ── FILA 1: search + lang ── */
    .topnav-mobile-row1 {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .topnav-mobile-row1 .search-box {
        flex: 1;
        min-width: 0;
        min-width: unset; /* override desktop min-width: 280px */
    }

    /* ── FILA 2: nav links ── */
    .topnav-mobile-row2 {
        display: block;
    }

    .mobile-nav-links {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mobile-nav-links::-webkit-scrollbar {
        display: none;
    }

    .mobile-nav-links .nav-link {
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Main content: ajusta margin-top al alto real del nav (2 filas ≈ 110px) */
    .main-content {
        margin-left: 0;
        margin-top: 110px;
        padding: 20px 16px;
    }
}

@media (max-width: 768px) {

    .sidebar {
        /* Cambia de sidebar vertical a topbar horizontal */
        position: fixed;
        top: 100px;          /* justo debajo del topnav (2 filas) */
        left: 0;
        right: 0;
        bottom: auto;        /* ya no ocupa toda la altura */
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
        gap: 12px;
        transform: none;     /* cancela el translateX del tablet */
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 900;        /* debajo del topnav */
        overflow: visible;
    }

    /* Logo como título compacto */
    .sidebar .logo {
        display: none;
    }

    /* El nav se vuelve horizontal con scroll */
    .sidebar-menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0;
        overflow-x: auto;
        scrollbar-width: none;
        flex: 1;
    }

    .sidebar-menu::-webkit-scrollbar { display: none; }

    /* Las secciones se aplanan en fila */
    .sidebar-section {
        display: flex;
        align-items: center;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    /* Ocultamos los títulos de sección (Overview, Framework...) */
    .sidebar-section h2 { display: none; }

    .sidebar-section ul {
        flex-direction: row;
        gap: 2px;
    }

    .sidebar-section li a {
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Ocultamos announcement y footer — no caben en topbar */
    .sidebar-announcement { display: none; }
    .sidebar-footer       { display: none; }

    /* El main content baja para dejar espacio al topnav + sidebar-topbar */
    .main-content {
        margin-left: 0;
        margin-top: 160px;   /* topnav (~110px) + sidebar-topbar (~50px) */
        padding: 20px 16px;
    }
}
/* Oculto en desktop */
.mobile-announcement {
    display: none;
}

@media (max-width: 768px) {
    .mobile-announcement {
        display: block;
        position: fixed;
        top: 150px; /* topnav (~110px) + sidebar-topbar (~50px) */
        left: 0;
        right: 0;
        background: linear-gradient(90deg, var(--fuzzy-aqua), var(--fuzzy-ocean));
        color: #fff;
        font-size: 12px;
        text-align: center;
        padding: 6px 12px;
        z-index: 890;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-announcement strong {
        color: var(--fuzzy-cyan);
    }

    /* El main baja un poco más para incluir el cintillo (~30px) */
    .main-content {
        margin-top: 195px;
    }
}

/* Oculto en desktop */
.sidebar-scroll-hints {
    display: none;
}

@media (max-width: 768px) {
    .sidebar-scroll-hints {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 100px;        /* misma top que el sidebar-topbar */
        left: 0;
        right: 0;
        height: 50px;      /* misma altura del sidebar-topbar */
        pointer-events: none;
        z-index: 950;      /* encima del sidebar */
        padding: 0 4px;
    }

    .scroll-hint-left,
    .scroll-hint-right {
        font-size: 20px;
        color: rgba(255, 255, 255, 0.6);
        padding: 0 6px;
        line-height: 1;
    }

    /* Fade izquierda */
    .scroll-hint-left {
        background: linear-gradient(to left, transparent, var(--fuzzy-night) 70%);
        padding-right: 16px;
    }

    /* Fade derecha */
    .scroll-hint-right {
        background: linear-gradient(to right, transparent, var(--fuzzy-night) 70%);
        padding-left: 16px;
        transition: opacity 0.3s ease;
    }
}

/* MOBILE HOME BUTTON */
.mobile-home-btn {
    display: none; /* oculto por defecto */
}

@media (max-width: 768px) {
    .mobile-home-btn {
        position: fixed;
        top: 190px;
        right: 16px;
        width: 40px;
        height: 40px;
        background-color: #001f3d;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        z-index: 9999;
        text-decoration: none;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .mobile-home-btn svg {
        width: 24px;
        height: 24px;
    }

    .mobile-home-btn:active {
        transform: scale(0.95);
    }

    .mobile-home-btn:hover {
        box-shadow: 0 6px 14px rgba(0,0,0,0.3);
    }
}

.active-sector {
    font-weight: 600;
    color: #007BFF;
    border-bottom: 2px solid #007BFF;
}

   /* ================================================
       FUZZY PROJECTS LAYOUT — prefijo "fp-"
       Sin conflictos con el CSS del dashboard global.
       ================================================ */

    /* Solo afecta al contenedor raíz y sus hijos */
    .fp-page {
      font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
      color: var(--text-primary, #001f3d);
      line-height: 1.6;
    }

    /* ---- CABECERA DE SECCIÓN ---- */
    .fp-page-header {
      grid-column: 1;
      grid-row: 1;
      margin-bottom: 32px;
    }

    .fp-page-header__eyebrow {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--text-secondary, #5a6c7d);
      margin: 0 0 6px;
    }

    .fp-page-header__title {
      font-size: 26px;
      font-weight: 700;
      color: var(--fuzzy-night, #001f3d);
      margin: 0 0 6px;
    }

    .fp-page-header__subtitle {
      font-size: 15px;
      color: var(--text-secondary, #5a6c7d);
      margin: 0;
    }

    /* ---- LAYOUT PRINCIPAL ---- */
    .fp-layout {
      display: grid;
      grid-template-columns: 1fr 300px;
      grid-template-rows: auto 1fr;
      column-gap: 32px;
      align-items: start;
    }

    /* ================================================
       SECCIÓN 1 — GRID DE CARDS
       ================================================ */
    .fp-projects {
      grid-column: 1;
      grid-row: 2;
    }

    .fp-section-label {
      font-family: 'Space Grotesk', sans-serif;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--fuzzy-ocean, #006a87);
      margin: 0 0 14px;
    }

    .fp-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
    }

    /* ---- CARD ---- */
    .fp-card {
      background: var(--bg-primary, #ffffff);
      border-radius: 14px;
      overflow: hidden;
      border: 1px solid var(--border-color, #e1e8ed);
      box-shadow: 0 1px 4px rgba(0, 31, 61, 0.08);
      display: flex;
      flex-direction: column;
      transition: transform 0.22s ease, box-shadow 0.22s ease;
    }

    .fp-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 28px rgba(0, 106, 135, 0.18);
    }

    /* Imagen */
    .fp-card__thumb {
      position: relative;
      overflow: hidden;
      aspect-ratio: 16 / 9;
      background: var(--fuzzy-night, #001f3d);
      flex-shrink: 0;
    }

    .fp-card__thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      opacity: 0.85;
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .fp-card:hover .fp-card__thumb img {
      opacity: 1;
      transform: scale(1.04);
    }

    /* Placeholder cuando no hay imagen */
    .fp-card__thumb-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, var(--fuzzy-night, #001f3d) 0%, var(--fuzzy-ocean, #006a87) 100%);
    }

    .fp-card__thumb-placeholder svg {
      opacity: 0.25;
    }

    /* Badge de categoría */
    .fp-card__badge {
      position: absolute;
      top: 0;
      left: 0;
      background: var(--fuzzy-aqua, #00b76c);
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.05em;
      padding: 5px 14px;
      border-radius: 14px 0 12px 0;
      white-space: nowrap;
      box-shadow: 0 2px 8px rgba(0, 183, 108, 0.35);
    }

    /* Cuerpo */
    .fp-card__body {
      padding: 18px 20px 20px;
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .fp-card__title {
      font-size: 16px;
      font-weight: 500;
      color: var(--text-primary, #001f3d);
      line-height: 1.5;
      margin: 0 0 14px;
    }

    .fp-card__apps-label {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary, #001f3d);
      margin: 0 0 6px;
    }

    .fp-card__apps-list {
      list-style: disc;
      padding-left: 18px;
      margin: 0 0 18px;
      flex: 1;
    }

    .fp-card__apps-list li {
      font-size: 14px;
      color: var(--text-secondary, #5a6c7d);
      line-height: 1.8;
    }

    .fp-card__footer {
      display: flex;
      justify-content: center;
    }

    /* Botón explore */
    .fp-btn-explore {
      background: var(--fuzzy-aqua, #00b76c);
      color: #fff;
      font-family: 'DM Sans', sans-serif;
      font-size: 13px;
      font-weight: 600;
      border: none;
      border-radius: 999px;
      padding: 8px 22px;
      cursor: pointer;
      text-decoration: none;
      display: inline-block;
      box-shadow: 0 2px 8px rgba(0, 183, 108, 0.28);
      transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    }

    .fp-btn-explore:hover {
      background: #009e5d;
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(0, 183, 108, 0.38);
    }

    /* ================================================
       SECCIÓN 2 — ASIDE / SIDEBAR
       ================================================ */
    .fp-aside {
      grid-column: 2;
      grid-row: 1 / 3;
      display: flex;
      flex-direction: column;
      gap: 20px;
      position: sticky;
      top: calc(var(--topnav-height, 64px) + 24px);
    }

    /* Tarjeta base del aside */
    .fp-aside-card {
      background: var(--bg-primary, #ffffff);
      border-radius: 14px;
      padding: 22px;
      border: 1px solid var(--border-color, #e1e8ed);
      box-shadow: 0 1px 4px rgba(0, 31, 61, 0.07);
    }

    .fp-aside-card__title {
      font-family: 'Space Grotesk', sans-serif;
      font-size: 16px;
      font-weight: 700;
      color: var(--fuzzy-night, #001f3d);
      margin: 0 0 16px;
    }

    /* Lista de artículos relacionados */
    .fp-related-list {
      display: flex;
      flex-direction: column;
    }

    .fp-related-item {
      padding: 11px 0;
      border-bottom: 1px solid var(--border-color, #e1e8ed);
      cursor: pointer;
      transition: padding-left 0.2s ease;
    }

    .fp-related-item:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }

    .fp-related-item:first-child {
      padding-top: 0;
    }

    .fp-related-item:hover {
      padding-left: 6px;
    }

    .fp-related-item__title {
      font-size: 14px;
      font-weight: 600;
      color: var(--fuzzy-ocean, #006a87);
      margin: 0 0 3px;
      line-height: 1.4;
      transition: color 0.2s;
    }

    .fp-related-item:hover .fp-related-item__title {
      color: var(--fuzzy-night, #001f3d);
    }

    .fp-related-item__meta {
      font-size: 12px;
      color: var(--text-secondary, #5a6c7d);
      margin: 0;
    }

    /* ---- Newsletter ---- */
    .fp-newsletter {
      background: linear-gradient(145deg, #e6f5fb 0%, #d4f5e6 100%);
      border-radius: 14px;
      padding: 24px;
      border: 1px solid rgba(0, 106, 135, 0.14);
    }

    .fp-newsletter__header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }

    .fp-newsletter__icon {
      font-size: 20px;
      line-height: 1;
    }

    .fp-newsletter__title {
      font-family: 'Space Grotesk', sans-serif;
      font-size: 16px;
      font-weight: 700;
      color: var(--fuzzy-night, #001f3d);
      margin: 0;
    }

    .fp-newsletter__desc {
      font-size: 13px;
      color: var(--text-secondary, #5a6c7d);
      line-height: 1.5;
      margin: 0 0 16px;
    }

    .fp-newsletter__input {
      width: 100%;
      padding: 10px 14px;
      border-radius: 8px;
      border: 1.5px solid var(--border-color, #e1e8ed);
      background: var(--fuzzy-night, #001f3d);
      color: #fff;
      font-family: 'DM Sans', sans-serif;
      font-size: 13px;
      outline: none;
      margin-bottom: 10px;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .fp-newsletter__input::placeholder {
      color: rgba(255, 255, 255, 0.38);
    }

    .fp-newsletter__input:focus {
      border-color: var(--fuzzy-cyan, #32ecfd);
      box-shadow: 0 0 0 3px rgba(50, 236, 253, 0.15);
    }

    .fp-btn-subscribe {
      width: 100%;
      padding: 11px;
      background: var(--fuzzy-aqua, #00b76c);
      color: #fff;
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      font-weight: 600;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      box-shadow: 0 2px 10px rgba(0, 183, 108, 0.28);
      transition: background 0.2s, transform 0.15s;
    }

    .fp-btn-subscribe:hover {
      background: #009e5d;
      transform: translateY(-1px);
    }

    .fp-newsletter__fine {
      text-align: center;
      font-size: 11px;
      color: var(--text-secondary, #5a6c7d);
      margin: 8px 0 0;
    }

    /* ================================================
       RESPONSIVE
       ================================================ */

    /* Tablet: aside más estrecho */
    @media (max-width: 1024px) {
      .fp-layout {
        grid-template-columns: 1fr 260px;
        column-gap: 24px;
      }
    }

    /* Mobile: todo en una sola columna, orden natural */
    @media (max-width: 768px) {
      .fp-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
      }

      /* Reset de todas las asignaciones explícitas de grid */
      .fp-page-header,
      .fp-projects,
      .fp-aside {
        grid-column: 1;
        grid-row: auto;
      }

      /* Aside: deja de ser sticky y se pone en 2 columnas */
      .fp-aside {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
      }

      /* Cards: 2 columnas en tablet/mobile landscape */
      .fp-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    /* Mobile pequeño: todo en 1 columna */
    @media (max-width: 540px) {
      .fp-grid {
        grid-template-columns: 1fr;
      }

      .fp-aside {
        grid-template-columns: 1fr;
      }

      .fp-page-header__title {
        font-size: 21px;
        text-align: center;
      }
      .fp-page-header__subtitle {
        font-size: 14px;
        line-height: 1.4;
        text-align: center;
        margin-top: -5px;
      }
      .fp-page-header__eyebrow {
        font-size: 11px;
        letter-spacing: 0.8px;
        margin-bottom: 4px;
        text-align: center;
      }
    }

    @media (max-width: 768px) {

  .content-wrapper h1 {
    font-size: 1.4rem;      /* más pequeño */
    text-align: center;     /* centrado */
    line-height: 1.3;       /* menos interlineado */
    margin-top: 1rem;
  }
}

.newsletter-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.4);
}

.newsletter-modal.active {
  display: flex;
}

.modal-content {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  width: 90%;
  max-width: 28rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.modal-header {
  margin-bottom: 1rem;
}

.modal-img {
  display: block;
  margin: 0 auto 0.75rem auto;
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #001f3d;
  margin: 0;
}

.modal-text {
  font-size: 1.125rem;
  color: #001f3d;
  margin-bottom: 1.5rem;
}

.modal-close-btn {
  background-color: #00b76c;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-out;
  font-size: 1rem;
}

.modal-close-btn:hover {
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .newsletter-modal {
    align-items: flex-end;
    padding-bottom: 50px;
  }
  .modal-content {
    padding: 1.5rem;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .modal-text {
    font-size: 1rem;
  }
}