/* custom.css - Estilos personalizados adicionales */

/* ===== ESTILOS ADICIONALES ===== */

/* Efectos de hover mejorados */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

/* Animaciones personalizadas */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Efectos en cards */
.skill-card {
    position: relative;
    overflow: hidden;
}

.skill-card::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.6s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.blog-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.blog-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-15px) scale(1.02);
}

/* Botones mejorados */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
}

.btn-outline-primary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(44, 116, 179, 0.3);
}

/* Formularios mejorados */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(44, 116, 179, 0.25);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

/* Chatbot mejorado */
.chatbot-container {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    position: relative;
}

.chatbot-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    transform: rotate(45deg);
}

.chat-message {
    animation: slideIn 0.3s ease;
    max-width: 85%;
}

.bot-message {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 4px solid var(--secondary-color);
}

.user-message {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    position: relative;
}

.user-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid var(--secondary-color);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

/* Timeline mejorado */
.timeline-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-content {
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Footer mejorado */
.footer {
    background: linear-gradient(135deg, var(--primary-color), #0c1f3d);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--ai-purple), var(--cyber-green));
}

.social-icon {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon:hover {
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Efectos de scroll */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(44, 116, 179, 0.3);
}

.scroll-indicator.show {
    opacity: 1;
    visibility: visible;
}

.scroll-indicator:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Badges y tags mejorados */
.tech-tag, .blog-tag {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tech-tag:hover, .blog-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tech-tag::before, .blog-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.tech-tag:hover::before, .blog-tag:hover::before {
    left: 100%;
}

/* Progress bars mejorados */
.progress {
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    height: 10px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--secondary-color), var(--ai-purple));
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Alertas mejoradas */
.alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: currentColor;
    opacity: 0.5;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Tooltips personalizados */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Loader personalizado */
.loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animación para el hero */
.hero-content h1 {
    animation: fadeInDown 0.8s ease;
}

.hero-content h3 {
    animation: fadeInDown 0.8s ease 0.2s both;
}

.hero-content p {
    animation: fadeInDown 0.8s ease 0.4s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media queries adicionales */
@media (max-width: 576px) {
    .hero-section {
        padding: 100px 0 40px;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .timeline-item {
        padding: 10px 20px 10px 60px;
    }
    
    .timeline::after {
        left: 20px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Modo oscuro opcional */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    body.dark-mode .skill-card,
    body.dark-mode .blog-card,
    body.dark-mode .contact-form,
    body.dark-mode .chatbot-container {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }
    
    body.dark-mode .form-control {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
}

/* Impresión optimizada */
@media print {
    .navbar,
    .footer,
    .chatbot-container,
    .scroll-indicator,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}