/* ===========================
   CONVENIOS V2
   Header/Footer: home-v2.css (hv2-*)
   =========================== */

/* ---------- Base ---------- */
.cv-page {
    font-family: 'Montserrat', sans-serif;
    color: #1A1A1A;
    background: #F7F8FA;
    -webkit-font-smoothing: antialiased;
}
.cv-page *, .cv-page *::before, .cv-page *::after { box-sizing: border-box; }
.cv-page a { text-decoration: none; }
.cv-page img { max-width: 100%; display: block; }

/* ---------- Hero ---------- */
.cv-hero {
    position: relative;
    height: 320px;
    overflow: hidden;
    background: #00402B;
}
.cv-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0,64,43,0.96) 0%,
        rgba(0,87,61,0.87) 50%,
        rgba(45,122,79,0.73) 100%);
    z-index: 1;
}
.cv-hero__content {
    position: relative;
    z-index: 2;
    padding: 0 80px;
    width: 100%;
}
.cv-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 100px;
    font-size: 12px;
    font-weight: 500;
}
.cv-hero__breadcrumb a { color: rgba(255,255,255,0.67); transition: color 0.15s; }
.cv-hero__breadcrumb a:hover { color: #fff; }
.cv-hero__breadcrumb .cv-hero__sep { color: rgba(255,255,255,0.4); font-size: 10px; }
.cv-hero__breadcrumb .cv-hero__current { color: rgba(255,255,255,0.8); }
.cv-hero__title-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 40px;
}
.cv-hero__accent {
    width: 4px;
    height: 52px;
    background: #91C14D;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 4px;
}
.cv-hero__title {
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.1;
}
.cv-hero__subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.73);
    margin: 16px 0 0 20px;
    max-width: 600px;
    line-height: 1.5;
}
.cv-hero__icon {
    position: absolute;
    z-index: 2;
    color: #fff;
    pointer-events: none;
}
.cv-hero__icon--main {
    right: 60px;
    top: -20px;
    font-size: 300px;
    opacity: 0.09;
}
.cv-hero__icon--sec {
    right: 20px;
    bottom: -10px;
    font-size: 100px;
    opacity: 0.06;
    transform: rotate(-12deg);
}

/* ---------- Filter Bar ---------- */
.cv-filters {
    background: #fff;
    border-bottom: 1px solid #E8E8E8;
    padding: 16px 80px;
    position: sticky;
    top: 80px;
    z-index: 100;
}
.cv-filters__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.cv-filters__left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cv-filters__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #888;
    white-space: nowrap;
}
.cv-filters__label i { font-size: 14px; }
.cv-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #555;
    background: #fff;
    transition: all 0.15s;
    white-space: nowrap;
}
.cv-pill:hover { border-color: #00573D; color: #00573D; }
.cv-pill--active,
.cv-pill--active:link,
.cv-pill--active:visited {
    background: #00573D !important;
    color: #FFFFFF !important;
    border-color: #00573D !important;
    font-weight: 600;
}
.cv-pill--active:hover {
    background: #004430 !important;
    border-color: #004430 !important;
}
.cv-pill__count {
    font-size: 10px;
    background: rgba(0,0,0,0.08);
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 600;
}
.cv-pill--active .cv-pill__count {
    background: rgba(255,255,255,0.25);
}
.cv-search-form {
    display: flex;
    align-items: center;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    background: #F3F4F6;
    padding: 0 16px;
    gap: 8px;
}
.cv-search-form i { color: #aaa; font-size: 14px; flex-shrink: 0; }
.cv-search-input {
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 12px;
    width: 180px;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    color: #333;
}
.cv-search-input::placeholder { color: #aaa; }

/* ---------- Grid ---------- */
.cv-body {
    padding: 40px 80px 60px;
    background: #F7F8FA;
}
.cv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ---------- Card ---------- */
.cv-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #EBEBEB;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.25s;
}
.cv-card:hover {
    box-shadow: 0 12px 32px rgba(0,87,61,0.12);
    transform: translateY(-4px);
}
.cv-card--featured {
    border: 2px solid #91C14D;
    box-shadow: 0 8px 24px rgba(0,87,61,0.15);
}
.cv-card--featured:hover {
    box-shadow: 0 16px 36px rgba(0,87,61,0.22);
}
.cv-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #00573D, #91C14D);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    border-radius: 20px;
}
.cv-card__badge i { font-size: 10px; }
.cv-card__img-wrap {
    height: 160px;
    overflow: hidden;
    position: relative;
    background: #fff;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cv-card__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s;
}
.cv-card:hover .cv-card__img { transform: scale(1.04); }
.cv-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.cv-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
    line-height: 1.3;
}
.cv-card__title a { color: inherit; }
.cv-card__title a:hover { color: #00573D; }
.cv-card__excerpt {
    font-size: 12px;
    line-height: 1.5;
    color: #888;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cv-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #aaa;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #F3F3F3;
}
.cv-card__meta i { color: #ccc; font-size: 12px; }
.cv-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #00573D;
    margin-top: 8px;
    transition: gap 0.2s;
}
.cv-card__link:hover { gap: 10px; color: #00573D; }
.cv-card__link i { font-size: 11px; }

/* ---------- Empty ---------- */
.cv-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #888;
}
.cv-empty i { color: #ddd; margin-bottom: 16px; display: block; }
.cv-empty h3 { font-size: 20px; color: #333; margin-bottom: 8px; }
.cv-empty p { font-size: 14px; margin-bottom: 20px; }

/* ========== INTERNA / DETAIL ========== */
.cv-detail {
    padding: 40px 80px 60px;
    background: #F7F8FA;
}
.cv-detail__layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.cv-detail__main {
    flex: 1;
    min-width: 0;
}
.cv-detail__sidebar {
    width: 340px;
    flex-shrink: 0;
    position: sticky;
    top: 140px;
}

/* Detail: Header */
.cv-detail__header {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #EBEBEB;
    overflow: hidden;
    margin-bottom: 24px;
}
.cv-detail__cover {
    display: block;
    width: 100%;
    max-height: 220px;
    height: auto;
    object-fit: contain;
    padding: 24px;
    background: #fff;
    box-sizing: border-box;
}
.cv-detail__cover--banner {
    max-height: none;
    height: auto;
    aspect-ratio: 1705 / 450;
    object-fit: cover;
    padding: 0;
}
.cv-detail__info {
    padding: 28px 32px;
}
.cv-detail__cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00573D;
    margin-bottom: 8px;
    display: inline-block;
}
.cv-detail__title {
    font-size: 28px;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 8px;
    line-height: 1.2;
}
.cv-detail__loc {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cv-detail__loc i { color: #aaa; }

/* Detail: Content */
.cv-detail__content {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #EBEBEB;
    padding: 32px;
    margin-bottom: 24px;
}
.cv-detail__content h2,
.cv-detail__content h3,
.cv-detail__content h4 {
    color: #00573D;
    margin-top: 24px;
    margin-bottom: 12px;
}
.cv-detail__content h2:first-child,
.cv-detail__content h3:first-child { margin-top: 0; }
.cv-detail__content p {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 16px;
}
.cv-detail__content ul, .cv-detail__content ol {
    padding-left: 20px;
    margin-bottom: 16px;
}
.cv-detail__content li {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 6px;
}
.cv-detail__content img {
    border-radius: 8px;
    margin: 16px 0;
}

/* Detail: Gallery */
.cv-detail__gallery {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #EBEBEB;
    padding: 24px;
}
.cv-detail__gallery-title {
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 16px;
}
.cv-detail__gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.cv-detail__gallery-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.cv-detail__gallery-img:hover { opacity: 0.85; }

/* Sidebar: Contact Card */
.cv-sidebar-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #EBEBEB;
    overflow: hidden;
    margin-bottom: 20px;
}
.cv-sidebar-card__header {
    padding: 20px 24px;
    border-bottom: 1px solid #F0F0F0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cv-sidebar-card__dot {
    width: 4px;
    height: 18px;
    background: #00573D;
    border-radius: 2px;
}
.cv-sidebar-card__title {
    font-size: 13px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
}
.cv-sidebar-card__body {
    padding: 20px 24px;
}

/* Sidebar: Social Links */
.cv-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cv-social__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #F7F8FA;
    transition: background 0.15s;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}
.cv-social__link:hover { background: #f0fdf4; color: #00573D; }
.cv-social__link i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}
.cv-social__link--whatsapp i { background: #25D366; }
.cv-social__link--instagram i { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.cv-social__link--facebook i { background: #1877F2; }
.cv-social__link--twitter i { background: #1DA1F2; }
.cv-social__link--site i { background: #00573D; }

/* Sidebar: Related Convenios */
.cv-related {
    display: flex;
    flex-direction: column;
}
.cv-related__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F3F3F3;
}
.cv-related__item:last-child { border-bottom: none; }
.cv-related__img {
    width: 56px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f0f0f0;
}
.cv-related__info { flex: 1; min-width: 0; }
.cv-related__title {
    font-size: 12px;
    font-weight: 600;
    color: #1A1A1A;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cv-related__cat {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #00573D;
}

/* Back link */
.cv-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #00573D;
    margin-bottom: 24px;
    transition: gap 0.2s;
}
.cv-back:hover { gap: 12px; color: #004430; }
.cv-back i { font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .cv-hero__content { padding: 0 30px; }
    .cv-filters { padding: 16px 30px; }
    .cv-body { padding: 30px; }
    .cv-detail { padding: 30px; }
    .cv-grid { grid-template-columns: repeat(3, 1fr); }
    .cv-detail__sidebar { width: 300px; }
}
@media (max-width: 991px) {
    .cv-hero { height: auto; min-height: 240px; }
    .cv-hero__breadcrumb { padding-top: 60px; }
    .cv-hero__title { font-size: 32px; }
    .cv-hero__icon--main, .cv-hero__icon--sec { display: none; }
    .cv-grid { grid-template-columns: repeat(3, 1fr); }
    .cv-detail__layout { flex-direction: column; }
    .cv-detail__sidebar { width: 100%; position: static; }
}
@media (max-width: 767px) {
    .cv-filters { top: 64px; padding: 12px 16px; }
    .cv-hero__content { padding: 0 20px; }
    .cv-hero__breadcrumb { padding-top: 40px; }
    .cv-hero__title { font-size: 28px; }
    .cv-hero__subtitle { font-size: 13px; margin-left: 0; }
    .cv-body { padding: 20px 16px; }
    .cv-detail { padding: 20px 16px; }
    .cv-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .cv-filters__bar { flex-direction: column; align-items: flex-start; }
    .cv-search-form { width: 100%; }
    .cv-search-input { width: 100%; }
    .cv-detail__gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .cv-grid { grid-template-columns: 1fr; }
    .cv-hero__title { font-size: 24px; }
}
