/* =============================================
   MODERN OVERRIDES – Finca La Joya
   ============================================= */

/* ---------- CSS Variables ---------- */
:root {
    --green:        #41b51b;
    --green-dark:   #2d8a11;
    --green-glow:   rgba(65, 181, 27, 0.35);
    --orange:       #f4623a;
    --coffee:       #3d1c02;
    --dark:         #0f1923;
    --cream:        #fdf6ec;
    --text:         #2c2c2c;
    --radius:       14px;
    --shadow:       0 8px 32px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.18);
    --transition:   all 0.3s ease;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
    color: var(--text);
    font-family: 'Merriweather', serif;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-dark); }

/* ---------- NAVBAR ---------- */
#mainNav {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08) !important;
    transition: var(--transition);
    padding: 0.6rem 0;
}

#mainNav .navbar-brand img {
    transition: transform 0.3s ease;
}
#mainNav .navbar-brand img:hover {
    transform: scale(1.06);
}

#mainNav .nav-link {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #444 !important;
    padding: 0.5rem 0.5rem !important;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

#mainNav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--green);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}
#mainNav .nav-link:hover { color: var(--green) !important; }
#mainNav .nav-link:hover::after { width: 70%; }

/* ---------- HERO ---------- */
.masthead {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    position: relative;
}

.masthead::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(0, 0, 0, 0.52) 0%,
        rgba(61, 28, 2, 0.65) 100%
    );
    z-index: 0;
}

.masthead .container { position: relative; z-index: 1; }

.masthead h1 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(2.8rem, 7vw, 5.5rem) !important;
    font-weight: 900 !important;
    letter-spacing: 0.01em;
    line-height: 1.1;
    color: #fff;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.4),
        0 8px 32px rgba(0,0,0,0.35);
}

/* Hero content animation */
.hero-content {
    animation: heroFadeUp 1s ease both;
}
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Badge */
.hero-badge {
    display: inline-block;
    background: rgba(65, 181, 27, 0.18);
    border: 1px solid rgba(65, 181, 27, 0.50);
    color: rgba(255, 255, 255, 0.92);
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.45rem 1.25rem;
    border-radius: 50px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Highlighted brand name */
.hero-brand {
    color: var(--green);
    text-shadow:
        0 0 48px rgba(65, 181, 27, 0.55),
        0 2px 4px rgba(0,0,0,0.4);
}

/* Subtitle paragraph */
.hero-sub {
    font-family: 'Merriweather Sans', sans-serif !important;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem) !important;
    font-weight: 300 !important;
    line-height: 1.9 !important;
    letter-spacing: 0.03em !important;
    opacity: 0.88;
}

/* Outline CTA button */
.hero-btn-outline {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
    color: #fff !important;
    box-shadow: none !important;
}
.hero-btn-outline:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #fff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22) !important;
    color: #fff !important;
}

/* Stats bar */
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-stat-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.65rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.hero-stat-label {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.67rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 0.3rem;
}
.hero-stat-divider {
    width: 1px;
    height: 42px;
    background: rgba(255, 255, 255, 0.22);
    align-self: center;
}

/* Scroll-down arrow */
.hero-scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.50);
    font-size: 1.5rem;
    text-decoration: none;
    animation: heroBounce 2.2s ease-in-out infinite;
    z-index: 2;
    transition: color 0.3s ease;
}
.hero-scroll-down:hover { color: var(--green); }
@keyframes heroBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(9px); }
}

/* ---------- BUTTONS ---------- */
.btn-primary,
.btn-xl.btn-primary {
    background: linear-gradient(135deg, var(--green) 0%, #5dce2b 100%) !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 0.9rem 2.8rem !important;
    font-family: 'Merriweather Sans', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    font-size: 0.82rem !important;
    box-shadow: 0 4px 22px var(--green-glow) !important;
    transition: var(--transition) !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-xl.btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 34px var(--green-glow) !important;
}

/* ---------- DIVIDERS ---------- */
.divider {
    height: 3px !important;
    background: linear-gradient(90deg, transparent, var(--green), transparent) !important;
    border: none !important;
    opacity: 1 !important;
    margin: 1.5rem auto 2rem !important;
    width: 75%;
    max-width: 320px;
}
.divider-light {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent) !important;
}

/* ---------- SECTIONS ---------- */
.page-section { padding: 6rem 0 !important; }

.page-section h2.text-center {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}
.bg-primary h2.text-center,
.bg-dark h2.text-center,
#team h2 { color: #fff !important; }

/* ---------- FEATURE CARDS (QA, Location, Washing) ---------- */
.feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2.5rem 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
}
.feature-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(65, 181, 27, 0.2);
}
.feature-card .icon-wrapper {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(65,181,27,0.10), rgba(65,181,27,0.22));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}
.feature-card i { color: var(--green) !important; }
.feature-card h3 { font-weight: 700; color: #1a1a1a; }

/* ---------- HISTORY SECTION ---------- */
.bg-primary {
    background: linear-gradient(135deg, #1a3a4a 0%, #16303d 50%, #0d2030 100%) !important;
}
.bg-primary p.text-white-75 {
    font-size: 1.05rem;
    line-height: 2;
    opacity: 0.88;
}

/* ---------- CONTACT ---------- */
#contact.bg-dark { background: #111827 !important; }

#contact .link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.2rem;
    margin: 0 0.4rem 1.75rem;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
#contact .link:hover {
    background: var(--green);
    border-color: var(--green);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--green-glow);
    color: #fff;
}

#contact .card {
    border: none !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    transition: var(--transition) !important;
    overflow: hidden;
}
#contact .card:hover {
    transform: translateY(-7px) !important;
    box-shadow: var(--shadow-hover) !important;
}
#contact .card-body { padding: 2rem !important; }

#contact .card-title {
    font-weight: 700;
    font-size: 1.05rem;
    border-bottom: 2px solid rgba(65, 181, 27, 0.3);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}
#contact .card-subtitle {
    font-size: 0.78rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--green) !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
}
#contact .card a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}
#contact .card a:hover { color: var(--green); }
#contact .card .fa,
#contact .card .fas,
#contact .card .far { color: var(--green); margin-right: 0.5rem; }

/* ---------- TEAM ---------- */
#team { background: var(--dark) !important; }

.team-box {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}
.team-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(65,181,27,0.65), rgba(15,25,35,0.7));
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: 10px;
}
.team-box:hover::after { opacity: 1; }
.team-box img {
    transition: transform 0.5s ease;
    border-radius: 10px;
    width: 100%;
}
.team-box:hover img { transform: scale(1.07); }

/* ---------- LOCATION ---------- */
#location.bg-dark { background: #111827 !important; }
#location .text-muted { color: rgba(255,255,255,0.6) !important; }
#location h3 { color: #fff; }

#location iframe {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 820px;
    border: 3px solid rgba(255,255,255,0.08) !important;
}

/* Feature card – variante glass para fondos oscuros */
.feature-card-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.feature-card-glass:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(65, 181, 27, 0.45);
}
.feature-card-glass h3 { color: #fff; }
.feature-card-glass .icon-wrapper {
    background: rgba(65, 181, 27, 0.18);
}
.feature-card-glass .text-muted { color: rgba(255, 255, 255, 0.60) !important; }

/* ---------- SCROLL ANIMATIONS ---------- */
.aos-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.aos-item.aos-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- BACK TO TOP ---------- */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--green) !important;
    color: #fff !important;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    box-shadow: 0 4px 20px var(--green-glow);
    z-index: 9999;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
#backToTop.visible {
    display: flex;
}
#backToTop:hover {
    background: var(--green-dark) !important;
    box-shadow: 0 8px 28px var(--green-glow);
    transform: translateY(-3px);
    color: #fff !important;
}

/* ---------- FOOTER ---------- */
footer.bg-light {
    background: #0d1117 !important;
    border-top: 3px solid var(--green);
    padding: 2rem 0 !important;
}
footer .text-muted {
    color: rgba(255, 255, 255, 0.45) !important;
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
}

/* ---------- WASHING ---------- */
#Washing { background: var(--cream) !important; }

/* ---------- PRODUCTS ---------- */
#pro img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- PORTFOLIO ---------- */
.portfolio-box {
    border-radius: 10px !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-box:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover) !important;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 768px) {
    .page-section { padding: 4rem 0 !important; }
    .masthead h1 { font-size: 2rem !important; }
    #contact .card { margin-bottom: 1rem; }
    .hero-stat-divider { display: none; }
    .hero-stats { gap: 1.5rem !important; }
    .hero-scroll-down { display: none; }
}
