/* Custom variables for Uniagro Brand styling */
:root {
    --font-primary: 'Poppins', sans-serif;

    /* Colors */
    --color-primary: #004b82;
    /* Brand Dark Blue */
    --color-secondary: #4ea83b;
    /* Brand Green */
    --color-text-dark: #004680;
    /* Dark blue for heading */
    --color-bg-fallback: #e2f4ff;
    /* Fallback sky blue gradient */
    --color-white: #ffffff;

    /* Layout */
    --bar-height: 15px;
}

/* Base resets & typography for clean rendering */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* Reset headings and paragraphs to use Poppins by default */
h1,
h2,
h3,
p {
    font-family: var(--font-primary);
    margin: 0;
}

/* Main landing wrapper container */
.landing-wrapper {
    width: 800px;
    margin: 40px auto;
    background-color: var(--color-white);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

/* Hero Section Layout */
.hero-section {
    position: relative;
    width: 100%;
    height: 720px;
    /* Optimized height to match mockup aspect ratio */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-bg-fallback);
    /* Background crop field image placeholder (to be set manually by the user) */
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center -150px;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Centered Logo container */
.hero-logo-wrapper {
    margin-top: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-grow: 1;
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-logo {
    max-width: 380px;
    /* Fits elegantly within 800px wrapper */
    width: 85%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-logo:hover {
    transform: scale(1.03);
}

/* Card Container at the bottom */
.hero-content-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: var(--bar-height);
    /* Aligns perfectly above bottom bar */
    z-index: 2;
}

.hero-card {
    background-color: var(--color-white);
    width: 88%;
    padding: 45px 50px;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.06);
    animation: slideUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Typography styles matching Poppins font weights */
.hero-title {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
}

.hero-title-bold {
    font-weight: 800;
    /* Extra Bold weight */
    font-size: 38px;
    color: var(--color-text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 2px;
    animation: fadeIn 0.8s ease 1s both;
}

.hero-title-regular {
    font-weight: 400;
    /* Regular/Book weight */
    font-size: 32px;
    color: var(--color-text-dark);
    letter-spacing: -0.5px;
    animation: fadeIn 0.8s ease 1.3s both;
}

/* Reusable bicolor brand bar */
.bicolor-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bar-height);
    display: flex;
    z-index: 3;
}

.bicolor-bar .bar-blue {
    width: 65%;
    background-color: var(--color-primary);
    height: 100%;
}

.bicolor-bar .bar-green {
    width: 35%;
    background-color: var(--color-secondary);
    height: 100%;
}

/* Premium micro-interaction animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes floatY {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes floatYFlip {
    0%, 100% {
        transform: scaleX(-1) translateY(0);
    }
    50% {
        transform: scaleX(-1) translateY(-8px);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(78, 168, 59, 0.2);
    }
    50% {
        box-shadow: 0 6px 20px rgba(78, 168, 59, 0.4);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Unified Headings / Titles */
.section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 24px;
}

.section-subtitle {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    margin: 40px 0 24px 0;
}

/* Title modifiers */
.title-center {
    text-align: center;
    width: 100%;
}

.title-flex {
    display: flex;
    gap: 8px;
}

.text-green {
    color: var(--color-secondary);
}

/* Info Section Styles */
.info-section {
    position: relative;
    padding: 60px 60px 80px 60px;
    background-color: var(--color-white);
    overflow: hidden;
}

.info-container {
    position: relative;
    z-index: 2;
    text-align: justify;
}

/* Typography matching Poppins */
.info-section p {
    color: var(--color-text-dark);
    /* Using consistent dark brand blue */
    line-height: 1.6;
    margin-bottom: 24px;
}

.intro-text,
.body-text {
    font-size: 20px;
}

.intro-text .text-bold {
    font-weight: 700;
}

.body-text {
    font-weight: 400;
}

/* Callout "A TRAVÉS DE ESTE MODELO OFRECEMOS" */
.callout-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 45px 0;
    text-align: center;
}

.callout-title {
    font-weight: 800;
    font-size: 36px;
    color: var(--color-primary);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* Green badges/pills */
.badge-green {
    background-color: var(--color-secondary);
    color: var(--color-white);
    font-weight: 800;
    border-radius: 50px;
    display: inline-block;
    letter-spacing: 0.5px;
    text-align: center;
}

.badge-sm {
    font-size: 18px;
    padding: 6px 20px;
    margin-bottom: 12px;
}

.badge-lg {
    font-size: 36px;
    padding: 8px 36px;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(78, 168, 59, 0.2);
    animation: pulseGlow 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.badge-lg:hover {
    transform: scale(1.05);
}

/* Service Block styling */
.service-block {
    margin-top: 40px;
}

.service-desc {
    max-width: 500px;
    /* Restrict width to avoid overlapping leaves image */
}

/* Leaves decoration at the bottom-right */
.leaves-decor-container {
    position: absolute;
    bottom: var(--bar-height);
    right: -20px;
    width: 260px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.leaves-decor {
    width: 100%;
    height: auto;
    display: block;
    animation: floatY 2.88s ease-in-out infinite;
}

/* Coverage Section Styles */
.coverage-section {
    position: relative;
    padding: 60px 60px 80px 60px;
    background-color: var(--color-white);
    overflow: hidden;
}

.coverage-container {
    position: relative;
    z-index: 2;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 35px;
}

/* Risks Grid (9 cards) */
.risks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 680px;
    margin: 0 auto 40px auto;
}

.risk-card {
    display: flex;
    align-items: center;
    border: 2px solid var(--color-primary);
    border-radius: 14px;
    padding: 12px 24px;
    background-color: var(--color-white);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Escalonamiento de entrada de las risk-cards */
.risk-card:nth-child(1) { animation-delay: 0.05s; }
.risk-card:nth-child(2) { animation-delay: 0.1s; }
.risk-card:nth-child(3) { animation-delay: 0.15s; }
.risk-card:nth-child(4) { animation-delay: 0.2s; }
.risk-card:nth-child(5) { animation-delay: 0.25s; }
.risk-card:nth-child(6) { animation-delay: 0.3s; }
.risk-card:nth-child(7) { animation-delay: 0.35s; }
.risk-card:nth-child(8) { animation-delay: 0.4s; }
.risk-card:nth-child(9) { animation-delay: 0.45s; }

.risk-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 75, 130, 0.08);
    border-color: var(--color-secondary);
}

.risk-card:hover .risk-icon {
    transform: scale(1.15);
}

.risk-icon {
    transition: transform 0.3s ease;
}

.risk-card-centered {
    grid-column: span 2;
    justify-self: center;
    width: calc(50% - 10px);
    /* Matches exactly the width of the individual cards */
}

.risk-icon-wrapper {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 18px;
    flex-shrink: 0;
}

.risk-icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.risk-label {
    font-size: 20px;
    font-weight: 400;
    color: var(--color-primary);
}

/* Schemes Header & List */
.schemes-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 50px 0 35px 0;
    text-align: center;
}

.schemes-list {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.scheme-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.scheme-item:nth-child(1) { animation-delay: 0.1s; }
.scheme-item:nth-child(2) { animation-delay: 0.25s; }
.scheme-item:nth-child(3) { animation-delay: 0.4s; }

.scheme-badge {
    display: flex;
    align-items: center;
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 24px;
    border-radius: 18px;
    margin: 0 auto 15px;
    box-shadow: 0 4px 12px rgba(78, 168, 59, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scheme-badge:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(78, 168, 59, 0.3);
}

.scheme-badge-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 12px;
}

.scheme-badge-text {
    font-size: 24px;
    letter-spacing: 0.5px;
}

.scheme-desc {
    font-size: 20px;
    line-height: 1.5;
    color: var(--color-text-dark);
    margin-bottom: 10px;
    text-align: justify;
}

.scheme-highlight {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-dark);
}

/* Side decorations */
.decor-left-container,
.decor-right-container {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.decor-left-container {
    left: 0px;
    top: 550px;
    width: 250px;
}

.decor-right-container {
    right: -30px;
    top: 680px;
    width: 180px;
}

.decor-left-img,
.decor-right-img {
    width: 100%;
    height: auto;
}

.decor-left-img {
    transform: scaleX(-1);
    animation: floatYFlip 3.6s ease-in-out infinite;
}

.decor-right-img {
    animation: floatY 3.24s ease-in-out 0.5s infinite;
}

/* Decorative Field Photo */
.field-image-container {
    margin-left: -60px;
    margin-right: -60px;
    margin-bottom: -80px;
    /* pull down to bleed flush with section padding */
    margin-top: 40px;
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.field-image {
    width: 100%;
    height: auto;
    display: block;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 140px);
    mask-image: linear-gradient(to bottom, transparent 0%, black 140px);
}

/* Parametric Section Styles */
.parametric-section {
    position: relative;
    padding: 60px 60px 80px 60px;
    background-color: var(--color-white);
    overflow: hidden;
}

.parametric-container {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.characteristics-list {
    margin: 0;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.characteristics-list li {
    font-size: 20px;
    line-height: 1.55;
    color: var(--color-text-dark);
    font-weight: 400;
    text-align: justify;
    animation: fadeInUp 0.5s ease both;
}

.characteristics-list li:nth-child(1) { animation-delay: 0.05s; }
.characteristics-list li:nth-child(2) { animation-delay: 0.1s; }
.characteristics-list li:nth-child(3) { animation-delay: 0.15s; }
.characteristics-list li:nth-child(4) { animation-delay: 0.2s; }
.characteristics-list li:nth-child(5) { animation-delay: 0.25s; }
.characteristics-list li:nth-child(6) { animation-delay: 0.3s; }

/* Pecuario Section Styles */
.pecuario-section {
    position: relative;
    padding: 60px 60px 80px 60px;
    background-color: var(--color-primary);
    /* Dark Blue brand background */
    overflow: hidden;
}

.pecuario-section .section-title {
    color: var(--color-white);
}

.pecuario-container {
    max-width: 680px;
    margin: 0 auto;
}

.pecuario-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin-top: 40px;
}

.pecuario-group {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pecuario-group:nth-child(1) { animation-delay: 0.1s; }
.pecuario-group:nth-child(2) { animation-delay: 0.25s; }
.pecuario-group:nth-child(3) { animation-delay: 0.4s; }

.scheme-badge-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.scheme-badge-wrapper .scheme-badge {
    display: inline-flex;
    margin: 0;
    text-align: center;
    justify-content: center;
}

.dark-section-list {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dark-section-list li {
    font-size: 20px;
    line-height: 1.5;
    color: var(--color-white);
    text-align: justify;
}

.dark-section-list li strong {
    font-weight: 800;
}

.pecuario-desc {
    font-size: 20px;
    line-height: 1.55;
    color: var(--color-white);
    text-align: justify;
    margin: 0;
}

/* Animal Coverage Section Styles */
.animal-coverage-section {
    position: relative;
    padding: 60px 60px 80px 60px;
    background-color: var(--color-primary);
    /* Dark Blue brand background */
    overflow: hidden;
}

.animal-coverage-container {
    max-width: 680px;
    margin: 0 auto;
}

.coverage-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
}

.coverage-header .section-title {
    color: var(--color-white);
    margin-bottom: 12px;
}

.coverage-badge-wrapper {
    display: flex;
    justify-content: center;
}

.coverage-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 50px;
}

.coverage-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.coverage-group:nth-child(1) { animation-delay: 0.1s; }
.coverage-group:nth-child(2) { animation-delay: 0.25s; }
.coverage-group:nth-child(3) { animation-delay: 0.4s; }

.coverage-badge {
    display: flex;
    align-items: center;
    border: 2px solid var(--color-white);
    background-color: transparent;
    color: var(--color-white);
    padding: 16px 28px;
    border-radius: 18px;
    margin: 0 auto 15px;
    width: fit-content;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.coverage-badge:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.coverage-badge-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    margin-right: 12px;
}

.coverage-badge-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.coverage-desc {
    font-size: 20px;
    line-height: 1.55;
    color: var(--color-white);
    text-align: justify;
    margin: 0;
    max-width: 620px;
}

/* Bottom branding layout with plant background and Universales logo */
.bottom-branding-container {
    margin-left: -60px;
    margin-right: -60px;
    margin-bottom: -80px;
    /* pull down to bleed flush with section padding */
    margin-top: 50px;
    position: relative;
    overflow: hidden;
    line-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bottom-branding-image-wrapper {
    width: 100%;
    background-color: var(--color-primary);
}

.bottom-branding-bg {
    width: 100%;
    height: auto;
    display: block;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 120px);
    mask-image: linear-gradient(to bottom, transparent 0%, black 120px);
    opacity: 0.5;
    /* Permite que el color azul de fondo se fusione con la imagen */
    /* mix-blend-mode: luminosity; /* Convierte el tono de las hojas al color azul corporativo */
}

.bottom-branding-logo-box {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    z-index: 2;
}

.bottom-branding-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.bottom-branding-logo:hover {
    transform: scale(1.05);
}

/* Respeto a preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive adjustments */
@media (max-width: 800px) {
    .landing-wrapper {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .hero-section {
        height: 100vh;
        min-height: 580px;
    }

    .hero-logo {
        max-width: 300px;
    }

    .hero-card {
        width: 92%;
        padding: 35px 30px;
        border-radius: 20px 20px 0 0;
    }

    .hero-title-bold {
        font-size: 28px;
    }

    .hero-title-regular {
        font-size: 24px;
    }

    /* Unified Title Scaling for Mobile */
    .section-title {
        font-size: 28px;
        margin-bottom: 18px;
    }

    .section-subtitle {
        font-size: 22px;
        margin: 30px 0 15px 0;
    }

    /* Info Section Mobile Styles */
    .info-section {
        padding: 40px 30px 60px 30px;
    }

    .intro-text {
        font-size: 18px;
    }

    .callout-title {
        font-size: 20px;
    }

    .service-desc {
        max-width: 100%;
    }

    .leaves-decor-container {
        width: 150px;
        opacity: 0.35;
        /* Soft background overlay for readability on mobile */
        right: -10px;
    }

    /* Coverage Section Mobile Styles */
    .coverage-section {
        padding: 40px 30px 60px 30px;
    }

    .risks-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .risk-card-centered {
        grid-column: span 1;
        width: 100%;
    }

    .scheme-badge {
        padding: 8px 18px;
    }

    .scheme-badge-text {
        font-size: 14px;
    }

    .scheme-desc,
    .scheme-highlight {
        font-size: 16px;
    }

    .decor-left-container,
    .decor-right-container {
        opacity: 0.3;
    }

    .decor-left-container {
        width: 80px;
        left: -20px;
    }

    .decor-right-container {
        width: 90px;
        right: -15px;
    }

    /* Mobile overrides for decorative field photo */
    .field-image-container {
        margin-left: -30px;
        margin-right: -30px;
        margin-bottom: -60px;
        /* matches mobile section bottom padding */
        margin-top: 30px;
    }

    /* Parametric Section Mobile Styles */
    .parametric-section {
        padding: 40px 30px 60px 30px;
    }

    .characteristics-list {
        padding-left: 20px;
        gap: 12px;
    }

    .characteristics-list li {
        font-size: 16px;
    }

    /* Pecuario Section Mobile Styles */
    .pecuario-section {
        padding: 40px 30px 60px 30px;
    }

    .pecuario-content {
        gap: 35px;
    }

    .scheme-badge-wrapper .scheme-badge {
        padding: 12px 20px;
    }

    .scheme-badge-wrapper .scheme-badge-icon {
        width: 35px;
        height: 35px;
    }

    .scheme-badge-wrapper .scheme-badge-text {
        font-size: 16px;
    }

    .dark-section-list {
        padding-left: 18px;
        gap: 12px;
    }

    .dark-section-list li,
    .pecuario-desc {
        font-size: 16px;
    }

    /* Animal Coverage Mobile Styles */
    .animal-coverage-section {
        padding: 40px 30px 60px 30px;
    }

    .coverage-header {
        margin-bottom: 30px;
    }

    .coverage-content {
        gap: 30px;
        margin-bottom: 40px;
    }

    .coverage-badge {
        padding: 10px 18px;
        border-radius: 12px;
        margin-bottom: 10px;
        border-width: 1.5px;
    }

    .coverage-badge-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }

    .coverage-badge-text {
        font-size: 15px;
    }

    .coverage-desc {
        font-size: 16px;
    }

    .bottom-branding-container {
        margin-left: -30px;
        margin-right: -30px;
        margin-bottom: -60px;
        /* matches mobile section bottom padding */
        margin-top: 30px;
    }

    .bottom-branding-bg {
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 60px);
        mask-image: linear-gradient(to bottom, transparent 0%, black 60px);
    }

    .bottom-branding-logo-box {
        border-width: 1.5px;
        padding: 8px 16px;
    }

    .bottom-branding-logo {
        max-width: 160px;
    }
}