/* ============================================================================
   hUnity4All · Sistema de diseño (brief Romell, nov-2026)
   Colores: verde corporativo #087C35 · verde secundario #50A936 · verde lima #A6D96A
            verde pastel #DFF2E4 · verde oscuro #17372A · gris verdoso #F5F8F5
            fucsia #E91E8A (solo acento) · blanco #FFFFFF
   Tipografía: Manrope (títulos) + Inter (texto). Iconos: Lucide outline 2 px.
   ============================================================================ */
:root {
    --green: #087C35;
    --green-2: #50A936;
    --lime: #A6D96A;
    --pastel: #DFF2E4;
    --dark: #17372A;
    --gray-green: #F5F8F5;
    --fuchsia: #E91E8A;
    --white: #FFFFFF;

    --text: #17372A;
    --text-soft: #4B5B52;
    --text-muted: #6B7A72;
    --border: #DCE9E0;
    --border-soft: #EAF1EC;

    /* Alias heredados (los usan las páginas interiores) */
    --primary-color: var(--green);
    --primary-dark: #066A2D;
    --text-color: var(--text);
    --background-color: var(--white);
    --white-color: #FFFFFF;
    --border-radius: 16px;

    --font-head: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --shadow-xs: 0 1px 2px rgba(23, 55, 42, 0.05);
    --shadow-sm: 0 4px 14px rgba(23, 55, 42, 0.07);
    --shadow-md: 0 10px 28px rgba(23, 55, 42, 0.09);
    --container: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--dark);
    line-height: 1.2;
}

a { color: var(--green); text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

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

.skip-link { position: absolute; left: -999px; top: 0; background: var(--green); color: #fff; padding: 0.5rem 1rem; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Iconos Lucide: lineales, 2 px, color verde salvo que se indique lo contrario */
.lucide { width: 1.1em; height: 1.1em; stroke-width: 2; flex-shrink: 0; vertical-align: -0.15em; }

main { flex: 1; padding: 1.5rem 1.5rem 2.5rem; }
.page-home main { padding: 0 0 1rem; }

/* ==================== CABECERA ==================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 2px 12px rgba(23, 55, 42, 0.05);
}

.site-header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--dark); }
.brand-icon { width: 58px; height: 58px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.65rem; letter-spacing: -0.01em; color: var(--dark); }
.brand-tagline { font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.2em; color: var(--green-2); margin-top: 0.25rem; }

.main-nav { display: flex; align-items: center; flex: 1; gap: 1rem; min-width: 0; }

.nav-list { list-style: none; display: flex; align-items: center; gap: 0.15rem; margin: 0 auto; }
.nav-list li { position: relative; }

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--dark);
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}
.nav-link .lucide { width: 1.05rem; height: 1.05rem; color: var(--green); }
.nav-link:hover { background: var(--gray-green); color: var(--green); }
.nav-link.active { color: var(--green); }
.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: -0.15rem;
    height: 3px;
    border-radius: 3px;
    background: var(--green);
}
.nav-link .chevron { width: 0.9rem; height: 0.9rem; color: var(--text-muted); margin-left: -0.1rem; transition: transform 0.2s; }
.has-dropdown.open .chevron { transform: rotate(180deg); }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    min-width: 250px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    display: none;
    z-index: 60;
}
.has-dropdown.open .dropdown-menu { display: block; }
@media (hover: hover) and (min-width: 993px) {
    .has-dropdown:hover .dropdown-menu { display: block; }
}
.dropdown-menu a { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; border-radius: 10px; color: var(--dark); font-size: 0.92rem; }
.dropdown-menu a:hover { background: var(--pastel); color: var(--green); }
.dropdown-menu .lucide { color: var(--green); width: 1rem; height: 1rem; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.header-actions .btn { white-space: nowrap; padding: 0.6rem 1.1rem; font-size: 0.9rem; }

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    background: none;
    border: 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.icon-btn .lucide { width: 1.2rem; height: 1.2rem; }
.icon-btn:hover { background: var(--gray-green); color: var(--green); }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--dark);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}
.nav-toggle .lucide { width: 1.4rem; height: 1.4rem; }
.nav-toggle .nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: block; }

/* ==================== BOTONES ==================== */
.btn,
.btn-primary,
.btn-outline,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn .lucide { width: 1rem; height: 1rem; }

.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(8, 124, 53, 0.22); }
.btn-primary:disabled,
.btn-primary[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline,
.btn-secondary { background: #fff; color: var(--dark); border-color: #CFE3D5; }
.btn-outline:hover,
.btn-secondary:hover { border-color: var(--green); color: var(--green); background: #fff; }

.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; }
.ml-2 { margin-left: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.provider-submit-tooltip-wrapper { display: block; width: 100%; }

/* ==================== PORTADA: HERO ==================== */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    min-height: 300px;
    margin-top: 1.5rem;
    border-radius: 26px;
    overflow: hidden;
    background-color: #F3F9F5;
    background-image:
        linear-gradient(90deg, #F3F9F5 0%, #F3F9F5 38%, rgba(243, 249, 245, 0.85) 47%, rgba(243, 249, 245, 0) 60%),
        url("../images/hero.jpg");
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    isolation: isolate;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 2.25rem 0.5rem 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
}

.hero-title {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.14;
    color: var(--dark);
}
.hero-title span { color: var(--green); }

.hero-subtitle { font-size: 1rem; color: var(--text-soft); max-width: 31rem; line-height: 1.5; }

.hero-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border: 1px solid #E3EEE6;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    padding: 0.4rem 0.4rem 0.4rem 1.15rem;
    max-width: 500px;
    margin-top: 0.4rem;
}
.hero-search-icon { color: var(--text-muted); width: 1.25rem; height: 1.25rem; }
.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: none;
    padding: 0.6rem 0.6rem;
    font-size: 1rem;
    color: var(--text);
}
.hero-search input::placeholder { color: #8A978F; }
.hero-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.hero-search-btn { padding: 0.65rem 1.25rem; flex-shrink: 0; }

.hero-visual {
    position: relative;
    z-index: 1;
    min-height: 240px;
}
.hero-claim {
    position: absolute;
    right: 6%;
    top: 50%;
    transform: translateY(-50%) rotate(-9deg);
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 0.95;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45), 0 0 2px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.hero-leaf { position: absolute; z-index: 2; pointer-events: none; }
.hero-leaf-left { left: 43%; bottom: -14px; width: 58px; transform: rotate(32deg); opacity: 0.95; }
.hero-leaf-right { right: 8px; bottom: -22px; width: 64px; transform: rotate(-28deg); opacity: 0.85; }

/* ==================== PORTADA: CATEGORÍAS ==================== */
.categories { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 2.3rem; }
@media (min-width: 993px) {
    .categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
    .categories::-webkit-scrollbar { display: none; }
    .category-pill { flex-shrink: 0; }
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: #fff;
    border: 1.5px solid #CFE6D6;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.83rem;
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s, color 0.2s;
}
.category-pill .lucide { color: var(--green); width: 1rem; height: 1rem; }
.category-pill:hover { border-color: var(--green-2); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.category-pill.active { background: var(--green); border-color: var(--green); color: #fff; }
.category-pill.active .lucide { color: #fff; }

/* ==================== PORTADA: PROYECTOS ==================== */
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-title { font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 700; color: var(--green); letter-spacing: -0.01em; }
.link-more { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; color: var(--green); white-space: nowrap; }
.link-more .lucide { width: 1rem; height: 1rem; transition: transform 0.2s; }
.link-more:hover .lucide { transform: translateX(3px); }

.projects-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.project-card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--pastel); }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.45s; }
.project-card:hover .project-card-media img { transform: scale(1.04); }
.project-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--green-2); }
.project-card-placeholder .lucide { width: 2.6rem; height: 2.6rem; stroke-width: 1.5; }

.project-card-badge {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    background: var(--green);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(8, 124, 53, 0.25);
}

.fav-btn {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #fff;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 2;
    transition: transform 0.2s, color 0.2s;
}
.fav-btn .lucide { width: 1.15rem; height: 1.15rem; }
.fav-btn:hover { transform: scale(1.08); color: var(--fuchsia); }
.fav-btn.active { color: var(--fuchsia); }
.fav-btn.active .lucide { fill: var(--fuchsia); }

.project-card-body { padding: 1.05rem 1.15rem 1.15rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.project-card-title { font-size: 1.12rem; font-weight: 600; line-height: 1.3; }
.project-card-title a { color: var(--dark); }
.project-card-title a:hover { color: var(--green); }
.project-card-desc { font-size: 0.9rem; color: var(--text-soft); flex: 1; }

.project-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }
.project-card-meta span { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; }
.project-card-meta span + span { border-left: 1px solid #DCE7DF; padding-left: 0.75rem; }
.project-card-meta .lucide { color: var(--green); width: 0.95rem; height: 0.95rem; }

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    background: var(--gray-green);
    border-radius: 18px;
    color: var(--text-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}
.no-results .lucide { width: 2.4rem; height: 2.4rem; color: var(--green-2); stroke-width: 1.5; }

/* ==================== PORTADA: COMUNIDAD (EMPRESAS QUE MÁS COLABORAN) ==================== */
.community-section { margin-top: 3rem; }
.community-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 20px; box-shadow: var(--shadow-sm); padding: 1.25rem 1.5rem 1.4rem; }
.community-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.9rem; }
.community-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 2rem; }
.community-item { display: grid; grid-template-columns: 2.4rem 44px minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.6rem 0.5rem; border-radius: 12px; transition: background 0.2s; }
.community-item:hover { background: var(--gray-green); }
.community-pos { font-family: var(--font-head); font-weight: 800; color: var(--green-2); font-size: 1rem; }
.community-item.top-3 .community-pos { color: var(--green); }
.community-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--border-soft); }
.community-logo-placeholder { display: inline-flex; align-items: center; justify-content: center; color: var(--green-2); background: var(--pastel); border-color: transparent; }
.community-main { min-width: 0; }
.community-name { display: block; font-weight: 600; color: var(--dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-name:hover { color: var(--green); }
.community-bar { height: 6px; border-radius: 999px; background: #E6F0E9; margin-top: 0.4rem; overflow: hidden; }
.community-bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--lime), var(--green)); transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.community-total { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; font-weight: 700; color: var(--green); font-size: 0.9rem; white-space: nowrap; }
.community-volunteers { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; color: var(--text-muted); font-size: 0.82rem; }
.community-volunteers .lucide { width: 0.95rem; height: 0.95rem; color: var(--green-2); }

/* ==================== PORTADA: FRANJA DE VALORES ==================== */
.values-strip { position: relative; margin: 3rem 0 3.5rem; background: var(--pastel); border-radius: 22px; padding: 1.6rem 2rem; overflow: hidden; }
.values-strip ul { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; position: relative; z-index: 1; }
.values-strip li { display: flex; align-items: center; gap: 0.95rem; padding: 0.3rem 1rem; font-size: 0.95rem; font-weight: 500; line-height: 1.3; color: var(--dark); }
.values-strip li + li { border-left: 1px solid rgba(8, 124, 53, 0.18); }
.values-strip .lucide { width: 2.1rem; height: 2.1rem; color: var(--green); stroke-width: 1.8; }
.values-leaf { position: absolute; pointer-events: none; }
.values-leaf-1 { right: 54px; bottom: -18px; width: 70px; transform: rotate(-20deg); }
.values-leaf-2 { right: 10px; bottom: -10px; width: 56px; transform: rotate(25deg); opacity: 0.9; }

/* ==================== MENSAJES FLASH ==================== */
.flash-messages-container { position: fixed; top: 100px; right: 20px; z-index: 1000; width: 320px; max-width: calc(100vw - 2rem); }
.alert { padding: 1rem 1.1rem; margin-bottom: 1rem; border-radius: 12px; color: #fff; box-shadow: var(--shadow-md); font-size: 0.95rem; }
.alert-success { background-color: var(--green); }
.alert-danger { background-color: #dc3545; }
.alert-warning { background-color: #f5b400; color: var(--dark); }
.alert-info { background-color: #50A936; }

/* ==================== PIE DE PÁGINA ==================== */
.site-footer { margin-top: auto; background: var(--gray-green); border-top: 1px solid var(--border-soft); padding: 3rem 0 1.25rem; color: var(--text-soft); }
.site-footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2rem; align-items: start; }
.site-footer-brand p { margin-top: 1rem; max-width: 400px; line-height: 1.55; font-size: 0.95rem; }
.site-footer-nav h4 { font-size: 0.95rem; font-weight: 700; color: var(--dark); margin-bottom: 0.85rem; }
.site-footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.site-footer-nav a { color: var(--text-soft); font-size: 0.95rem; transition: color 0.2s; }
.site-footer-nav a:hover { color: var(--green); }
.site-footer-bottom { max-width: var(--container); margin: 2rem auto 0; padding: 1rem 24px 0; border-top: 1px solid var(--border-soft); font-size: 0.85rem; color: var(--text-muted); text-align: center; }

/* ==================== RESPONSIVE: CABECERA Y PORTADA ==================== */
@media (max-width: 1180px) {
    .nav-link { padding: 0.55rem 0.6rem; font-size: 0.9rem; }
    .brand-name { font-size: 1.45rem; }
    .brand-icon { width: 50px; height: 50px; }
}

@media (max-width: 1100px) {
    .projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .site-header-inner { min-height: 72px; gap: 0.75rem; }
    .nav-toggle { display: inline-flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        background: #fff;
        border-bottom: 1px solid var(--border-soft);
        box-shadow: var(--shadow-md);
        padding: 0.75rem 1rem 1.25rem;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }
    .main-nav.open { display: flex; }
    .nav-list { flex-direction: column; align-items: stretch; margin: 0; gap: 0.1rem; }
    .nav-link { width: 100%; justify-content: flex-start; border-radius: 10px; padding: 0.75rem 0.9rem; font-size: 1rem; }
    .nav-link.active::after { display: none; }
    .nav-link.active { background: var(--pastel); }
    .nav-link .chevron { margin-left: auto; }
    .dropdown-menu { position: static; box-shadow: none; border: 0; padding: 0.1rem 0 0.4rem 1.6rem; min-width: 0; }
    .header-actions { margin-left: 0; flex-wrap: wrap; padding-top: 0.75rem; border-top: 1px solid var(--border-soft); }
    .header-actions .btn { flex: 1; }
    .header-actions .icon-btn { display: none; }

    .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; margin-top: 1rem; }
    .hero-content { padding: 2.25rem 1.5rem 2rem; }
    .hero {
        background-image:
            linear-gradient(180deg, rgba(243, 249, 245, 0) 0%, rgba(243, 249, 245, 0) 32%, #F3F9F5 46%, #F3F9F5 100%),
            url("../images/hero.jpg");
        background-size: 100% auto, cover;
        background-position: top center;
    }
    .hero-visual { min-height: 230px; order: -1; }
    .hero-claim { right: 8%; top: 42%; }
    .hero-leaf-left { display: none; }
    .values-strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .values-strip li:nth-child(3) { border-left: 0; }
    .community-list { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
    .hero-title { font-size: clamp(1.9rem, 7vw, 2.2rem); }
    .hero-subtitle { font-size: 0.95rem; }
    .section-title { font-size: 1.5rem; }
}

@media (max-width: 600px) {
    main { padding: 1rem 1rem 2rem; }
    .page-home main { padding: 0 0 1rem; }
    .container { padding: 0 16px; }
    .projects-grid { grid-template-columns: 1fr; }
    .hero { border-radius: 20px; }
    .hero-content { padding: 1.75rem 1.1rem 1.6rem; }
    .hero-search { padding-left: 0.9rem; }
    .hero-search-btn span { display: none; }
    .hero-claim { font-size: 1.7rem; }
    .categories { gap: 0.5rem; margin: 1.2rem 0 1.8rem; }
    .category-pill { padding: 0.5rem 0.9rem; font-size: 0.86rem; }
    .values-strip { padding: 1.2rem 1rem; }
    .values-strip ul { grid-template-columns: 1fr; gap: 0.4rem; }
    .values-strip li { border-left: 0 !important; padding: 0.5rem 0.25rem; }
    .values-leaf { display: none; }
    .site-footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .site-footer { padding-top: 2rem; }
    .brand-name { font-size: 1.3rem; }
    .brand-tagline { font-size: 0.7rem; }
    .brand-icon { width: 44px; height: 44px; }
}

/* ==================== PÁGINAS INTERIORES: AJUSTES AL NUEVO ESTILO ==================== */
/* (las reglas específicas de cada página vienen a continuación; aquí sólo las
   adaptaciones generales a la identidad hUnity4All) */
.auth-select-header { color: var(--dark); }
.auth-select-header p { color: var(--text-soft); }
.auth-select-option:hover { border-color: var(--green-2); }
.card-footer small, .card-footer a { font-size: 0.95rem; }
.content-box h1, .content-box h2 { font-weight: 700; }
.legal-card h2, .ranking-card-header h2, .company-profile-card-header h3 { font-weight: 700; }

/* ============================================================================
   PÁGINAS INTERIORES (ficha de proyecto, perfiles, registro, legales, ranking)
   ============================================================================ */
/* --- CONTENIDO PARA PÁGINAS INTERIORES (Formularios, Dashboards, etc.) --- */
.content-box {
    max-width: 800px;
    margin: 2rem auto;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(23, 55, 42, 0.10);
}

.content-box h1, .content-box h2 {
    margin-bottom: 1.5rem;
}

/* --- FORMULARIOS --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control, .form-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(8, 124, 53, 0.2);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    margin-top: 0.35rem;
    color: #dc3545;
    font-size: 0.85rem;
}

.password-field-wrapper {
    position: relative;
}

.password-with-toggle {
    padding-right: 2.8rem;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0.65rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
}

.password-toggle-btn:hover {
    color: var(--primary-color);
}


/* ==================== FICHA DE PROYECTO ==================== */
.project-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}

.project-detail-hero {
    position: relative;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(23, 55, 42, 0.10);
}

.project-detail-hero-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.project-detail-hero-placeholder {
    width: 100%;
    height: 420px;
    background: linear-gradient(135deg, #F5F8F5 0%, #DFF2E4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-detail-hero-placeholder i {
    font-size: 5rem;
    color: #ccc;
}

.project-detail-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: white;
}

.project-detail-hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .project-detail-page {
        padding: 1rem;
    }
    .project-detail-hero-image,
    .project-detail-hero-placeholder {
        height: 280px;
    }
    .project-detail-hero-title {
        font-size: 1.5rem;
    }
    .project-detail-meta {
        padding: 1rem;
        gap: 1rem;
    }
    .project-detail-section {
        padding: 1.25rem 1rem;
    }
    .project-detail-sidebar {
        position: static;
    }
}

.project-detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 992px) {
    .project-detail-layout {
        grid-template-columns: 1fr;
    }
}

.project-detail-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-detail-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(23, 55, 42, 0.08);
    overflow: hidden;
}

.project-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: var(--white-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 15px rgba(23, 55, 42, 0.08);
    margin-top: -1px;
    margin-bottom: 1.5rem;
}

.project-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.project-detail-meta-item i {
    color: #50A936;
    width: 20px;
    text-align: center;
}

.project-detail-meta-item a {
    color: inherit;
    font-weight: 600;
    transition: color 0.2s;
}

.project-detail-meta-item a:hover {
    color: var(--primary-color);
}

.project-detail-section {
    padding: 1.75rem 2rem;
}

.project-detail-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.project-detail-section-header i {
    color: #50A936;
}

.project-detail-section-content {
    color: #555;
    line-height: 1.7;
    white-space: pre-line;
}

.project-detail-contact-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, rgba(8, 124, 53, 0.08) 0%, rgba(8, 124, 53, 0.04) 100%);
    border-radius: var(--border-radius);
    margin: 0 0 1.5rem;
}

.project-detail-contact-bar .btn-whatsapp {
    background: #25D366 !important;
    border: none;
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-detail-contact-bar .btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.project-detail-contact-bar .btn-email {
    background: var(--primary-color) !important;
    border: none;
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-detail-contact-bar .btn-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 124, 53, 0.4);
}

/* Sidebar sticky */
.project-detail-sidebar {
    position: sticky;
    top: 100px;
}

.project-detail-sidebar-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(23, 55, 42, 0.10);
    overflow: hidden;
}

.project-detail-sidebar-header {
    background: linear-gradient(135deg, #A6D96A 0%, #50A936 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.project-detail-sidebar-header i {
    margin-right: 0.5rem;
    color: #EAF7EE;
}

.project-detail-sidebar-body {
    padding: 1.5rem;
}

.project-detail-form .form-group {
    margin-bottom: 1rem;
}

.project-detail-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: #555;
}

.project-detail-form input,
.project-detail-form textarea,
.project-detail-form select {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    font-family: inherit;
}

.project-detail-form input:focus,
.project-detail-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(8, 124, 53, 0.15);
}

.project-detail-form .btn-submit {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.project-detail-form .btn-submit:hover {
    background: #066A2D;
    transform: translateY(-1px);
}

.amount-input-group {
    display: flex;
}

.amount-input-group input {
    flex: 1;
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.amount-suffix {
    padding: 0.65rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
}

/* Logros / Updates */
.project-update-card {
    background: #fafafa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border-left: 4px solid var(--primary-color);
}

.project-update-card:last-child {
    margin-bottom: 0;
}

.project-update-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-update-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
}

.project-update-date {
    font-size: 0.85rem;
    color: #888;
}

.project-update-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-update-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-update-badge.badge-info {
    background: rgba(23, 162, 184, 0.15);
    color: #0c5460;
}

.project-update-badge.badge-success {
    background: rgba(40, 167, 69, 0.15);
    color: #155724;
}

/* Empresas colaboradoras en update */
.project-update-companies {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.project-update-companies-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #555;
}

.project-update-company-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 5px rgba(23, 55, 42, 0.06);
}

.project-update-company-card:last-child {
    margin-bottom: 0;
}

/* Colaboraciones confirmadas */
.collab-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid #e8e8e8;
}

.collab-card:last-child {
    margin-bottom: 0;
}

.collab-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.collab-amount {
    font-weight: 700;
    font-size: 1.15rem;
    color: #28a745;
}

/* Reseñas */
.review-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid #eee;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.review-stars {
    color: #ffc107;
}

.review-stars .fa-star.text-muted {
    color: #ddd;
}

/* Estado vacío */
.project-detail-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #888;
}

.project-detail-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}


/* ==================== PERFIL EMPRESA ==================== */
.company-profile-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.company-profile-hero {
    background: linear-gradient(135deg, rgba(166, 217, 106, 0.95) 0%, rgba(8, 124, 53, 0.95) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 12px 35px rgba(23, 55, 42, 0.10);
    margin-bottom: 1.5rem;
    display: grid;
    gap: 1.2rem;
}

.company-profile-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-profile-logo,
.company-profile-logo-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 14px;
    flex-shrink: 0;
}

.company-profile-logo {
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: #fff;
}

.company-profile-logo-placeholder {
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
}

.company-profile-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.company-profile-subtitle {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.86);
}

.company-profile-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.9rem;
}

.company-metric-card {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    backdrop-filter: blur(6px);
}

.company-metric-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

.company-metric-value {
    display: block;
    margin-top: 0.4rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.company-metric-value-success {
    color: #d6ffd0;
}

.company-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.company-profile-main,
.company-profile-side {
    display: grid;
    gap: 1.2rem;
}

.company-profile-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(23, 55, 42, 0.10);
    overflow: hidden;
}

.company-profile-card-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.company-profile-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.company-profile-card-header i {
    color: var(--primary-color);
}

.company-profile-description,
.company-profile-empty-text {
    padding: 1rem 1.25rem 1.2rem;
    line-height: 1.7;
    color: #555;
}

.company-profile-empty-text {
    color: #888;
}

.company-donations-list {
    padding: 0.6rem 1.25rem 1.2rem;
}

.company-donation-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid #efefef;
}

.company-donation-item:last-child {
    border-bottom: none;
}

.company-donation-main {
    min-width: 0;
}

.company-donation-project {
    font-weight: 600;
}

.company-donation-provider {
    margin: 0.25rem 0 0;
    color: #777;
    font-size: 0.9rem;
}

.company-donation-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.company-donation-amount {
    color: #087C35;
    font-size: 1rem;
}

.company-donation-date {
    color: #6f6f6f;
    white-space: nowrap;
}

.company-donation-date i {
    color: #087C35;
}

.company-contact-list {
    list-style: none;
    padding: 0.8rem 1.25rem 1.2rem;
    margin: 0;
}

.company-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.5rem 0;
    color: #555;
}

.company-contact-list li i {
    width: 18px;
    margin-top: 0.25rem;
    color: var(--primary-color);
}

.company-whatsapp-link {
    color: #25D366;
    font-weight: 600;
}

.company-whatsapp-link:hover {
    color: #1fa855;
}

.company-profile-empty-state {
    text-align: center;
    color: #7b7b7b;
    padding: 2.1rem 1rem 2.2rem;
}

.company-profile-empty-state i {
    font-size: 2.2rem;
    margin-bottom: 0.7rem;
    color: #c7c7c7;
}

@media (max-width: 992px) {
    .company-profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .company-profile-page {
        padding: 1rem 0.5rem 2rem;
    }

    .company-profile-title {
        font-size: 1.45rem;
    }

    .company-profile-identity {
        align-items: flex-start;
    }

    .company-donation-item {
        flex-direction: column;
    }

    .company-donation-meta {
        text-align: left;
        align-items: flex-start;
    }
}

/* ==================== REGISTRO / AUTH ==================== */
.auth-select-page {
    max-width: 900px;
    margin: 2rem auto;
}

.auth-select-header {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
}

.auth-select-header h1 {
    margin-bottom: 0.35rem;
}

.auth-select-header p {
    color: rgba(255, 255, 255, 0.85);
}

.auth-select-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.auth-select-option {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.25rem 1.2rem;
    border: 1px solid #ececec;
    box-shadow: 0 6px 20px rgba(23, 55, 42, 0.10);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    color: #333;
}

.auth-select-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(23, 55, 42, 0.10);
    border-color: rgba(8, 124, 53, 0.4);
}

.auth-select-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(8, 124, 53, 0.1);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.auth-select-option h3 {
    margin-bottom: 0.5rem;
}

.auth-select-option p {
    color: #666;
    margin-bottom: 1rem;
}

.auth-select-option span {
    font-weight: 600;
}

.auth-register-page {
    max-width: 760px;
    margin: 2rem auto;
}

.auth-register-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(23, 55, 42, 0.10);
}

.auth-register-header {
    padding: 1.4rem 1.6rem 1.2rem;
    background: linear-gradient(135deg, rgba(8, 124, 53, 0.95), rgba(80, 169, 54, 0.95));
    color: #fff;
}

.auth-register-header h2 {
    margin: 0.45rem 0 0.35rem;
}

.auth-register-header p {
    margin: 0;
    color: #ffffff;
}

.auth-register-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-register-body {
    padding: 1.3rem 1.6rem 0.5rem;
}

.auth-form-section {
    background: #fafafa;
    border: 1px solid #efefef;
    border-radius: 12px;
    padding: 1rem 1rem 0.25rem;
    margin-bottom: 1rem;
}

.auth-form-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form-section h4 i {
    color: var(--primary-color);
}

.auth-submit-group {
    margin-top: 0.5rem;
}

.auth-submit-btn {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-weight: 600;
}

.auth-register-footer {
    text-align: center;
    padding: 1rem 1.2rem 1.3rem;
    border-top: 1px solid #f0f0f0;
    color: #666;
}

.auth-register-footer a {
    font-weight: 600;
}

@media (max-width: 768px) {
    .auth-select-grid {
        grid-template-columns: 1fr;
    }

    .auth-register-page {
        margin: 1rem auto;
    }

    .auth-register-header,
    .auth-register-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}


/* ==================== PÁGINAS LEGALES / SOBRE NOSOTROS ==================== */
.legal-page {
    max-width: 960px;
    margin: 1.5rem auto 2.5rem;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.legal-hero {
    background: linear-gradient(135deg, rgba(8, 124, 53, 0.95) 0%, rgba(80, 169, 54, 0.95) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 1.8rem 1.6rem;
    box-shadow: 0 14px 34px rgba(23, 55, 42, 0.10);
    text-align: center;
}

.legal-hero h1 {
    margin: 0.6rem 0 0.5rem;
    font-size: 1.9rem;
}

.legal-hero p {
    margin: 0 auto;
    max-width: 640px;
    color: #ffffff;
}

.legal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.legal-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.4rem 1.5rem;
    box-shadow: 0 6px 20px rgba(23, 55, 42, 0.10);
    color: #444;
    line-height: 1.6;
}

.legal-card h2 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.85rem;
    color: #333;
    font-size: 1.2rem;
}

.legal-card h2 i {
    color: var(--primary-color);
}

.legal-card p {
    margin: 0 0 0.75rem;
}

.legal-card p:last-child {
    margin-bottom: 0;
}

.legal-list,
.legal-values {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.legal-card-highlight {
    border: 1px solid rgba(8, 124, 53, 0.25);
    background: linear-gradient(135deg, rgba(166, 217, 106, 0.12), rgba(8, 124, 53, 0.08));
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 576px) {
    .legal-hero {
        padding: 1.4rem 1.1rem;
    }

    .legal-hero h1 {
        font-size: 1.5rem;
    }

    .legal-card {
        padding: 1.1rem 1rem;
    }
}

/* ==================== RANKING DE EMPRESAS ==================== */
.ranking-page {
    max-width: 1100px;
    margin: 1.5rem auto 2.5rem;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ranking-hero {
    background: linear-gradient(135deg, rgba(166, 217, 106, 0.95) 0%, rgba(8, 124, 53, 0.95) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 1.8rem 1.6rem;
    box-shadow: 0 14px 34px rgba(23, 55, 42, 0.10);
    text-align: center;
}

.ranking-hero h1 {
    margin: 0.6rem 0 0.4rem;
    font-size: 1.9rem;
}

.ranking-hero p {
    margin: 0 auto;
    max-width: 640px;
    color: #ffffff;
}

.ranking-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ranking-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.podium-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.4rem 1.1rem 1.2rem;
    box-shadow: 0 8px 22px rgba(23, 55, 42, 0.10);
    text-align: center;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    position: relative;
}

.podium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(23, 55, 42, 0.10);
}

.podium-pos-1 {
    border-color: #f5b400;
    padding-top: 1.7rem;
    padding-bottom: 1.5rem;
    background: linear-gradient(180deg, #fff7d6 0%, #ffffff 60%);
}

.podium-pos-2 {
    border-color: #c0c4cc;
    background: linear-gradient(180deg, #f1f3f6 0%, #ffffff 60%);
}

.podium-pos-3 {
    border-color: #d59159;
    background: linear-gradient(180deg, #fbe7d4 0%, #ffffff 60%);
}

.podium-medal {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 0.55rem;
}

.podium-medal i {
    font-size: 1.7rem;
}

.podium-pos-1 .podium-medal i {
    color: #f5b400;
}

.podium-pos-2 .podium-medal i {
    color: #9aa0a6;
}

.podium-pos-3 .podium-medal i {
    color: #c97a3b;
}

.podium-medal span {
    font-weight: 700;
    color: #555;
}

.podium-name {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: #222;
    word-break: break-word;
}

.podium-amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: #087C35;
    margin-bottom: 0.35rem;
}

.podium-meta {
    color: #777;
    font-size: 0.88rem;
}

.podium-meta i {
    color: var(--primary-color);
    margin-right: 0.25rem;
}

.ranking-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(23, 55, 42, 0.10);
    overflow: hidden;
}

.ranking-card-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.ranking-card-header h2 {
    margin: 0;
    font-size: 1.1rem;
    flex: 1;
}

.ranking-card-header i {
    color: var(--primary-color);
}

.ranking-card-badge {
    background: rgba(8, 124, 53, 0.12);
    color: #087C35;
    font-weight: 700;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.ranking-table-wrapper {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    color: #444;
}

.ranking-table th {
    background: #fafafa;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #666;
}

.ranking-table tbody tr:hover {
    background: #fafafa;
}

.ranking-col-pos {
    width: 60px;
}

.ranking-col-count {
    width: 110px;
    text-align: center;
}

.ranking-col-amount {
    width: 140px;
    text-align: right;
}

.ranking-col-bar {
    width: 30%;
}

.ranking-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #ececec;
    color: #555;
    font-weight: 700;
}

.ranking-pos-top {
    background: linear-gradient(135deg, #f5b400, #ff7a00);
    color: #fff;
}

.ranking-company-link {
    color: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ranking-company-link i {
    color: #087C35;
}

.ranking-company-link:hover {
    color: #087C35;
}

.ranking-bar-track {
    background: #E6F0E9;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.ranking-bar-fill {
    background: linear-gradient(90deg, #A6D96A, #087C35);
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.ranking-bar-fill-podium {
    background: linear-gradient(90deg, #ffb700, #ff7a00);
}

.ranking-empty-state {
    text-align: center;
    color: #7b7b7b;
    padding: 2.4rem 1rem;
}

.ranking-empty-state i {
    font-size: 2.4rem;
    margin-bottom: 0.7rem;
    color: #c7c7c7;
}

@media (max-width: 768px) {
    .ranking-podium {
        grid-template-columns: 1fr;
    }

    .ranking-col-bar {
        display: none;
    }

    .ranking-col-amount,
    .ranking-col-count {
        width: auto;
    }
}


/* Letras de formularios y cajas de contenido: más oscuras y legibles */
.content-box,
.content-box p,
.content-box label,
.content-box .form-group label {
    color: #1f1f1f;
}
.form-group label {
    font-weight: 600;
}
.content-box h1,
.content-box h2 {
    color: #111;
}


/* Ranking en móvil: sin columna "Colaboraciones" ni barra para que la tabla quepa sin scroll */
@media (max-width: 640px) {
    /* aprovecha el ancho: main tiene 2rem de padding lateral */
    .ranking-page {
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 0 0.25rem;
    }
    .ranking-table th:nth-child(3),
    .ranking-table td:nth-child(3),
    .ranking-table th:nth-child(6),
    .ranking-table td:nth-child(6) {
        display: none;
    }
    .ranking-table th,
    .ranking-table td {
        padding: 0.7rem 0.4rem;
        font-size: 0.85rem;
    }
    .ranking-table th {
        font-size: 0.68rem;
        letter-spacing: 0;
    }
    .ranking-table .ranking-col-pos,
    .ranking-table .ranking-col-amount,
    .ranking-table .ranking-col-count {
        width: auto;
    }
    .ranking-table .ranking-col-amount strong {
        white-space: nowrap;
    }
    .ranking-table .ranking-company-link {
        gap: 0.3rem;
    }
    .ranking-table .ranking-company-link img {
        width: 34px !important;
        height: 34px !important;
        margin-right: 0 !important;
    }
    .ranking-table .ranking-pos {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }
    .ranking-table th,
    .ranking-table td {
        padding-left: 0.3rem;
        padding-right: 0.3rem;
    }
}
