/* ==========================================================================
   Variables de Diseño y Reset
   ========================================================================== */
:root {
    --primary-color: #2e7d32;       /* Verde industrial / campo */
    --primary-dark: #1b5e20;        /* Verde oscuro para hovers */
    --accent-color: #81c784;         /* Verde claro para detalles */
    --dark-bg: #1a1c1e;              /* Gris oscuro/negro premium */
    --light-bg: #f8f9fa;             /* Gris extra claro */
    --text-color: #2d3436;           /* Color de texto principal */
    --text-light: #636e72;           /* Color de texto secundario */
    --white: #ffffff;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); /* Transición más fluida para el giro */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Grillas Comunes */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* ==========================================================================
   Header y Navegación
   ========================================================================== */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--dark-bg);
    line-height: 1;
    display: flex;
    flex-direction: column;
}

.logo span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-family: var(--font-title);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn-primary-header {
    text-decoration: none;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary-header:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ==========================================================================
   Hero Section / Banner
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, rgba(26, 28, 30, 0.92) 0%, rgba(46, 125, 50, 0.4) 100%), 
                url('https://images.unsplash.com/photo-1547553355-834b974a6a4a?auto=format&fit=crop&q=80&w=1600') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px;
}

.hero-content {
    max-width: 750px;
}

.badge {
    background-color: rgba(129, 199, 132, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
}

.hero h1 {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.btn-primary, .btn-secondary {
    text-decoration: none;
    padding: 15px 32px;
    border-radius: 6px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

/* ==========================================================================
   Sección Características (Estaticas)
   ========================================================================== */
.features {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.feature-card-static {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-bottom: 4px solid transparent;
    transition: all 0.3s ease;
}

.feature-card-static:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--primary-color);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card-static h3 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-bg);
}

.feature-card-static p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==========================================================================
   Sección Productos con Efecto de Giro (Flip Card 3D) Pure CSS
   ========================================================================== */
.products {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-bg);
}

.section-title .line {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0 auto;
    border-radius: 2px;
}

/* Contenedor principal de la perspectiva 3D */
.flip-card {
    background-color: transparent;
    height: 460px; /* Altura estricta para contener el frente y dorso perfectamente */
    perspective: 1000px; /* Detona el efecto de profundidad 3D */
}

/* Contenedor interno que rota físicamente */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: var(--transition);
    transform-style: preserve-3d; /* Obliga a los hijos a mantener la tridimensionalidad */
}

/* Activación del giro de 180 grados al tocar o pasar el cursor */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Definiciones comunes para ambas caras de la tarjeta */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Oculta la cara contraria durante la rotación */
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

/* --- CARA FRONTAL (Diseño Original) --- */
.flip-card-front {
    background-color: var(--white);
    display: flex;
    flex-direction: column;
}

.product-img-placeholder {
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.2);
    position: relative;
    padding: 20px;
    text-align: center;
}

/* Fondos diferenciados con gradientes metálicos oscuros para emular imágenes */
.jaula-bg { background: linear-gradient(45deg, #1f4037 0%, #99f2c8 100%); }
.porcino-bg { background: linear-gradient(45deg, #2c3e50 0%, #3498db 100%); }
.industrial-bg { background: linear-gradient(45deg, #4b6cb7 0%, #182848 100%); }

.product-img-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
    color: var(--white);
    opacity: 0.9;
}

.product-img-placeholder span {
    color: var(--white);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.product-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h4 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--dark-bg);
}

.product-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 10px 0;
}

.product-btn {
    display: block;
    text-align: center;
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding: 12px;
    border-radius: 6px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid rgba(46, 125, 50, 0.1);
    transition: all 0.3s ease;
}

.flip-card:hover .product-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- CARA TRASERA (Detalle Técnico Oculto) --- */
.flip-card-back {
    color: var(--white);
    transform: rotateY(180deg); /* El reverso inicia ya volteado en el eje Y */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Fondos de la parte trasera de las tarjetas: Misma base pero drásticamente oscurecida */
.jaula-bg-dark {
    background: linear-gradient(180deg, rgba(15, 32, 27, 0.94) 0%, rgba(20, 30, 25, 0.97) 100%), 
                linear-gradient(45deg, #1f4037 0%, #99f2c8 100%);
}
.porcino-bg-dark {
    background: linear-gradient(180deg, rgba(20, 30, 40, 0.94) 0%, rgba(10, 15, 25, 0.97) 100%), 
                linear-gradient(45deg, #2c3e50 0%, #3498db 100%);
}
.industrial-bg-dark {
    background: linear-gradient(180deg, rgba(15, 25, 45, 0.94) 0%, rgba(5, 10, 20, 0.97) 100%), 
                linear-gradient(45deg, #4b6cb7 0%, #182848 100%);
}

.back-content {
    padding: 25px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
}

.back-content h5 {
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.specs-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.specs-list li {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.3;
}

.specs-list li i {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-top: 2px;
}

/* Destacar la garantía con un ícono de premio dorado */
.specs-list li i.fa-award {
    color: #ffd700;
}

.btn-quote-back {
    display: block;
    text-align: center;
    text-decoration: none;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px;
    border-radius: 6px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 15px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-quote-back:hover {
    background-color: #25d366; /* Color WhatsApp al hacer hover */
    border-color: #fff;
}

/* ==========================================================================
   Footer y Frase Motivacional
   ========================================================================== */
.footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 80px 0 30px 0;
    font-family: var(--font-body);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 50px;
}

.footer-about h3 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 400px;
}

.footer-quote {
    position: relative;
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quote-icon {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.footer-quote blockquote {
    font-size: 1.2rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-weight: 300;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* ==========================================================================
   Botón de WhatsApp Flotante
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: #20ba5a;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Responsive para dispositivos móviles */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    .hero h1 {
        font-size: 2.3rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .hero-actions {
        flex-direction: column;
    }
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    .flip-card {
        height: 500px; /* Un poco más de altura en móviles por salto de línea de texto */
    }
}