/* ========================================
   RIVERRED GROUP - PORTAL PRINCIPAL
   Diseño Premium con Glassmorphism
======================================== */

/* ===== CSS Variables ===== */
:root {
    /* Colores principales */
    --color-primary: #dc2626;
    --color-primary-dark: #b91c1c;
    --color-primary-light: #ef4444;
    --color-secondary: #1e293b;

    /* Fondos */
    --color-bg: #0f0f0f;
    --color-bg-secondary: #1a1a1a;
    --color-bg-card: rgba(30, 30, 30, 0.8);

    /* Texto */
    --color-text: #ffffff;
    --color-text-secondary: #a1a1aa;
    --color-text-muted: #71717a;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Efectos */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 25px 80px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(220, 38, 38, 0.3);

    /* Tipografía */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Montserrat', sans-serif;

    /* Espaciado */
    --container-width: 1200px;
    --section-padding: 6rem 0;

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Container ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

/* ===== Loader ===== */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.loader-logo .river {
    color: var(--color-text);
}

.loader-logo .red {
    color: var(--color-primary);
}

.loader-subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    animation: loading 1.2s ease-in-out infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(350%);
    }
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: transparent;
    transition: var(--transition-normal);
}

.header.scrolled {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav__logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
}

.nav__logo-text .river {
    color: var(--color-text);
}

.nav__logo-text .red {
    color: var(--color-primary);
}

.nav__logo-tagline {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-normal);
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-text);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.nav__toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition-normal);
}

.nav__close {
    display: none;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-dark);
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(220, 38, 38, 0.1) 0%, transparent 40%);
}

/* Animated particles */
.hero__particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 20s infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 1.5rem;
}

.hero__badge {
    display: inline-block;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.hero__title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.hero__title .river {
    color: var(--color-text);
}

.hero__title .red {
    color: var(--color-primary);
    text-shadow: var(--shadow-glow);
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 2rem;
}

.hero__description {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero__scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
}

.scroll-icon {
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-icon::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== Section Styles ===== */
.section {
    padding: var(--section-padding);
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__subtitle {
    display: inline-block;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.section__title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.section__description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Projects Grid ===== */
.projects {
    background: var(--color-bg-secondary);
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.project-card__image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.project-card:hover .project-card__image img {
    transform: scale(1.1);
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.9) 100%);
}

.project-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-card__badge--new {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.project-card__content {
    padding: 2rem;
}

.project-card__icon {
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.project-card__title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-card__subtitle {
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.project-card__description {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.project-card__link:hover {
    gap: 1rem;
}

.project-card__link .arrow {
    transition: var(--transition-normal);
}

/* ===== Featured Project (Cabañas) ===== */
.featured {
    position: relative;
    overflow: hidden;
}

.featured::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(220, 38, 38, 0.1) 0%, transparent 60%);
}

.featured__card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: var(--color-bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.featured__image {
    height: 500px;
    overflow: hidden;
}

.featured__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured__content {
    padding: 3rem;
}

.featured__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.featured__title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.featured__subtitle {
    color: var(--color-primary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.featured__description {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.featured__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.feature-item .icon {
    font-size: 1.2rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn--primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.4);
}

.btn--outline {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--glass-border);
}

.btn--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn--glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--color-text);
}

.btn--glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== About Section ===== */
.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about__text {
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.about__text p {
    margin-bottom: 1.5rem;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
}

.stat-card__number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-card__label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ===== CTA Section ===== */
.cta {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 0;
}

.cta__title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.cta__description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta .btn--outline {
    border-color: rgba(255, 255, 255, 0.3);
}

.cta .btn--outline:hover {
    background: white;
    color: var(--color-primary);
    border-color: white;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__brand {
    max-width: 300px;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer__logo .river {
    color: var(--color-text);
}

.footer__logo .red {
    color: var(--color-primary);
}

.footer__description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer__title {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.footer__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer__link:hover {
    color: var(--color-primary);
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.footer__socials {
    display: flex;
    gap: 1rem;
}

.footer__social {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: var(--transition-normal);
}

.footer__social:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ===== WhatsApp Button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition-normal);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .featured__card {
        grid-template-columns: 1fr;
    }

    .featured__image {
        height: 300px;
    }

    .about__content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer__content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 0;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: var(--transition-normal);
        border-left: 1px solid var(--glass-border);
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .nav__toggle {
        display: flex;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 2rem;
        right: 2rem;
        font-size: 2rem;
        color: var(--color-text);
        cursor: pointer;
    }

    .hero__title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .projects__grid {
        grid-template-columns: 1fr;
    }

    .featured__features {
        grid-template-columns: 1fr;
    }

    .about__stats {
        grid-template-columns: 1fr;
    }

    .footer__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__brand {
        max-width: none;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero__badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .hero__description {
        font-size: 1rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .project-card__content {
        padding: 1.5rem;
    }

    .featured__content {
        padding: 2rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
/* ===== Animations ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

