/**
 * PORTAFOLIO PROFESIONAL - ESTILOS PERSONALIZADOS
 * Autor: Ian González García
 * Descripción: Estilos para CV y portafolio personal
 * Framework: Bootstrap 5.3.0
 * Última actualización: Enero 2026
 */

/* ===== VARIABLES DE COLOR - TEMA LEGAL ELEGANTE ===== */
:root {
    --primary-dark: #1a3a52;
    --primary-light: #2d5a7b;
    --accent-gold: #d4af37;
    --accent-dark: #0d1f2d;
    --text-dark: #1a1a1a;
    --text-light: #4a4a4a;
    --bg-light: #f9f8f6;
    --border-color: #e8e6e1;
}

/* ===== RESET Y DEFAULTS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Trebuchet MS', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: #fefdfb;
}

/* ===== SECCIÓN HERO ELEGANTE ===== */
.hero-section-elegante {
    background: linear-gradient(135deg, #1a3a52 0%, #0d1f2d 100%);
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section-elegante::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.hero-section-elegante::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(212, 175, 55, 0.03);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

/* Divisor Elegante */
.divider-elegante {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 0 auto;
    border-radius: 2px;
}

/* Títulos de Sección */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    color: #1a3a52;
    letter-spacing: 0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #d4af37 0%, #1a3a52 100%);
    border-radius: 2px;
}

.section-title i {
    color: #d4af37;
    margin-right: 10px;
}

/* Secciones alternadas */
section:nth-child(odd) {
    background-color: #fefdfb;
}

section:nth-child(even) {
    background-color: #f9f8f6;
}

/* Items de Experiencia */
.experience-item {
    padding: 2rem;
    border-left: 4px solid #d4af37;
    background: white;
    border-radius: 4px;
    transition: all 0.4s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.experience-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.15);
    border-left-color: #1a3a52;
}

.experience-item h4 {
    color: #1a3a52;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

.experience-item .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    background: #1a3a52;
}

/* Categorías de Habilidades */
.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border-top: 3px solid #d4af37;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.skill-category h5 {
    color: #1a3a52;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.3px;
}

.skill-item span {
    font-weight: 600;
    color: #1a3a52;
}

.progress {
    height: 6px;
    background-color: #e8e6e1;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #1a3a52 0%, #d4af37 100%);
    transition: width 1s ease;
}

/* Items de Educación */
.education-item {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(26, 58, 82, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-left: 4px solid #d4af37;
    border-radius: 4px;
    transition: all 0.4s ease;
}

.education-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(26, 58, 82, 0.1);
}

.education-item h5 {
    color: #1a3a52;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

/* Tarjetas de Contacto */
.contact-card {
    padding: 2rem 1rem;
    transition: all 0.4s ease;
    border-radius: 4px;
}

.contact-card:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-5px);
}

.contact-card i {
    color: #d4af37;
}

.contact-card a {
    color: #d4af37;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.contact-card a:hover {
    color: #fff;
}

/* Sección Idiomas */
.language-item {
    padding: 1.5rem;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-top: 3px solid #d4af37;
}

.language-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(26, 58, 82, 0.15);
}

.language-item h5 {
    color: #1a3a52;
    font-weight: 700;
}

.language-item .badge {
    background: #1a3a52;
    color: #d4af37;
    font-weight: 600;
}

/* Links en Footer */
.social-links-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid #d4af37;
    color: #d4af37;
}

.social-links-footer a:hover {
    background-color: #d4af37;
    color: #1a3a52;
    transform: scale(1.15);
}

/* Navbar personalizado */
.navbar-brand {
    font-size: 1.5rem;
    transition: all 0.3s ease;
    color: #d4af37 !important;
    letter-spacing: 0.5px;
}

.navbar-brand:hover {
    color: #fff !important;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    color: #e0e0e0 !important;
    letter-spacing: 0.3px;
}

.nav-link:hover {
    color: #d4af37 !important;
}

/* Botones elegantes */
.btn-outline-light {
    color: #d4af37;
    border-color: #d4af37;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #1a3a52;
}

.btn-warning {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #1a3a52;
    font-weight: 700;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-warning:hover {
    background-color: #c9a227;
    border-color: #c9a227;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.btn-outline-warning {
    color: #d4af37;
    border-color: #d4af37;
}

.btn-outline-warning:hover {
    background-color: #d4af37;
    color: #1a3a52 !important;
}

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

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

.navbar {
    animation: slideInDown 0.6s ease-out;
}

.experience-item,
.education-item,
.skill-category,
.language-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Sección de contacto oscura */
#contacto {
    background: linear-gradient(135deg, #1a3a52 0%, #0d1f2d 100%) !important;
    border-top: 3px solid #d4af37;
    position: relative;
}

#contacto .section-title {
    color: #d4af37;
    padding-bottom: 1.5rem;
}

#contacto .section-title::after {
    background: #d4af37;
    width: 100%;
    left: 0;
}

/* Footer */
footer {
    background: #0a1419 !important;
    border-top: 2px solid #d4af37;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-section-elegante {
        min-height: 500px;
    }

    .experience-item,
    .education-item,
    .skill-category {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }

    /* Ajustar navegación */
    .navbar-brand {
        font-size: 1.3rem;
    }

    /* Ajustar botones en secciones */
    .btn {
        font-size: 0.95rem;
        padding: 0.5rem 1rem !important;
    }

    /* Ajustar iconos decorativos */
    .d-none.d-lg-block {
        font-size: 3rem !important;
    }

    /* Mejorar espaciado */
    .row {
        row-gap: 1rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.7rem;
    }

    .display-4 {
        font-size: 2.2rem !important;
        letter-spacing: 0 !important;
    }

    .lead {
        font-size: 1.05rem;
    }

    .hero-section-elegante {
        min-height: 350px;
        padding: 1.5rem 0;
    }

    .profile-image img {
        width: 150px !important;
        height: 150px !important;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem !important;
    }

    .experience-item,
    .education-item,
    .skill-category,
    .language-item {
        padding: 1.2rem 1rem !important;
        margin-bottom: 1rem !important;
    }

    .skill-item {
        margin-bottom: 1rem !important;
    }

    .contact-card {
        padding: 1.2rem 0.8rem !important;
    }

    .social-links-footer a {
        width: 45px !important;
        height: 45px !important;
        font-size: 0.9rem;
    }

    .btn-warning {
        font-size: 0.95rem;
        padding: 0.6rem 1.2rem !important;
    }

    .row > div {
        margin-bottom: 0.8rem;
    }

    /* Ocultar iconos decorativos en móvil */
    .d-none.d-lg-block {
        display: none !important;
    }

    /* Mejorar espaciado en secciones */
    section {
        padding: 2rem 0 !important;
    }

    .container {
        padding: 0 1rem !important;
    }

    /* Texto más legible en móvil */
    body {
        font-size: 0.95rem;
    }

    h5 {
        font-size: 1.1rem !important;
    }

    .section-title::after {
        width: 50px;
    }
}

/* Scroll smooth */
section {
    scroll-margin-top: 80px;
}

/* Optimización para todos los dispositivos */
img {
    max-width: 100%;
    height: auto;
}

/* Estilos para dirección y teléfono en móvil */
.direccion-telefono {
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 576px) {
    .direccion-telefono {
        font-size: 1rem !important;
        line-height: 1.6;
    }

    .direccion-telefono br {
        content: '';
    }
}

/* Mejorar legibilidad en pantallas pequeñas */
@media (max-width: 991px) {
    .profile-image img {
        width: 160px !important;
        height: 160px !important;
    }

    .divider-elegante {
        width: 60px;
    }
}

/* Asegurar scroll suave en todos los navegadores */
@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

/* Sección Hero */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

.profile-image {
    animation: float 3s ease-in-out infinite;
}

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

.social-links a {
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Títulos de Sección */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    color: #212529;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Items de Experiencia */
.experience-item {
    padding: 2rem;
    border-left: 4px solid #667eea;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.experience-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.experience-item h4 {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.experience-item .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

/* Categorías de Habilidades */
.skill-category {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.skill-category h5 {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 1rem;
}

.skill-item {
    margin-bottom: 1.2rem;
}

.skill-item span {
    font-weight: 500;
    color: #333;
}

.progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 1s ease;
}

/* Items de Educación */
.education-item {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.education-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.education-item h5 {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Tarjetas de Contacto */
.contact-card {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.contact-card a {
    color: #ffc107;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-card a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Links en Footer */
.social-links-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links-footer a:hover {
    transform: scale(1.2) rotate(5deg);
    background-color: #ffc107;
    color: #212529;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-section {
        min-height: 500px;
    }

    .experience-item,
    .education-item,
    .skill-category {
        padding: 1.5rem 1rem;
    }

    .social-links-footer a {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.7rem;
    }

    .display-4 {
        font-size: 2.5rem !important;
    }

    .lead {
        font-size: 1.1rem;
    }

    .hero-section {
        min-height: 400px;
        padding: 2rem 0;
    }

    .row > div {
        margin-bottom: 1rem;
    }
}

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

.experience-item,
.education-item,
.skill-category {
    animation: fadeInUp 0.6s ease-out;
}

/* Navbar personalizado */
.navbar-brand {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: #ffc107 !important;
}

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

.nav-link:hover {
    color: #667eea !important;
}

/* Scroll Smooth */
section {
    scroll-margin-top: 80px;
}

/* Botones */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
}

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

/* Efecto parallax sutil */
.hero-section {
    background-attachment: fixed;
}

/* Sección de Idiomas */
.language-item {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 3px solid #667eea;
}

.language-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.language-item h5 {
    color: #333;
    font-weight: 600;
}

/* Mejorar botones */
.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background-color: #ffb300;
    border-color: #ffb300;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    color: #212529 !important;
}

/* Animación suave entrada */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar {
    animation: slideInDown 0.6s ease-out;
}

/* Sombra mejorada en hero */
.hero-section {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) inset;
}

/* Transición suave en secciones */
section {
    transition: background-color 0.3s ease;
}
/* ===== ESTILOS PORTAFOLIO ===== */
.portfolio-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(26, 58, 82, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(26, 58, 82, 0.2);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: linear-gradient(135deg, #1a3a52 0%, #0d1f2d 100%);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 58, 82, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.portfolio-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-content h5 {
    color: #1a3a52;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.portfolio-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.tech-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tags .badge {
    background-color: #1a3a52 !important;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-card {
    animation: fadeInUp 0.6s ease-out both;
}

.portfolio-card:nth-child(1) { animation-delay: 0.1s; }
.portfolio-card:nth-child(2) { animation-delay: 0.2s; }
.portfolio-card:nth-child(3) { animation-delay: 0.3s; }
.portfolio-card:nth-child(4) { animation-delay: 0.4s; }