/*
Theme Name: Agro Importe
Theme URI: https://agroimporte.com
Author: Agro Importe Dev
Author URI: https://agroimporte.com
Description: Modern, minimalistic corporate theme for the agro-industrial sector. Built with Tailwind CSS, Custom Post Types, and ACF. Multilingual ready (WPML/Polylang).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: agro-importe
Tags: agro, industrial, multilingual, tailwind, cpt, responsive
*/

/* ============================================================
   BASE STYLES — Tailwind handles most, these fill the gaps
   ============================================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom font import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@400;600;700;800&display=swap');

/* CSS Variables — brand palette derived from logo */
:root {
    --color-primary:    #2D6A2F; /* Deep forest green */
    --color-primary-light: #4CAF50;
    --color-primary-dark: #1B4332;
    --color-secondary:  #8B5E3C; /* Earthy brown */
    --color-secondary-light: #A0714F;
    --color-accent:     #F5C842; /* Warm gold/yellow */
    --color-neutral-50:  #FAFAF8;
    --color-neutral-100: #F5F3EE;
    --color-neutral-200: #E8E4DC;
    --color-neutral-800: #2C2C2C;
    --color-neutral-900: #1A1A1A;
    --font-sans:  'Inter', system-ui, sans-serif;
    --font-display: 'Montserrat', 'Inter', sans-serif;
    --transition-base: 0.3s ease;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 8px 40px rgba(0,0,0,0.14);
    --border-radius: 0.75rem;
}

/* Typography */
body {
    font-family: var(--font-sans);
    color: var(--color-neutral-800);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
    transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.lang-switcher a {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all var(--transition-base);
    color: #6b7280;
}

.lang-switcher a.active,
.lang-switcher a:hover {
    color: var(--color-primary);
    background: rgba(45, 106, 47, 0.08);
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-bg-overlay {
    background: linear-gradient(
        135deg,
        rgba(27, 67, 50, 0.88) 0%,
        rgba(45, 106, 47, 0.72) 50%,
        rgba(139, 94, 60, 0.60) 100%
    );
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-title span {
    color: var(--color-accent);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    max-width: 560px;
}

.hero-scroll-indicator {
    animation: bounce 2s infinite;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 106, 47, 0.35);
}

.btn-outline {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: white;
}

.btn-outline-dark {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

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

.btn-secondary {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background: #7a5234;
    border-color: #7a5234;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 94, 60, 0.3);
}

/* ============================================================
   SECTION STYLES
   ============================================================ */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

.section-title {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--color-neutral-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-title span {
    color: var(--color-primary);
}

.section-description {
    font-size: 1.0625rem;
    color: #6b7280;
    line-height: 1.75;
    max-width: 640px;
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--color-neutral-200);
}

.product-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-6px);
}

.product-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-neutral-100);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-body {
    padding: 1.5rem;
}

.product-category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(45, 106, 47, 0.1);
    color: var(--color-primary);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.product-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-card-desc {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1.25rem;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap var(--transition-base);
}

.product-card-link:hover {
    gap: 0.625rem;
}

/* ============================================================
   STATS / TRUST INDICATORS
   ============================================================ */
.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--color-primary);
    line-height: 1;
    display: block;
}

.stat-label {
    font-size: 0.9375rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-image-wrapper {
    position: relative;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: -16px;
    left: -16px;
    width: 80%;
    height: 80%;
    background: var(--color-neutral-100);
    border-radius: var(--border-radius);
    z-index: 0;
}

.about-image-wrapper img {
    position: relative;
    z-index: 1;
    border-radius: var(--border-radius);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.5rem;
    transition: background var(--transition-base);
}

.feature-item:hover {
    background: var(--color-neutral-50);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(45, 106, 47, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-primary);
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--color-neutral-200);
    border-radius: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--color-neutral-800);
    background: white;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    outline: none;
}

.contact-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 47, 0.12);
}

.contact-input::placeholder {
    color: #9ca3af;
}

.contact-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-neutral-800);
    margin-bottom: 0.375rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-neutral-900);
    color: rgba(255, 255, 255, 0.75);
}

.footer-heading {
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color var(--transition-base);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: white;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   SINGLE PRODUCT PAGE
   ============================================================ */
.product-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.product-specs-table tr {
    border-bottom: 1px solid var(--color-neutral-200);
}

.product-specs-table tr:last-child {
    border-bottom: none;
}

.product-specs-table td {
    padding: 0.875rem 0;
    font-size: 0.9375rem;
}

.product-specs-table td:first-child {
    font-weight: 600;
    color: var(--color-neutral-800);
    width: 45%;
}

.product-specs-table td:last-child {
    color: #6b7280;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.7s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
[data-animate-stagger] > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-animate-stagger].in-view > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.1s; }
[data-animate-stagger].in-view > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.2s; }
[data-animate-stagger].in-view > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.3s; }
[data-animate-stagger].in-view > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.4s; }
[data-animate-stagger].in-view > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.5s; }
[data-animate-stagger].in-view > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.6s; }

/* ============================================================
   UTILITY OVERRIDES
   ============================================================ */
.bg-primary       { background-color: var(--color-primary); }
.bg-primary-dark  { background-color: var(--color-primary-dark); }
.text-primary     { color: var(--color-primary); }
.border-primary   { border-color: var(--color-primary); }

/* Divider with text */
.divider-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-neutral-200);
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* WP Alignments */
.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.alignwide  { width: 100%; }
.alignfull  { width: 100vw; margin-left: calc(-50vw + 50%); }

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(45, 106, 47, 0.2);
    color: var(--color-primary-dark);
}
