/* Custom Styles for Biomec */

:root {
    --primary-color: #1C3757;      /* Azul Oscuro - Confianza y Profesionalismo */
    --secondary-color: #128362;    /* Verde Azulado - Salud y Precisión */
    --tertiary-color: #60B543;     /* Verde Claro - Vitalidad e Innovación */
    --neutral-dark: #3A3A3A;       /* Gris Carbón - Elegancia y Sobriedad */
    --neutral-light: #D4D4D4;      /* Gris Claro - Minimalismo y Tecnología */
    --success-color: #128362;
    --warning-color: #60B543;
    --danger-color: #1C3757;
    --info-color: #128362;
    --light-color: #f8f9fa;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* Logo styles */
.logo-navbar {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.brand-text {
    font-weight: 700;
    letter-spacing: 1.5px;
}

@media (max-width: 768px) {
    .logo-navbar {
        height: 35px;
    }
    
    /* Hero section mobile improvements */
    .hero-section {
        padding-top: 70px; /* Navbar más pequeño en móvil */
        background-attachment: scroll; /* Mejor rendimiento en móvil */
    }
    
    .hero-section h1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1rem !important;
        line-height: 1.4;
    }
    
    .hero-section .btn {
        font-size: 0.95rem;
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 65px; /* Aún más pequeño en móviles */
        background-attachment: scroll; /* Mejor rendimiento en móvil */
        background-position: center top; /* Mejor posicionamiento en móvil */
    }
    
    .hero-section h1 {
        font-size: 1.8rem !important;
        line-height: 1.1;
        margin-bottom: 1rem !important;
    }
    
    .hero-section p {
        font-size: 0.9rem !important;
        line-height: 1.3;
        margin-bottom: 1rem !important;
    }
}
    
    .brand-text {
        font-size: 1.2rem;
    }


.nav-link {
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--warning-color) !important;
}

/* Hero Section */
.hero-section {
    background: 
        linear-gradient(rgba(28, 55, 87, 0.6), rgba(18, 131, 98, 0.6)),
        url('../assets/images/Portada 3.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* Espacio para el navbar fixed */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(28, 55, 87, 0.1); /* Overlay sutil para mejor legibilidad */
    opacity: 0.8;
}

/* Mejoras de texto para Hero Section */
.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.hero-section p {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.hero-section small {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

/* Caja de contenido con fondo semi-transparente */
.hero-content-box {
    background: rgba(28, 55, 87, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-image {
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

/* Hero Logo Styles */
.hero-logo-container {
    position: relative;
}

.hero-logo {
    max-width: 200px;
    height: auto;
    opacity: 0.9;
    animation: logoGlow 2s ease-in-out infinite alternate;
    border-radius: 8px;
}

.hero-icon {
    opacity: 0.7;
}

@keyframes logoGlow {
    0% { 
        opacity: 0.9;
        transform: scale(1);
        box-shadow: 0 0 10px rgba(96, 181, 67, 0.3);
    }
    100% { 
        opacity: 1;
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(96, 181, 67, 0.5);
    }
}

@media (max-width: 768px) {
    .hero-logo {
        max-width: 150px;
    }
    
    .hero-icons {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .hero-icon-item {
        margin: 0 auto;
    }
}

/* Hero icon items styling */
.hero-icon-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.hero-icon-item:hover {
    transform: translateY(-5px);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.service-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* About Section */
.about-stats {
    transition: all 0.3s ease;
}

.about-stats:hover {
    transform: translateY(-5px);
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.product-icon {
    transition: transform 0.3s ease;
}

.product-card:hover .product-icon {
    transform: scale(1.2);
}

/* Contact Form */
.contact-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.contact-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--warning-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
    color: white;
}

.contact-form .form-floating > label {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form .form-control:focus ~ label,
.contact-form .form-control:not(:placeholder-shown) ~ label {
    color: var(--warning-color);
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Social Links */
.social-links a {
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-links a:hover {
    color: var(--tertiary-color) !important;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
}

/* Smooth Scrolling for Navigation Links */
section {
    scroll-margin-top: 80px;
}

/* Loading Animation for Images */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(45deg, var(--primary-color), var(--tertiary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Badge */
.custom-badge {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Bootstrap Color Overrides */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

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

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

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

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

.text-success {
    color: var(--secondary-color) !important;
}

.text-warning {
    color: var(--tertiary-color) !important;
}

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

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

.text-info {
    color: var(--secondary-color) !important;
}

.text-danger {
    color: var(--primary-color) !important;
}

/* Navigation hover effects */
.nav-link:hover {
    color: var(--tertiary-color) !important;
}

/* Navbar background with new color */
.navbar {
    background-color: var(--primary-color) !important;
}

/* Contact section background */
.bg-dark {
    background-color: var(--neutral-dark) !important;
}

/* Contact form styling with brand colors */
.contact-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--tertiary-color);
    box-shadow: 0 0 0 0.2rem rgba(96, 181, 67, 0.25);
    color: white;
}

.contact-form .form-control:focus ~ label,
.contact-form .form-control:not(:placeholder-shown) ~ label {
    color: var(--tertiary-color);
}

/* Icons in contact section with brand colors */
.contact-section .display-6 {
    color: var(--tertiary-color) !important;
}

/* Statistics colors */
.about-stats h3.text-primary {
    color: var(--primary-color) !important;
}

.about-stats h3.text-success {
    color: var(--secondary-color) !important;
}

.about-stats h3.text-warning {
    color: var(--tertiary-color) !important;
}

/* Custom accent classes */
.text-accent {
    color: var(--tertiary-color) !important;
}

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

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

.bg-accent {
    background-color: var(--tertiary-color) !important;
}

.text-tertiary {
    color: var(--secondary-color) !important;
}

/* Additional typography styles with new colors */
.text-neutral-dark {
    color: var(--neutral-dark) !important;
}

.text-neutral-light {
    color: var(--neutral-light) !important;
}

.bg-neutral-light {
    background-color: var(--neutral-light) !important;
}

.border-accent {
    border-color: var(--tertiary-color) !important;
}

/* Improved section backgrounds */
.section-bg-light {
    background-color: #f8f9fa;
    border-top: 3px solid var(--neutral-light);
}

/* Footer Logo Styles */
.logo-footer {
    height: 30px;
    width: auto;
    border-radius: 4px;
    opacity: 0.9;
}

/* About Section Logo */
.about-brand-logo {
    height: 60px;
    width: auto;
    opacity: 0.8;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.about-content:hover .about-brand-logo {
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .about-brand-logo {
        height: 50px;
    }
}

/* ===================================
   SECCIONES MEJORADAS CON FONDOS INTERCALADOS
   =================================== */

/* 1. Services Section - Gradiente sutil */
.section-gradient {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.section-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(18, 131, 98, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(28, 55, 87, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* 2. About Section - Fondo limpio con líneas sutiles */
.section-clean {
    background: 
        linear-gradient(90deg, transparent 0%, rgba(18, 131, 98, 0.03) 50%, transparent 100%),
        #ffffff;
    position: relative;
}

.section-clean::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 35%, rgba(96, 181, 67, 0.05) 35%, rgba(96, 181, 67, 0.05) 65%, transparent 65%);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
}

/* 3. Products Section - Patrón geométrico moderno */
.section-pattern {
    background: 
        linear-gradient(135deg, #f1f3f4 0%, #ffffff 50%, #f1f3f4 100%);
    position: relative;
    overflow: hidden;
}

.section-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(28, 55, 87, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 75px 75px, rgba(18, 131, 98, 0.08) 2px, transparent 2px);
    background-size: 100px 100px;
    opacity: 0.6;
    pointer-events: none;
}

/* Asegurar que el contenido esté por encima de los overlays */
.section-gradient .container,
.section-clean .container,
.section-pattern .container {
    position: relative;
    z-index: 2;
}

/* Efectos adicionales para las cards en secciones con patrón */
.section-pattern .card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-gradient .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

/* ===================================
   ESTILOS PARA BIMEG BRAND NAME
   =================================== */

/* Hero Section Brand Name */
.hero-brand-name h3 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.hero-brand-name p {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-style: italic;
    letter-spacing: 0.5px;
}

/* About Section Company Name Box */
.company-name-box {
    padding: 1rem 0;
}

.company-name-box h5 {
    font-style: italic;
    letter-spacing: 1px;
    position: relative;
}

.company-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    margin: 0.5rem 0;
}

/* Footer Brand Name */
.text-white-75 {
    color: rgba(255, 255, 255, 0.85) !important;
    font-style: italic;
    letter-spacing: 0.3px;
}

/* Responsive adjustments for brand name */
@media (max-width: 768px) {
    .hero-brand-name h3 {
        font-size: 1.5rem;
    }
    
    .hero-brand-name p {
        font-size: 0.8rem;
    }
    
    .company-name-box h5 {
        font-size: 1rem;
    }
}

/* ===================================
   FORMULARIO PERSONALIZADO - SELECT MEJORADO
   =================================== */

/* Custom Select Styling */
.custom-select {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 16 16'%3e%3cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.custom-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(28, 55, 87, 0.25);
    outline: 0;
}

.custom-select:hover {
    border-color: var(--secondary-color);
}

/* Opciones del select */
.custom-select option {
    background-color: #ffffff !important;
    color: #333333 !important;
    padding: 10px;
    font-size: 1rem;
    border: none;
}

.custom-select option:hover,
.custom-select option:focus,
.custom-select option:checked {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Placeholder option styling */
.custom-select option[value=""] {
    color: #6c757d !important;
    font-style: italic;
}

/* Form floating label adjustment for custom select */
.form-floating > .custom-select {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > .custom-select ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Dark theme specific adjustments for contact section */
#contact .custom-select {
    background-color: #ffffff !important;
    color: #333333 !important;
    border-color: #ced4da;
}

#contact .form-floating > label {
    color: #6c757d;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .custom-select {
        font-size: 0.9rem;
        padding: 0.65rem 2.25rem 0.65rem 0.65rem;
    }
}

/* Product Actions Buttons */
.product-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Botón de cotización principal */
.btn-quote {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    color: white;
}

.btn-quote:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    color: white;
}

/* Botón de detalles */
.btn-details {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    color: white;
}

.btn-details:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    color: white;
}

/* Botón de WhatsApp */
.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e 0%, #0d6d5d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    color: white;
}

.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-whatsapp:hover::before {
    left: 100%;
}

/* Responsive para botones de productos */
@media (max-width: 576px) {
    .product-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .product-actions .btn {
        width: 100%;
        flex: none;
        font-size: 0.8rem;
        padding: 10px 15px;
    }
    
    /* En móviles, mostrar solo iconos con texto más pequeño */
    .btn-whatsapp .bi-whatsapp {
        font-size: 1.1rem;
        margin-right: 6px !important;
    }
}

@media (max-width: 768px) and (min-width: 577px) {
    .product-actions {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .product-actions .btn {
        flex: 1;
        font-size: 0.75rem;
        padding: 6px 8px;
    }
    
    /* En tablets, iconos más pequeños */
    .product-actions .btn i {
        font-size: 0.9rem;
    }
}
