:root {
    --primary-color: #FFD700; /* Safety Yellow */
    --secondary-color: #212529; /* Dark Grey / Carbon */
    --accent-color: #343a40; /* Lighter Grey */
    --text-color: #f8f9fa; /* Off-white */
    --muted-color: #6c757d;
    --dark-overlay: rgba(0, 0, 0, 0.7);
    --transition: all 0.3s ease;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: #121212;
    color: var(--text-color);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Loader --- */
.loading-div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-div svg {
    animation: rotate 2s linear infinite;
    color: var(--primary-color);
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* --- Navbar --- */
.navbar {
    background-color: rgba(33, 37, 41, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0;
}

.logo-header {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.btn-info {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--secondary-color) !important;
    font-weight: bold;
    border-radius: 0; /* Industrial look */
}

.btn-info:hover {
    background-color: #e5c100 !important;
    border-color: #e5c100 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* --- Hero / Header Sections --- */
.bg-inicio, .bg-productos, .bg-proyectos, .bg-contacto {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-bottom: 5px solid var(--primary-color);
}

.elemento-zoom-5 {
    background-size: cover;
    background-position: center;
}

.elemento-zoom h1, .elemento-zoom h2 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* --- Cards --- */
.card {
    background-color: var(--accent-color);
    border: none;
    border-radius: 0;
    margin-bottom: 2rem;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-bottom: 3px solid var(--primary-color);
}

.card-img-top {
    border-radius: 0;
    height: 250px;
    object-fit: cover;
    filter: grayscale(20%);
    transition: var(--transition);
}

.card:hover .card-img-top {
    filter: grayscale(0%);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--primary-color);
    font-weight: bold;
}

.card-text {
    color: #e0e0e0;
}

/* --- Floating Button --- */
.btn-flotante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    animation: float 3s ease-in-out infinite;
}

.btn-flotante:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.6);
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* --- Footer --- */
footer {
    background-color: #000;
    color: gray;
    padding: 2rem 0;
    border-top: 2px solid var(--primary-color);
}

/* --- Utility Classes --- */
.text-warning-custom {
    color: var(--primary-color) !important;
}

.bg-dark-custom {
    background-color: var(--secondary-color) !important;
}

/* --- Form --- */
.form-control, .form-select {
    background-color: var(--accent-color);
    border: 1px solid #444;
    color: white;
    border-radius: 0;
}

.form-control:focus, .form-select:focus {
    background-color: var(--accent-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: none;
}

/* --- Tables --- */
.table-dark {
    background-color: var(--accent-color);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb:hover {
    background: #e5c100;
}
