/* ====== VARIABLES Y RESETEO ====== */
:root {
    /* Colores principales */
    --primary-color: #2E7D32;    /* Verde bosque */
    --secondary-color: #4CAF50;  /* Verde claro */
    --accent-color: #FFC107;     /* Amarillo dorado */
    --background-color: #F8F9FA; /* Gris muy claro */
    --text-primary: #2C3E50;     /* Azul oscuro */
    --text-secondary: #5D6D7E;   /* Gris medio */
    --white: #FFFFFF;
    
    /* Fuentes */
    --font-main: 'Inter', sans-serif;
    
    /* Espaciados */
    --container-padding: 2rem;
    --section-padding: 4rem 0;
    
    /* Sombras */
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
    
    /* Transiciones */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 1s ease;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    overflow-x: hidden;
}

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

/* ====== HEADER FIJO ====== */
.header-logo {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem;
}

.logo-corner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-fast);
}

.logo-corner:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.logo-fixed {
    height: 35px;
    width: auto;
}

.brand-corner {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* ====== HERO SECTION ====== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Carrusel de fondo */
.background-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity var(--transition-slow);
    filter: blur(1px) brightness(0.7);
}

.carousel-slide.active {
    opacity: 1;
}

/* Overlay del hero */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(46, 125, 50, 0.7) 0%,
        rgba(76, 175, 80, 0.5) 50%,
        rgba(33, 37, 41, 0.3) 100%
    );
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 800px;
}

/* Logo y brand */
.logo-container {
    margin-bottom: 2rem;
}

.logo {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.brand-name {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

/* Texto del hero */
.hero-text {
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
    animation: fadeInUp 1s ease;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    animation: fadeInUp 1s ease 0.3s both;
    margin-bottom: 1rem;
    color: #F8F9FA;
}

.hero-phrase {
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    animation: fadeInUp 1s ease 0.6s both;
    color: #E8F5E8;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(46, 125, 50, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

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

.fade-in {
    animation: fadeInUp 1s ease;
}

.fade-in-delay {
    animation: fadeInUp 1s ease 0.5s both;
}

.fade-in-delay-2 {
    animation: fadeInUp 1s ease 0.8s both;
}

/* Botones del hero */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Indicador de scroll */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(45deg);
    margin-bottom: 0.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ====== SECCIÓN DE INFORMACIÓN ====== */
.info-section {
    padding: var(--section-padding);
    background: var(--white);
    position: relative;
    z-index: 3;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.info-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.card-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.icon-overlay {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #66BB6A, #4CAF50);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--white);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* CTA Final */
.final-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.final-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('modelo/vaca_arete.png') repeat;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.cta-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.btn-cta {
    background: var(--accent-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
    position: relative;
    z-index: 1;
}

.btn-cta:hover {
    background: #FFF59D;
    transform: translateY(-3px) scale(1.05);
}

/* ====== MODALES ====== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background-color: var(--white);
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: var(--shadow-heavy);
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.close:hover {
    background-color: var(--background-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 3rem 2.5rem;
}

.logo-container-small {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-small {
    height: 50px;
    width: auto;
}

.modal-body h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* Formularios */
.login-form,
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all var(--transition-fast);
    background-color: var(--background-color);
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    z-index: 10;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-top: 15px; /* Ajuste para compensar el label */
}

.password-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    margin-top: 15px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #E0E0E0;
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: all var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: var(--white);
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.forgot-password:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

.signup-link,
.login-link {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.signup-link a,
.login-link a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.signup-link a:hover,
.login-link a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ====== RESPONSIVE ====== */
/* Tablet (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 90%;
        padding: 0 2rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .info-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .info-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
    }
    
    .modal-content {
        width: 85%;
        max-width: 500px;
    }
    
    .form-group input {
        padding: 0.9rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --section-padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .brand-name {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .info-card {
        padding: 2rem 1.5rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 2rem 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .brand-name {
        font-size: 1.6rem;
    }
    
    .logo {
        height: 60px;
    }
    
    .card-icon {
        width: 100px;
        height: 100px;
    }
    
    .card-icon-img {
        width: 60px;
        height: 60px;
    }
}