/**
 * TechSolutions - Estilos Personalizados
 * Complementa Bootstrap con estilos corporativos
 */

/* ===== Variables y Base ===== */
:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #0ea5e9;
    --dark-color: #111827;
    --gray-light: #f3f4f6;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #374151;
    overflow-x: hidden;
}

/* ===== Navbar ===== */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:not(.btn):hover::after {
    width: 80%;
}

.nav-link.btn {
    border-radius: 25px;
    transition: var(--transition);
}

.nav-link.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, 30px) rotate(5deg); }
}

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

.animate-fade-in-delay-1 {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1s ease-out 0.6s both;
}

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

/* ===== Cards ===== */
.service-card,
.product-card {
    transition: var(--transition);
    cursor: pointer;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(14, 165, 233, 0.1));
    transition: var(--transition);
}

.product-card:hover .product-image-container {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.2), rgba(14, 165, 233, 0.2));
}

.product-card.selected {
    border: 3px solid var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1) !important;
    background-color: rgba(30, 64, 175, 0.02);
}

.product-card.selected .select-product-btn {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.product-card.selected .select-product-btn:hover {
    background-color: #059669;
    border-color: #059669;
}

.product-card.selected .product-image-container {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(14, 165, 233, 0.1));
}

/* ===== GALERÍA DE APLICACIONES ===== */
.gallery-card {
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.gallery-card .position-relative {
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-card:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 64, 175, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    color: white;
    text-align: center;
}

.gallery-overlay-content i {
    color: white;
}

.gallery-card .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===== TESTIMONIOS ===== */
.testimonial-card {
    transition: var(--transition);
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px 0 0 12px;
    opacity: 0;
    transition: var(--transition);
}

.testimonial-card:hover::before {
    opacity: 1;
}

.testimonial-quote {
    position: relative;
}

.testimonial-text {
    font-size: 15px;
    line-height: 1.8;
    font-style: italic;
}

.testimonial-author h6 {
    color: var(--color-black);
    font-size: 16px;
}

.testimonial-author p {
    font-size: 13px;
}

.testimonial-rating i {
    font-size: 16px;
    margin-right: 2px;
}

/* ===== Buttons ===== */
.btn {
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.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);
    color: white;
    transform: translateY(-2px);
}

/* ===== Forms ===== */
.form-control {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--gray-light);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* ===== Alerts ===== */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* ===== Footer ===== */
footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-light) !important;
    transform: translateX(3px);
}

.social-links a {
    transition: var(--transition);
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    opacity: 0.8;
}

/* ===== Scroll to Top Button ===== */
#scrollToTop {
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#scrollToTop:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ===== Utilities ===== */
.hover-lift {
    transition: var(--transition);
}

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

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto !important;
        padding: 3rem 0;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .nav-link.btn {
        margin-top: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .display-3 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
}

/* ===== Loading Spinner ===== */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
