/* ===== RESET Y ESTILOS GENERALES ===== */
* {
    list-style: none;
    outline: none !important;
}

*:focus {
    outline: none !important;
}

*:focus-visible {
    outline: 2px solid #3c4979 !important;
    outline-offset: 2px;
}

::selection {
    background: #3c4979;
    color: #fff;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p {
    font-family: "Montserrat", sans-serif;
}

body {
    overflow: hidden !important;
    background-color: var(--background);
    color: var(--text) !important;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

/* ===== VARIABLES Y THEME SWITCHER ===== */
[data-theme="light"] {
    --primary: #41d62a;
    --background: #f2f1f159;
    --text: #555555;
}

[data-theme="dark"] {
    --primary: #555;
    --background: rgb(34 34 34);
    --text: rgb(255, 255, 255) !important;
}

/* Switcher - Estructura General */
.switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5%;
}

.switcher, 
.switcher *, 
.slider:active {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    border: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Iconos del Switcher */
.fa-moon { 
    font-size: x-large; 
    position: relative; 
    right: 7px; 
}

.fa-sun { 
    font-size: x-large; 
    position: relative; 
    left: 7px; 
}

/* Switch (Contenedor e Input) */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0 !important;
    width: 0;
    height: 0;
}

/* Slider (Fondo y Círculo) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: #fff;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px; 
    width: 26px;
    left: 4px; 
    bottom: 4px;
    background: #1d1d1d;
    transition: .4s;
    border-radius: 50%;
}

/* Estados del Switch */
input:checked + .slider { 
    background-color: rgb(224, 224, 224); 
}

input:checked + .slider:before {
    transform: translateX(26px);
    background: #fcfff4;
}

/* ===== HEADER Y NAVEGACIÓN ===== */
.bgimg {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-image: url('/images/Esteban_Figueroa.jpeg');
    min-height: 100%;
}

#mySidebar {
    overflow: hidden;
    background: #2b355ae3 !important;
    backdrop-filter: blur(25px);
}


.title {
    font-size: 2.5rem;
    font-weight: 100;
}

.personal {
    letter-spacing: 3px;
}

.social {
    letter-spacing: 0.5rem;
}

.socialnav {
    margin: 70px 0;
    color: #ffffff;
    letter-spacing: 1.5rem;
}

.copy {
    font-size: 1rem;
}

/* ===== BOTONES Y CONTROLES ===== */
.w3-button {
    background: none !important;
}

.w3-button:hover {
    background: none !important;
    cursor: pointer !important;
    color: unset !important;
}

.w3-red, .w3-hover-red:hover {
    color: #fff !important;
    background-color: #f44336 !important;
}

.button-color {
    background-color: #3c4979 !important;
    color: white !important;
}

.custom_btn {
    width: 250px;
}

.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: white;
    border: 2px solid red;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    color: red;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, color 0.3s;
}

.close-btn:hover {
    background-color: red;
    color: white;
}

.arriba {
    font-size: xx-large;
    position: fixed;
    bottom: 106px;
    right: 21px;
    z-index: 1;
    cursor: pointer;
    display: none;
}

/* ===== ENLACES PERSONALIZADOS ===== */
.custom {
    overflow: hidden;
    position: relative;
    display: inline-block;
    vertical-align: top;
}

.custom::before,
.custom::after {
    content: '';
    position: absolute;
    width: 100%;
    left: 0;
}

.custom::before {
    background-color: #54b3d6;
    height: 2px;
    bottom: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: transform .3s cubic-bezier(0.76, 0, 0.24, 1);
}

.custom::after {
    content: attr(data-replace);
    height: 100%;
    top: 0;
    transform-origin: 100% 50%;
    transform: translate3d(200%, 0, 0);
    transition: transform .3s cubic-bezier(0.76, 0, 0.24, 1);
    color: #3c4979;
}

.custom:hover::before {
    transform-origin: 0% 50%;
    transform: scaleX(1);
}

.custom:hover::after {
    transform: translate3d(0, 0, 0);
}

.custom span {
    display: inline-block;
    transition: transform .3s cubic-bezier(0.76, 0, 0.24, 1);
}

.custom:hover span {
    transform: translate3d(-200%, 0, 0);
}

.link {
    transition: 0.3s ease-out !important;
}

.link:hover {
    background: #383838 !important;
    color: #ffffff !important;
    transition: 0.3s ease-in;
}

/* ===== CONTENEDORES Y LAYOUT ===== */
.container {
    width: 100%;
}

.w3-row-padding img {
    margin-bottom: 12px;
}

.containeriframe {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 56.25%;
    transition: 0.3s ease-out !important;
}

#caja {
    background-color: #474e5d;
    font-family: Helvetica, sans-serif;
    height: 400px;
    overflow-y: scroll;
    text-align: left;
}

#caja h3 {
    font-size: 22px;
}

#caja,
.content {
    color: #36383c;
}

/* ===== HABILIDADES Y SKILLS ===== */
.skill-item {
    padding: 10px;
    display: flex;
    align-items: center;
}

.skill-icon {
    font-size: 30px;
    margin-bottom: 5px;
}

.item-text {
    padding-left: 10px;
}

.habilidades .fa-brands {
    line-height: 3rem;
    font-size: large;
}

.habilidades .fa-solid {
    line-height: 3rem;
    font-size: large;
}

.icon_title {
    padding-right: 5px;
}

.icon_habilidades.open {
    top: 10px;
}

/* ===== LISTAS PERSONALIZADAS ===== */
.custom-list {
    padding-left: 0px !important;
}

.custom-list li {
    margin-bottom: 10px;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    color: var(--text) !important;
    box-shadow: 1px 1px 25px #d3d3d347;
}

.custom-list li i {
    margin-right: 10px;
    color: #3c4979 !important;
    min-width: 20px;
}

/* ===== ACORDEÓN ===== */
.accordion {
    color: var(--text);
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: 1px solid rgb(184 184 184);
    text-align: left;
    outline: none;
    font-size: 15px;
    transition: 0.4s;
    margin-bottom: 1px;
    background: var(--background);
}

.active,
.accordion:hover {
    background-color: #3c4979;
    color: #fff;
}

.accordion:after {
    content: '\002B';
    color: rgb(184 184 184);
    font-weight: bold;
    float: right;
    margin-left: 5px;
}

.accordion:hover:after {
    color: #fff;
}

.active:after {
    content: "\2212";
    color: #fff;
}

.panel {
    padding: 0 18px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.2s ease-out;
    color: var(--text);
    background: var(--background);
}

details {
    position: relative;
    left: 36px;
    cursor: pointer;
    bottom: 34px;
    width: 80%;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: white;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.contenedor {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.contenedor::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12px;
    background-color: white;
    border: 4px solid #3c4979;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.right::after {
    left: -12px;
}

.content {
    padding: 20px 30px;
    background-color: #ffff;
    position: relative;
    border-radius: 6px;
}

/* ===== MODALES ===== */
.w3-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    height: 80vh;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    max-height: 90vh;
    margin: 0 auto;
}

.w3-modal-content {
    color: #fff;
    background: #3c497994;
    backdrop-filter: blur(10px);
}

/* ===== IFRAMES ===== */
.responsive-iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== DROPDOWN DE IDIOMA ===== */
.language-dropdown {
    position: relative;
    display: block;
}

.dropdown-content {
    display: none;
    position: relative;
    background-color: var(--background);
    color: var(--text) !important;
    width: 250px;
    margin: auto;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    top: 100%;
    left: 0;
    margin-top: 5px;
}

.dropdown-content a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: var(--text) !important;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.flag-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.flag-round {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    overflow: hidden;
    display: inline-block;
}

.flag-round .fi {
    border-radius: 50%;
}

/* Modo oscuro para dropdown */
.dark-mode .dropdown-content {
    background-color: #333;
    color: white;
}

.dark-mode .dropdown-content a {
    color: white;
}

.dark-mode .dropdown-content a:hover {
    background-color: #555;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 10px;
    background: #3c4979;
    width: 0;
    z-index: 2;
}

/* ===== ELEMENTOS DE TEXTO ===== */
.descripcion {
    font-size: 1.2rem;
}

.descripcion .icon {
    padding-right: 5px;
}

.lkd {
  
    margin: 5px 15px 0 0;
    float: left;
}

/* LKD */


.linkedin-widget-compact {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    max-width: 300px;
    overflow: hidden;
    border: 1px solid #e0e6ed;
    transition: all 0.2s ease;
}

.linkedin-widget-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

/* Header compacto */
.widget-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.linkedin-icon {
    background: #0077b5;
    color: white;
    font-weight: 700;
    font-size: 14px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.5px;
}

.widget-title {
    color: #2d3748;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenido */
.widget-content {
    padding: 20px;
}

/* Avatar con recorte de cabeza */
.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.avatar-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* Ajusta para enfocar la cara */
    transform: scale(1.1); /* Amplía ligeramente para mejor recorte */
}

/* Texto del perfil */
.profile-text {
    flex: 1;
}

.profile-name {
    margin: 0 0 8px 0;
    color: #1a202c;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.profile-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.role {
    background: #f0f7ff;
    color: #0077b5;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid #dbeafe;
}

/* Botón compacto */
.view-profile-btn {
    display: block;
    width: 100%;
    background: #0077b5;
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.view-profile-btn:hover {
    background: #005582;
    transform: translateY(-1px);
}


/* ===== MEDIA QUERIES ===== */

@media (max-width: 600px) {
    
    .linkedin-widget-compact {
        max-width: 100%;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .avatar-container {
        margin: 0 auto;
    }
    
    .sidebar_custom {
    width: 100% !important;
    }
    
    .w3-modal-content {
        width: 95% !important;
        margin: auto !important;
        height: 90vh;
        overflow: scroll;
    }
    
    .w3-third {
        width: 100% !important;
        display: block;
        margin-bottom: 16px;
    }
    
    .skill-item {
        justify-content: flex-start;
    }
    
    .modal-content {
        width: calc(100% - 40px);
        max-height: 90vh;
    }
    
    .responsive-iframe {
        height: 70vh;
    }
    
    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 5px;
        right: 5px;
    }
}

@media (max-width: 617px) {
    .social {
        letter-spacing: 5px;
    }
    
    .socialnav {
        letter-spacing: 5px;
    }
}

@media (max-width: 500px) {
    .lkd {
        float: none;
        margin: auto;
    }
}

@media (max-width: 349px) {
    .title {
        font-size: 1.6rem;
    }
    
    .header {
        padding: 10px 0 !important;
    }
}

/* Timeline Media Queries */
@media screen and (max-width: 600px) {
    .timeline::after {
        left: 31px;
    }
    
    .contenedor {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .contenedor::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }
    
    .left::after,
    .right::after {
        left: 15px;
    }
    
    .right {
        left: 0%;
    }
}

@media (max-width: 992px) and (orientation: landscape) {
    .sidebar_custom {
    width: 100% !important;
  }
}

