/* =====================================================
   🌱 AGRO-FUTURISTA — Sistema de Diseño
   Gerencia Regional de Agricultura - Áncash
   ===================================================== */

/* === Variables === */
:root {
    --agro-primary: #0e8634;
    --agro-primary-light: #21d37a;
    --agro-primary-dark: #0a5e26;
    --agro-blue: #0182c6;
    --agro-blue-dark: #03427E;
    --agro-accent: #FBC711;
    --agro-gold: #E3C528;
    --agro-text: #0f172a;
    --agro-text-muted: #64748b;
    --agro-bg: #f8fafc;
    --agro-surface: #ffffff;
    --agro-border: #e2e8f0;
    --agro-shadow: 0 4px 20px rgba(14, 134, 52, 0.08);
    --agro-shadow-lg: 0 10px 40px rgba(14, 134, 52, 0.12);
    --agro-radius: 16px;
    --agro-radius-sm: 10px;
    --agro-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Base / Tipografía === */
body {
    font-family: 'Inter', sans-serif !important;
    color: var(--agro-text);
    background-color: var(--agro-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.tituloprincipal, .titulosecundario {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--agro-text);
}

p {
    font-family: 'Inter', sans-serif;
    color: var(--agro-text-muted);
}

/* === Utilidades de color === */
.text-accent { color: var(--agro-accent) !important; }
.text-blue { color: var(--agro-blue) !important; }
.text-gold { color: var(--agro-gold) !important; }
.text-primary-agro { color: var(--agro-primary) !important; }
.text-muted-agro { color: var(--agro-text-muted) !important; }
.bg-blue { background-color: var(--agro-blue) !important; }
.bg-primary-agro { background-color: var(--agro-primary) !important; }
.bg-surface { background-color: var(--agro-surface) !important; }
.bg-soft { background-color: var(--agro-bg) !important; }

/* === Sombras === */
.shadow-agro { box-shadow: var(--agro-shadow) !important; }
.shadow-agro-lg { box-shadow: var(--agro-shadow-lg) !important; }
.shadow-none-agro { box-shadow: none !important; }

/* === Border radius === */
.rounded-agro { border-radius: var(--agro-radius) !important; }
.rounded-agro-sm { border-radius: var(--agro-radius-sm) !important; }

/* === Gradientes agro-futuristas === */
.gradient-primary {
    background: linear-gradient(135deg, #0e8634 0%, #21d37a 100%) !important;
    color: #fff !important;
}
.gradient-blue-green {
    background: linear-gradient(135deg, #0182c6 0%, #21d37a 100%) !important;
    color: #fff !important;
}
.gradient-soft {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%) !important;
}

/* ===================================================
   1) HERO / CARRUSEL PRINCIPAL
   =================================================== */
.hero-section {
    margin-top: 1.25rem;
    border-radius: var(--agro-radius);
    overflow: hidden;
    box-shadow: var(--agro-shadow);
    background: var(--agro-surface);
    padding: 0.75rem;
    position: relative;
}

.hero-section .carousel-item img {
    border-radius: var(--agro-radius-sm);
    max-height: 460px;
    object-fit: cover;
    width: 100%;
}

.hero-section .carousel-indicators {
    margin-bottom: 0.5rem;
}

.hero-section .carousel-indicators li {
    width: 30px;
    height: 4px;
    border-radius: 4px;
    background-color: var(--agro-border);
    border: none;
    transition: var(--agro-transition);
}

.hero-section .carousel-indicators li.active {
    background: linear-gradient(90deg, #0e8634, #21d37a);
    width: 50px;
}

.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    opacity: 0;
    transition: var(--agro-transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-section:hover .carousel-control-prev,
.hero-section:hover .carousel-control-next {
    opacity: 1;
}

.hero-section .carousel-control-prev { left: 1.25rem; }
.hero-section .carousel-control-next { right: 1.25rem; }

.hero-section .carousel-control-prev-icon,
.hero-section .carousel-control-next-icon {
    filter: invert(36%) sepia(74%) saturate(519%) hue-rotate(94deg) brightness(95%) contrast(92%);
    width: 20px;
    height: 20px;
}

/* ===================================================
   2) BOTONES SOCIALES LATERALES (glassmorphism)
   =================================================== */
#sociales.social {
    position: fixed;
    right: 20px;
    top: 40%;
    z-index: 2000;
}

#sociales.social ul {
    padding: 12px 8px !important;
    list-style: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    box-shadow: var(--agro-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

#sociales.social ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--agro-primary) !important;
    font-size: 18px;
    transition: var(--agro-transition);
    background: transparent;
}

#sociales.social ul li a:hover {
    background: linear-gradient(135deg, #0e8634, #21d37a);
    color: #fff !important;
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 6px 16px rgba(14, 134, 52, 0.35);
}

/* ===================================================
   3) ACCESOS DIRECTOS (12 cards)
   =================================================== */
#accesodirecto {
    margin-top: 2.5rem;
}

#accesodirecto .cont-primario {
    background: var(--agro-surface);
    border-radius: var(--agro-radius);
    padding: 1.5rem;
    box-shadow: var(--agro-shadow);
    border: 1px solid var(--agro-border);
    margin-bottom: 1.5rem;
}

.access-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.75rem;
    border-radius: var(--agro-radius-sm);
    background: var(--agro-surface);
    border: 1px solid var(--agro-border);
    transition: var(--agro-transition);
    height: 100%;
    text-decoration: none !important;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.access-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #0e8634, #21d37a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.access-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--agro-shadow-lg);
    border-color: var(--agro-primary-light);
}

.access-card:hover::before {
    transform: scaleX(1);
}

.access-card img {
    width: 70px !important;
    height: 70px;
    object-fit: contain;
    margin-bottom: 0.75rem !important;
    transition: var(--agro-transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.access-card:hover img {
    transform: scale(1.08);
}

.access-card .access-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--agro-blue);
    line-height: 1.25;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.access-card .access-subtitle {
    color: var(--agro-gold);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ===================================================
   4) SECCIÓN DE NOTICIAS
   =================================================== */
#noticia {
    margin-top: 2.5rem;
}

.news-section-wrapper {
    background: var(--agro-surface);
    border-radius: var(--agro-radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--agro-shadow);
    border: 1px solid var(--agro-border);
}

.section-title-agro {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.75rem !important;
    color: var(--agro-blue) !important;
}

.section-title-agro .accent {
    color: var(--agro-accent);
}

/* Slider principal de noticias */
.news-slider-card {
    position: relative;
    border-radius: var(--agro-radius-sm);
    overflow: hidden;
    box-shadow: var(--agro-shadow);
    background: #000;
}

.news-slider-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-slider-card:hover img {
    transform: scale(1.05);
}

.news-slider-card .carousel-caption {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem;
    text-align: left;
}

.news-slider-card .carousel-caption .tituloprincinoticia {
    color: #fff !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    line-height: 1.4;
}

.news-slider-card .carousel-caption .tituloprincinoticia:hover {
    color: var(--agro-accent) !important;
}

.news-slider-card .carousel-indicators li {
    width: 24px;
    height: 3px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
}

.news-slider-card .carousel-indicators li.active {
    background-color: var(--agro-accent);
    width: 36px;
}

#bs-slider-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 50%);
    pointer-events: none;
}

/* Cards laterales de noticias */
.news-side-card {
    display: flex;
    gap: 1rem;
    padding: 0.85rem;
    border-radius: var(--agro-radius-sm);
    background: var(--agro-surface);
    margin-bottom: 0.85rem;
    border: 1px solid var(--agro-border);
    transition: var(--agro-transition);
}

.news-side-card:hover {
    transform: translateX(4px);
    box-shadow: var(--agro-shadow);
    border-color: var(--agro-primary-light);
}

.news-side-card .news-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: var(--agro-radius-sm);
    object-fit: cover;
}

.news-side-card .news-body {
    flex: 1;
    min-width: 0;
}

.news-side-card .news-tag {
    display: inline-block;
    background: linear-gradient(90deg, #0e8634, #21d37a);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.news-side-card .news-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #4A4A4A;
    line-height: 1.35;
    margin: 0 0 0.4rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-side-card .news-title:hover {
    color: var(--agro-primary) !important;
}

.news-side-card .news-date {
    font-size: 0.7rem;
    color: var(--agro-text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.news-side-card .news-date i { color: var(--agro-primary); }

.btn-view-all {
    display: inline-block;
    background: linear-gradient(135deg, #0e8634, #21d37a);
    color: #fff !important;
    padding: 0.65rem 2rem;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: var(--agro-transition);
    box-shadow: 0 4px 12px rgba(14, 134, 52, 0.25);
    border: none;
    font-size: 0.85rem;
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 134, 52, 0.35);
    color: #fff !important;
}

/* ===================================================
   5) SECCIÓN DE ANUNCIOS
   =================================================== */
#anunciosactuales {
    margin-top: 2.5rem;
}

.announcements-wrapper {
    background: var(--agro-surface);
    border-radius: var(--agro-radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--agro-shadow);
    border: 1px solid var(--agro-border);
}

.announcement-card {
    display: block;
    border-radius: var(--agro-radius-sm);
    overflow: hidden;
    background: var(--agro-bg);
    border: 1px solid var(--agro-border);
    transition: var(--agro-transition);
    height: 100%;
    cursor: pointer;
}

.announcement-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--agro-shadow-lg);
    border-color: var(--agro-primary-light);
}

.announcement-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

/* ===================================================
   6) FACEBOOK + ENLACES POPULARES
   =================================================== */
.social-popular-wrapper {
    margin-top: 2.5rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.fb-card-agro {
    flex: 1 1 380px;
    background: linear-gradient(135deg, #0182c6 0%, #03427E 100%);
    border-radius: var(--agro-radius);
    padding: 1.5rem;
    box-shadow: var(--agro-shadow-lg);
    color: #fff;
}

.fb-card-agro h3 {
    color: #FBC711 !important;
    text-align: center;
    margin-bottom: 1rem !important;
    font-size: 1.4rem;
    font-weight: 700;
}

.fb-card-agro h3 .white {
    color: #fff !important;
}

.popular-links-card {
    flex: 1 1 500px;
    background: var(--agro-surface);
    border-radius: var(--agro-radius);
    padding: 1.5rem;
    box-shadow: var(--agro-shadow);
    border: 1px solid var(--agro-border);
}

.popular-links-card h3 {
    color: var(--agro-accent) !important;
    text-align: center;
    margin-bottom: 1.25rem !important;
    font-size: 1.4rem;
    font-weight: 700;
}

.popular-links-card h3 .blue {
    color: var(--agro-blue) !important;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.popular-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: var(--agro-radius-sm);
    background: var(--agro-bg);
    text-decoration: none !important;
    transition: var(--agro-transition);
    border: 1px solid transparent;
}

.popular-grid-item:hover {
    transform: translateY(-3px);
    background: var(--agro-surface);
    border-color: var(--agro-primary-light);
    box-shadow: var(--agro-shadow);
}

.popular-grid-item img {
    width: 64px !important;
    height: 64px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    transition: var(--agro-transition);
}

.popular-grid-item:hover img {
    transform: scale(1.1);
}

.popular-grid-item .pop-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    color: var(--agro-blue);
    font-weight: 600;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

.popular-grid-item .pop-subtitle {
    color: var(--agro-gold);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

/* ===================================================
   7) ENLACES EXTERNOS
   =================================================== */
#enla-exter {
    margin-top: 2.5rem;
}

.partners-section {
    background: var(--agro-surface);
    border-radius: var(--agro-radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--agro-shadow);
    border: 1px solid var(--agro-border);
}

.partners-section h3 {
    color: var(--agro-accent) !important;
    text-align: center;
    margin-bottom: 1.5rem !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.partners-section h3 .blue {
    color: var(--agro-blue) !important;
}

.client-logo-wrapper {
    padding: 1rem 0;
}

.client-logo {
    border-radius: var(--agro-radius-sm);
    transition: var(--agro-transition);
    padding: 0.5rem;
    filter: grayscale(30%);
}

.client-logo:hover {
    filter: grayscale(0%);
    transform: scale(1.08);
}

/* ===================================================
   8) ALERTAS (estilo agro)
   =================================================== */
.alert-info-agro {
    background: linear-gradient(135deg, #e0f7e9 0%, #d4f1e0 100%);
    color: var(--agro-primary-dark);
    border: 1px solid var(--agro-primary-light);
    border-radius: var(--agro-radius-sm);
    padding: 1rem 1.25rem;
    text-align: left;
}

/* ===================================================
   9) ANIMACIONES SUAVES
   =================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===================================================
   10) RESPONSIVE
   =================================================== */
@media (max-width: 991px) {
    .hero-section .carousel-item img { max-height: 340px; }
    .news-slider-card img { height: 280px; }
    .section-title-agro { font-size: 1.4rem; }
    .popular-grid { grid-template-columns: repeat(2, 1fr); }
    .social-popular-wrapper { flex-direction: column; }
}

@media (max-width: 575px) {
    .hero-section { padding: 0.5rem; }
    .hero-section .carousel-item img { max-height: 220px; }
    .news-section-wrapper,
    .announcements-wrapper,
    .partners-section { padding: 1.25rem 0.85rem; }
    .section-title-agro { font-size: 1.2rem; }
    .popular-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .access-card img { width: 56px !important; height: 56px; }
    .access-card .access-title,
    .access-card .access-subtitle { font-size: 0.7rem; }
    .news-side-card { flex-direction: column; }
    .news-side-card .news-thumb { width: 100%; height: 140px; }
    #sociales.social { right: 8px; top: auto; bottom: 12px; }
    #sociales.social ul { flex-direction: row; padding: 6px; }
}
