/* ========================================
   HOME PAGE
   ======================================== */

/* ---- Variables ---- */
:root {
    --home-primary:       #1a2f23;
    --home-primary-light: #2d4a3a;
    --home-accent:        #c9a227;
    --home-accent-light:  #e6c453;
    --home-text-dark:     #1a1a1a;
    --home-text-light:    #f5f5f5;
    --home-overlay:       rgba(26, 47, 35, 0.75);
}

/* ---- Hero fullscreen ---- */
.home-hero {
    position: relative;
    min-height: 100vh; /* JS ajusta esto al alto real disponible */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--home-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.home-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(26,47,35,0.85) 0%,
        rgba(26,47,35,0.70) 40%,
        rgba(26,47,35,0.60) 100%
    );
    z-index: 1;
}

/* ---- Noticias ticker (arriba) ---- */
.noticias-ticker-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 14px 0;
    overflow: hidden;
    z-index: 4;
}

.noticias-ticker-track {
    display: flex;
    animation: tickerNoticiasTop 100s linear infinite;
    width: max-content;
}
.noticias-ticker-track:hover { animation-play-state: paused; }

.noticia-ticker-item {
    color: var(--home-text-light);
    text-decoration: none;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
    padding: 0 15px;
    transition: color .3s;
}
.noticia-ticker-item:hover { color: var(--home-accent); text-decoration: none; }

.noticia-separator {
    color: var(--home-accent);
    padding: 0 10px;
    font-size: 1rem;
}

@keyframes tickerNoticiasTop {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Socios ticker (abajo) ---- */
.socios-ticker {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 0;
    overflow: hidden;
    z-index: 10;
}

.socios-ticker-track {
    display: flex;
    animation: tickerSocios 120s linear infinite;
    width: max-content;
}
.socios-ticker-track:hover { animation-play-state: paused; }

.socio-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 40px;
    color: var(--home-text-light);
    text-decoration: none;
    white-space: nowrap;
    font-size: 1.05rem;
    transition: color .3s;
}
.socio-ticker-item:hover { color: var(--home-accent); text-decoration: none; }
.socio-nombre { font-weight: 700; }
.socio-tel    { opacity: .7; font-size: .95rem; }

@keyframes tickerSocios {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Campos flotante ---- */
.campos-float {
    position: absolute;
    top: 70px;
    right: 30px;
    width: 340px;
    max-height: calc(100% - 130px);
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 20;
    overflow: hidden;
}

.campos-float-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--home-primary);
    color: var(--home-text-light);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}
.campos-float-header .ver-todos {
    margin-left: auto;
    color: var(--home-accent);
    text-decoration: none;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: 0;
}
.campos-float-header .ver-todos:hover { opacity: .8; }

.campos-float-slider { position: relative; overflow: hidden; }

.campo-float-card {
    display: none;
    text-decoration: none;
    color: var(--home-text-dark);
    transition: background .3s;
}
.campo-float-card.active { display: block; }
.campo-float-card:hover  {
    background: rgba(201,162,39,.08);
    text-decoration: none;
    color: var(--home-text-dark);
}

.campo-float-img {
    position: relative;
    height: 180px;
    overflow: hidden;
}
.campo-float-img img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.campo-float-ubicacion {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--home-accent);
    color: var(--home-primary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}
.campo-float-ubicacion::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--home-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}

.campo-float-superficie {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: .68rem;
    font-weight: 500;
}

.campo-float-content { padding: 14px 18px; }
.campo-float-content h4 {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px;
}
.campo-float-aptitud {
    font-size: .78rem;
    color: #666;
    margin: 0;
}

.campos-float-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px 14px;
    border-top: 1px solid rgba(0,0,0,.06);
}

.campos-nav-btn {
    width: 30px; height: 30px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    border-radius: 7px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--home-primary);
    transition: all .3s;
    display: flex; align-items: center; justify-content: center;
}
.campos-nav-btn:hover {
    background: var(--home-primary);
    color: #fff;
    border-color: var(--home-primary);
}

.campos-dots { display: flex; gap: 5px; }
.campos-dots .dot {
    width: 22px; height: 4px;
    background: rgba(0,0,0,.15);
    border-radius: 2px;
    cursor: pointer;
    transition: all .3s;
}
.campos-dots .dot.active {
    background: var(--home-primary);
    width: 30px;
}

/* ---- Hero content ---- */
.home-hero-content {
    position: relative;
    z-index: 5;
    max-width: 650px;
    padding: 0 40px;
    margin-top: 60px;
}

.home-hero-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--home-text-light);
    line-height: 1.1;
    margin: 0 0 22px;
    text-shadow: 0 4px 30px rgba(0,0,0,.3);
}

.home-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,.85);
    line-height: 1.7;
    margin: 0 0 30px;
    max-width: 500px;
}
.home-hero-subtitle strong { color: var(--home-accent); }

.home-hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 13px 26px;
    border-radius: 8px;
    font-size: .93rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s;
}
.hero-btn.primary {
    background: var(--home-text-light);
    color: var(--home-primary);
}
.hero-btn.primary:hover {
    background: var(--home-accent);
    color: var(--home-primary);
    text-decoration: none;
    transform: translateY(-2px);
}
.hero-btn.secondary {
    background: rgba(255,255,255,.15);
    color: var(--home-text-light);
    border: 1px solid rgba(255,255,255,.3);
}
.hero-btn.secondary:hover {
    background: rgba(255,255,255,.25);
    text-decoration: none;
    transform: translateY(-2px);
}
.hero-btn.outline {
    background: transparent;
    color: var(--home-text-light);
    border: 1px solid rgba(255,255,255,.4);
}
.hero-btn.outline:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.6);
    text-decoration: none;
    transform: translateY(-2px);
}

/* ---- Sección Sobre Nosotros ---- */
.section-about {
    background-color: #fafafa;
    padding-bottom: 50px;
    border-bottom: 1px solid #e8e8e8;
}
.section-about p {
    color: #616161;
    line-height: 1.8;
    margin-bottom: 20px;
}
.section-about img {
    border-radius: 6px;
    margin-top: 20px;
}

/* ---- Socios carrusel auto-scroll ---- */

.socios-carousel-wrapper {
    overflow: hidden;
    padding: 32px 0;
    background: #f5f6f6;
    position: relative;
}
.socios-carousel-wrapper::before,
.socios-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}
.socios-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #f5f6f6, transparent);
}
.socios-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #f5f6f6, transparent);
}

.socios-carousel-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: scrollSocios 40s linear infinite;
}
.socios-carousel-track:hover { animation-play-state: paused; }

@keyframes scrollSocios {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Card individual del carrusel */
.socio-card {
    width: 180px;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .3s, transform .3s;
    text-decoration: none;
    display: block;
    color: inherit;
}
.socio-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.socio-card-img-wrap {
    position: relative;
    height: 150px;
    overflow: hidden;
    background: #eee;
}
.socio-card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.socio-card:hover .socio-card-img-wrap img { transform: scale(1.05); }

.socio-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,183,235,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity .3s;
    padding: 10px;
}
.socio-card:hover .socio-card-overlay { opacity: 1; }
.socio-card-overlay p {
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    margin: 0;
}
.socio-card-overlay .btn-ver {
    background: rgba(255,255,255,.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
}

.socio-card-body {
    padding: 10px 12px;
}
.socio-card-name {
    font-weight: 700;
    font-size: 12px;
    color: #333;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.socio-card-tel {
    font-size: 11px;
    color: #888;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .campos-float { width: 300px; right: 16px; }
    .campo-float-img { height: 150px; }
}
@media (max-width: 992px) {
    .campos-float {
        position: relative;
        top: auto; right: auto;
        width: 100%; max-width: 400px;
        max-height: none;
        margin: 40px auto 0;
        border-radius: 12px;
    }
    .home-hero-content {
        text-align: center;
        margin: 0 auto;
        padding: 80px 20px 40px;
    }
    .home-hero-title { font-size: 2.5rem; }
    .home-hero-subtitle { margin-left: auto; margin-right: auto; }
    .home-hero-buttons { justify-content: center; }
}
@media (max-width: 768px) {
    .home-hero { min-height: auto; padding: 100px 0 60px; }
    .home-hero-title { font-size: 2rem; }
    .home-hero-subtitle { font-size: 1rem; }
    .hero-btn { padding: 11px 18px; font-size: .88rem; }
    .socios-ticker { position: relative; }
    .socio-card { width: calc(50vw - 24px); }
    .socios-carousel-wrapper::before,
    .socios-carousel-wrapper::after { width: 30px; }
}
@media (max-width: 480px) {
    .home-hero-title { font-size: 1.75rem; }
    .home-hero-buttons { flex-direction: column; }
    .hero-btn { width: 100%; justify-content: center; }
    .noticias-ticker-top { display: none; }
    .socio-ticker-item { font-size: .9rem; padding: 0 22px; }
}
