/* Bobinados Industriales F.R. - Estilos principales */

:root {
    --primary-color: #1e3660;
    --primary-dark: #152a4a;
    --primary-light: #2a4a7a;
    --secondary-color: #f59e0b;
    --accent-color: #dc2626;
    --text-color: #1f2937;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* Header y Navigation */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.cta-button {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f97316 100%);
    color: var(--white) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--primary-light) 100%);
    color: var(--white);
    padding: 8rem 2rem 6rem;
    margin-top: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f97316 100%);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Sections */
.section {
    padding: 5rem 2rem;
}

.section-alt {
    background-color: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

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

.card-header {
    padding: 2rem;
    text-align: center;
}

.card-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.card-body {
    padding: 0 2rem 2rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Features */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list i {
    color: var(--success-color);
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* Stats */
.stats {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.stat-item p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.footer a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid var(--gray-500);
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    color: var(--gray-300);
}

/* Chatbot */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chatbot-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f97316 100%);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 550px;
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    display: none;
}

.chatbot-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border-radius: 1rem 1rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-body {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    max-width: 80%;
}

.chat-message.bot {
    background: var(--gray-100);
    color: var(--text-color);
}

.chat-message.user {
    background: var(--primary-color);
    color: var(--white);
    margin-left: auto;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chat-option {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.chat-option:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Responsive */
@media (max-width: 1024px) {
    .navbar {
        padding: 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
        position: relative;
    }

    .logo img {
        height: 40px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-menu a:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .cta-button {
        margin-top: 0.5rem;
    }

    .hero {
        padding: 6rem 1rem 4rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .grid {
        gap: 1.5rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-4 {
        grid-template-columns: 1fr;
    }

    .card-header {
        padding: 1.5rem;
    }

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

    .card h3 {
        font-size: 1.25rem;
    }

    .card-icon {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }

    .stat-item p {
        font-size: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .chatbot-window {
        width: calc(100vw - 30px);
        max-width: 380px;
        right: -5px;
        max-height: 70vh;
    }

    .chatbot-container {
        right: 10px;
    }

    .chatbot-body {
        max-height: calc(70vh - 100px);
    }

    .chat-option {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 1rem 3rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero .subtitle {
        font-size: 0.95rem;
    }

    .section {
        padding: 2.5rem 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Estilos para el mapa */
.map-container {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-overlay-buttons {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    z-index: 10;
}

/* Nuevos colores para servicios */
.service-cold {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.service-electrical {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.service-tension {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.service-automation {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.service-domotics {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Badge estilos */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-new {
    background: var(--accent-color);
    color: white;
}

.badge-industrial {
    background: var(--primary-color);
    color: white;
}

.badge-tech {
    background: white;
    color: var(--primary-color);
}

/* Mejoras chatbot */
.chatbot-body {
    max-height: 350px;
}

.chat-options {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 5px;
}

.chat-options::-webkit-scrollbar {
    width: 4px;
}

.chat-options::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 2px;
}

.chat-options::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}

.chat-options::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Estilos responsive adicionales para elementos inline */
@media (max-width: 768px) {
    /* Forzar grids de 2 columnas a 1 columna en móvil */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    /* Botones en grids */
    [style*="display: grid"][style*="grid-template-columns"] a.btn,
    [style*="display: grid"][style*="grid-template-columns"] button.btn {
        font-size: 0.85rem !important;
        padding: 0.75rem 0.5rem !important;
    }

    /* Ajustar tamaños de fuente grandes */
    [style*="font-size: 3rem"] {
        font-size: 2rem !important;
    }

    [style*="font-size: 2.5rem"] {
        font-size: 1.75rem !important;
    }

    [style*="font-size: 2rem"] {
        font-size: 1.5rem !important;
    }

    [style*="font-size: 1.5rem"] {
        font-size: 1.25rem !important;
    }

    /* Padding y márgenes grandes */
    [style*="padding: 4rem"] {
        padding: 2rem 1rem !important;
    }

    [style*="padding: 3rem"] {
        padding: 1.5rem 1rem !important;
    }

    [style*="padding: 2rem"] {
        padding: 1rem !important;
    }

    /* Contenedores de botones */
    .hero-buttons a,
    .hero-buttons button {
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
}

@media (max-width: 480px) {
    /* Botones más pequeños en móviles pequeños */
    [style*="display: grid"][style*="grid-template-columns"] a.btn,
    [style*="display: grid"][style*="grid-template-columns"] button.btn {
        font-size: 0.8rem !important;
        padding: 0.65rem 0.4rem !important;
    }

    /* Tamaños de badges y tags */
    [style*="padding: 0.5rem 1rem"] {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.85rem !important;
    }

    [style*="padding: 0.25rem 0.5rem"] {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.75rem !important;
    }
}