﻿/* 
 * Control Fuego - Premium Styles
 * Based on Bootstrap 5.3.3
 * Optimized for Modern Minimalist Design
 */

/* --- Variables CSS --- */
:root {
    /* Brand Colors */
    --brand-red: #d20f0f;
    --brand-red-dark: #b40d0d;
    --brand-red-light: #ff4444;
    --brand-red-subtle: rgba(210, 15, 15, 0.05);

    /* Neutral Colors */
    --dark: #0f172a;
    /* Slate 900 - Softer than pure black */
    --gray-dark: #334155;
    /* Slate 700 */
    --gray-medium: #64748b;
    /* Slate 500 */
    --light-bg: #e4e4e5;
    /* User suggested gray */
    --white: #ffffff;

    /* Typography */
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: var(--gray-dark);
    --bs-heading-color: var(--dark);
    --bs-link-color: var(--brand-red);
    --bs-link-hover-color: var(--brand-red-dark);

    /* Shadows - Ultra Smooth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(210, 15, 15, 0.15);

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-pill: 9999px;

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Brand Cards */
    --brand-card-bg: #fafafa;
    --brand-card-border: #e5e7eb;
    --brand-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --brand-card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --brand-card-padding: 2rem;
}

/* --- Global Reset & Typography --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--white);
    color: var(--bs-body-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--bs-heading-color);
    line-height: 1.2;
}

p {
    margin-bottom: 1.5rem;
}

/* Accessibility: Focus visible */
:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Animations --- */
@media (prefers-reduced-motion: no-preference) {
    .fade-in-up {
        animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        opacity: 0;
    }

    .delay-100 {
        animation-delay: 0.1s;
    }

    .delay-200 {
        animation-delay: 0.2s;
    }

    .delay-300 {
        animation-delay: 0.3s;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Navbar --- */
.navbar {
    transition: var(--transition-base);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar .container {
    max-width: 1100px;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.navbar-brand img {
    height: 85px;
    /* Slightly smaller for cleaner look */
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.02);
}

.nav-link {
    font-weight: 500;
    color: var(--gray-dark);
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.2s ease;
    font-size: 1.1rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--brand-red);
    transition: var(--transition-base);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 20px;
    /* Minimalist dot/dash */
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-red);
}

.nav-contact-btn {
    background: var(--brand-red);
    color: var(--white) !important;
    border-radius: var(--radius-pill);
    padding: 0.6rem 1.5rem !important;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(210, 15, 15, 0.2);
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.nav-contact-btn:hover {
    background: var(--brand-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(210, 15, 15, 0.3);
}

.nav-contact-btn::after {
    display: none;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 14rem 0 5rem;
    color: var(--white);
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.75));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--white);
    letter-spacing: -0.03em;
}

.text-highlight {
    background: linear-gradient(90deg, #ff4444, #ff8888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    font-weight: 400;
    color: #cbd5e1;
    /* Slate 300 */
}

/* Buttons */
.btn-cta {
    background: var(--brand-red);
    color: var(--white);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: var(--transition-base);
    box-shadow: 0 10px 20px -5px rgba(210, 15, 15, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-cta:hover {
    background: var(--brand-red-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(210, 15, 15, 0.5);
}

.btn-outline-light-custom {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: var(--transition-base);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
}

.btn-outline-light-custom:hover {
    background: var(--white);
    color: var(--brand-red);
    border-color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* --- Benefit Cards --- */
.benefit-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    height: 100%;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.benefit-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--brand-red-subtle);
    color: var(--brand-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
}

.benefit-card:hover .benefit-icon {
    background: var(--brand-red);
    color: var(--white);
    transform: scale(1.1) rotate(-5deg);
}

/* --- Service Cards --- */
.service-card {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    height: 100%;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-red-light));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon-wrapper {
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon-wrapper {
    transform: scale(1.1);
}

/* --- Stats Section --- */
.stats-section {
    background: linear-gradient(135deg, var(--brand-red), #990b0b);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.stats-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

.stat-item {
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    display: block;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Brands Section --- */
.brand-card {
    background: var(--brand-card-bg);
    border: 1.5px solid var(--brand-card-border);
    border-radius: var(--radius-md);
    padding: var(--brand-card-padding);
    min-height: 140px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--brand-card-shadow);
    position: relative;
    overflow: hidden;
    /* Prevent content from escaping */
    will-change: transform, box-shadow;
}

.brand-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(210, 15, 15, 0.02), rgba(210, 15, 15, 0));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.brand-card:hover {
    box-shadow: var(--brand-card-shadow-hover);
    /* Only translate, no scale to prevent overflow */
    transform: translateY(-4px);
    border-color: rgba(210, 15, 15, 0.2);
    background: var(--white);
}

.brand-card:hover::before {
    opacity: 1;
}

.brand-logo {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.95);
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    /* Prevent image from escaping */
    display: block;
    margin: 0 auto;
}

.brand-card:hover .brand-logo {
    filter: grayscale(0) brightness(1);
    opacity: 1;
    /* Remove scale to keep logo contained */
    transform: none;
}

/* --- Contact Section --- */
.contact-info-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.contact-info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--brand-red-subtle);
    color: var(--brand-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.form-control,
.form-select {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    transition: var(--transition-base);
    font-size: 0.95rem;
    background-color: #f8fafc;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(210, 15, 15, 0.1);
    background-color: var(--white);
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--gray-dark);
}

/* --- Footer --- */
footer {
    background: var(--dark);
    color: #94a3b8;
    /* Slate 400 */
    font-size: 0.95rem;
}

footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--white);
}

footer h5 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    color: var(--white);
    transition: var(--transition-base);
    background: rgba(255, 255, 255, 0.05);
}

.footer-social a:hover {
    background: var(--brand-red);
    border-color: var(--brand-red);
    transform: translateY(-3px);
}

/* --- Mission Cards --- */
.mission-card {
    transition: var(--transition-base);
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl) !important;
    border-color: transparent !important;
}

.mission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-red-light));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.mission-card:hover::before {
    transform: scaleX(1);
}

.mission-card p {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.1rem;
    /* Optional: adjust size if needed for this font */
}

/* --- Scroll Top --- */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--brand-red);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-base);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background-color: var(--brand-red-dark);
    transform: translateY(-5px);
}

/* --- Mobile Adjustments --- */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--white);
        padding: 1.5rem;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-xl);
        margin-top: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .hero {
        padding-top: 7rem;
        text-align: center;
    }

    .hero .d-flex {
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .brand-card {
        padding: 1.5rem;
        min-height: 110px;
    }

    .brand-logo {
        max-height: 50px;
    }
}

/* --- Page Header (Internal Pages) --- */
.page-header {
    position: relative;
    padding: 180px 0 100px;
    /* Account for fixed navbar */
    background-color: var(--dark);
    color: var(--white);
    overflow: hidden;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-header-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 0;
    transform: scale(1.05);
    /* Subtle zoom */
}

.page-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95));
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.page-header-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.page-header-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    font-weight: 400;
    line-height: 1.6;
}

.breadcrumb-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
}

.breadcrumb-custom a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.breadcrumb-custom a:hover {
    color: var(--white);
}

.breadcrumb-custom .separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

.breadcrumb-custom .current {
    color: var(--brand-red);
    font-weight: 600;
}

/* Override Bootstrap bg-light for better contrast */
.bg-light {
    background-color: var(--light-bg) !important;
}
/* User Request: Increase header spacing for resolutions < 1024px */
@media (max-width: 1023.98px) {
    .hero {
        padding-top: 11rem;
    }
}
