/**
* Template Name: iPortfolio - v3.9.1 (Rediseñado)
* Template URL: https://bootstrapmade.com/iportfolio-bootstrap-portfolio-websites-template/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
  font-family: "Open Sans", sans-serif;
  color: #272829;
  font-size: 16px;
  line-height: 1.6;
  background-color: #fafafa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #149ddd;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #37b3ed;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Raleway", sans-serif;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: #173b6c;
}

/*--------------------------------------------------------------
# Back to top button
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 996;
  background: #149ddd;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(20, 157, 221, 0.5);
}

.back-to-top i {
  font-size: 26px;
  color: #fff;
  line-height: 0;
}

.back-to-top:hover {
  background: #2eafec;
  color: #fff;
  box-shadow: 0 6px 16px rgba(20, 157, 221, 0.8);
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  transition: all ease-in-out 0.5s;
  z-index: 9997;
  transition: all 0.5s;
  padding: 0 15px;
  background: #040b14;
  overflow-y: auto;
}

#header .profile img {
  margin: 15px auto;
  display: block;
  width: 120px;
  border: 8px solid #2c2f3f;
}

#header .profile h1 {
  font-size: 24px;
  margin: 0;
  padding: 0;
  font-weight: 600;
  -moz-text-align-last: center;
  text-align-last: center;
  font-family: "Poppins", sans-serif;
}

#header .profile h1 a,
#header .profile h1 a:hover {
  color: #fff;
  text-decoration: none;
}

#header .profile .social-links a {
  font-size: 18px;
  display: inline-block;
  background: #212431;
  color: #fff;
  line-height: 1;
  padding: 8px 0;
  margin-right: 4px;
  border-radius: 50%;
  text-align: center;
  width: 36px;
  height: 36px;
  transition: 0.3s;
}

#header .profile .social-links a:hover {
  background: #149ddd;
  color: #fff;
  text-decoration: none;
}

#main {
  margin-left: 300px;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 1199px) {
  #header {
    left: -280px;
    box-shadow: none;
  }

  #main {
    margin-left: 0;
    padding: 20px;
  }
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop Navigation */
.nav-menu {
  padding: 30px 0 0 0;
  width: 100%;
}

.nav-menu * {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu>ul>li {
  position: relative;
  white-space: nowrap;
}

.nav-menu a,
.nav-menu a:focus {
  display: flex;
  align-items: center;
  color: #a8a9b4;
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: color 0.3s ease;
  font-size: 16px;
  border-radius: 8px;
}

.nav-menu a i,
.nav-menu a:focus i {
  font-size: 24px;
  padding-right: 10px;
  color: #6f7180;
  transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu .active,
.nav-menu .active:focus,
.nav-menu li:hover>a {
  text-decoration: none;
  color: #fff;
  background-color: #149ddd;
  box-shadow: 0 4px 10px rgba(20,157,221,0.3);
}

.nav-menu a:hover i,
.nav-menu .active i,
.nav-menu .active:focus i,
.nav-menu li:hover>a i {
  color: #fff;
}

/* Mobile Navigation */
.mobile-nav-toggle {
  position: fixed;
  right: 15px;
  top: 15px;
  z-index: 9998;
  border: 0;
  font-size: 26px;
  transition: all 0.4s ease;
  outline: none !important;
  background-color: #149ddd;
  color: #fff;
  width: 45px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(20, 157, 221, 0.7);
}

.mobile-nav-active {
  overflow: hidden;
}

.mobile-nav-active #header {
  left: 0;
  box-shadow: 3px 0 20px rgba(0,0,0,0.3);
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
#hero {
  width: 100%;
  height: 100vh;
  background: url("../img/hero-bg.jpg") top center no-repeat;
  background-size: cover;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: left;
  text-align: center;
  padding: 0 15px;
}

#hero:before {
  content: "";
  background: rgba(5, 13, 24, 0.5);
  position: absolute;
  bottom: 0;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

#hero .hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px; /* Por ejemplo, a 1200px para que coincida con #main */
  width: 100%;
}

#hero h1 {
  margin: 0 0 15px;
  font-size: 72px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

#hero p {
  color: #fff;
  margin-bottom: 50px;
  font-size: 28px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

#hero p span {
  color: #fff;
  padding-bottom: 6px;
  letter-spacing: 1.5px;
  border-bottom: 4px solid #149ddd;
  font-weight: 700;
}

@media (min-width: 1024px) {
  #hero {
    background-attachment: fixed;
  }
}

@media (max-width: 768px) {
  #hero h1 {
    font-size: 36px;
    line-height: 42px;
  }

  #hero p {
    font-size: 18px;
    margin-bottom: 30px;
  }
}

/*--------------------------------------------------------------
# Sections General
--------------------------------------------------------------*/
section {
  padding: 80px 0;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
}

.section-bg {
  background: #f5f8fd;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(5, 13, 24, 0.07);
  padding: 60px 40px;
}

.section-title {
  padding-bottom: 40px;
  text-align: center;
}

.section-title h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 0;
  color: #173b6c;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section-title h2::after {
  content: "";
  position: absolute;
  display: block;
  width: 60px;
  height: 4px;
  background: #149ddd;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
}

.section-title p {
  margin-top: 15px;
  font-size: 18px;
  color: #56687e;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/*--------------------------------------------------------------
# About
--------------------------------------------------------------*/
.about .content h3 {
  font-weight: 700;
  font-size: 28px;
  color: #173b6c;
  margin-bottom: 25px;
}

.about .content ul {
  list-style: none;
  padding: 0;
}

.about .content ul li {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  font-size: 18px;
  color: #405060;
}

.about .content ul strong {
  margin-right: 12px;
  color: #149ddd;
  font-weight: 600;
}

.about .content ul i {
  font-size: 20px;
  margin-right: 10px;
  color: #149ddd;
  line-height: 0;
}

.about .content p:last-child {
  margin-bottom: 0;
  font-size: 18px;
  color: #56687e;
  max-width: 750px;
}

/*--------------------------------------------------------------
# Facts
--------------------------------------------------------------*/
.facts {
  padding-bottom: 50px;
  text-align: center;
}

.facts .count-box {
  padding: 30px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(20, 157, 221, 0.1);
  width: 100%;
  max-width: 280px;
  margin: 0 auto 30px;
  transition: transform 0.3s ease;
}

.facts .count-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 32px rgba(20, 157, 221, 0.2);
}

.facts .count-box i {
  font-size: 48px;
  color: #149ddd;
  margin-bottom: 15px;
}

.facts .count-box span {
  font-size: 56px;
  font-weight: 700;
  color: #050d18;
  display: block;
  margin-bottom: 10px;
}

.facts .count-box p {
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  color: #122f57;
  margin: 0;
}

.facts .count-box a {
  font-weight: 600;
  display: inline-block;
  margin-top: 15px;
  color: #149ddd;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  transition: color 0.3s ease;
}

.facts .count-box a:hover {
  color: #0f5ea1;
}

/*--------------------------------------------------------------
# Skills
--------------------------------------------------------------*/
.skills .progress {
  height: 16px;
  background: #dce8f8;
  border-radius: 20px;
  margin-bottom: 20px;
  overflow: hidden;
}

.skills .progress .skill {
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  color: #050d18;
  margin-bottom: 8px;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
}

.skills .progress .skill .val {
  font-style: normal;
  color: #149ddd;
}

.skills .progress-bar {
  background-color: #149ddd;
  height: 16px;
  width: 0;
  transition: width 1.2s ease-in-out;
  border-radius: 20px;
}

/*--------------------------------------------------------------
# Resume
--------------------------------------------------------------*/
.resume .resume-title {
  font-size: 28px;
  font-weight: 700;
  margin: 30px 0 30px;
  color: #050d18;
  border-bottom: 3px solid #149ddd;
  padding-bottom: 10px;
}

.resume .resume-item {
  padding-left: 25px;
  margin-bottom: 30px;
  border-left: 3px solid #149ddd;
  position: relative;
}

.resume .resume-item h4 {
  font-size: 20px;
  font-weight: 700;
  color: #050d18;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-family: "Poppins", sans-serif;
}

.resume .resume-item h5 {
  font-size: 16px;
  background: #e4edf9;
  padding: 6px 20px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 15px;
  border-radius: 30px;
  color: #173b6c;
}

.resume .resume-item ul {
  padding-left: 20px;
  color: #56687e;
  font-size: 16px;
}

.resume .resume-item ul li {
  padding-bottom: 10px;
  line-height: 1.5;
}

.resume .resume-item::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  left: -12px;
  top: 8px;
  background: #149ddd;
}

/*--------------------------------------------------------------
# Portfolio
--------------------------------------------------------------*/
.portfolio {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.portfolio #portfolio-flters {
  padding: 0;
  margin: 0 auto 40px auto;
  list-style: none;
  text-align: center;
  background: #fff;
  border-radius: 50px;
  padding: 6px 20px;
  max-width: 450px;
  box-shadow: 0 4px 20px rgba(20, 157, 221, 0.1);
}

.portfolio #portfolio-flters li {
  cursor: pointer;
  display: inline-block;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: #272829;
  margin: 0 8px 8px 0;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  user-select: none;
}

.portfolio #portfolio-flters li:hover,
.portfolio #portfolio-flters li.filter-active {
  color: #fff;
  background: #149ddd;
  box-shadow: 0 4px 18px rgba(20, 157, 221, 0.3);
}

.portfolio .portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.portfolio .portfolio-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(5, 13, 24, 0.08);
  background: #fff;
  transition: box-shadow 0.4s ease;
}

.portfolio .portfolio-wrap:hover {
  box-shadow: 0 16px 50px rgba(20, 157, 221, 0.25);
}

.portfolio .portfolio-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  transition: transform 0.3s ease;
}

.portfolio .portfolio-wrap:hover img {
  transform: scale(1.07);
}

.portfolio-info {
  padding: 15px 20px;
  color: #173b6c;
}

.portfolio-info h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #149ddd;
}

.portfolio-info p {
  font-size: 14px;
  color: #405060;
  margin-bottom: 10px;
}

.portfolio-links {
  display: flex;
  gap: 10px;
}

.portfolio-links a {
  color: #149ddd;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  background: #e4edf9;
  box-shadow: 0 4px 8px rgba(20, 157, 221, 0.15);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.portfolio-links a:hover {
  background-color: #149ddd;
  color: #fff;
  box-shadow: 0 6px 15px rgba(20, 157, 221, 0.6);
}

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/
.contact .info {
  background: #fff;
  padding: 30px 20px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(5, 13, 24, 0.07);
  margin-bottom: 30px;
}

.contact .info i {
  font-size: 28px;
  color: #149ddd;
  float: left;
  width: 44px;
  height: 44px;
  background: #e4edf9;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  margin-right: 18px;
  transition: background-color 0.3s ease;
}

.contact .info h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #173b6c;
}

.contact .info p {
  font-size: 16px;
  color: #56687e;
  margin-bottom: 0;
}

.contact .php-email-form input,
.contact .php-email-form textarea {
  border-radius: 8px;
  padding: 12px 15px;
  border: 1px solid #ccc;
  font-size: 16px;
  width: 100%;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
}

.contact .php-email-form input:focus,
.contact .php-email-form textarea:focus {
  border-color: #149ddd;
  outline: none;
}

.contact .php-email-form button[type=submit] {
  border-radius: 8px;
  padding: 14px 30px;
  font-size: 18px;
  background-color: #149ddd;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(20, 157, 221, 0.5);
}

.contact .php-email-form button[type=submit]:hover {
  background-color: #0f7cc1;
  box-shadow: 0 6px 18px rgba(20, 157, 221, 0.8);
}

.contact .php-email-form .loading,
.contact .php-email-form .error-message,
.contact .php-email-form .sent-message {
  display: none;
  font-weight: 600;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  text-align: center;
}

.contact .php-email-form .loading {
  color: #149ddd;
  display: block;
}

.contact .php-email-form .error-message {
  color: #ff4c51;
  background: #ffd7d9;
}

.contact .php-email-form .sent-message {
  color: #27ae60;
  background: #d5f6dd;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/

@media (min-width: 992px) {
  #main {
    margin-left: 240px;
    padding: 30px 20px;
    max-width: calc(100vw - 240px);
    box-sizing: border-box;
  }
  #header {
    width: 240px;
    padding: 25px 15px 35px;
  }
}

@media (max-width: 991px) {
  #main {
    margin-left: 0; /* ✅ Evita el desbordamiento en móviles */
    padding: 20px 15px;
  }
}

@media (max-width: 768px) {
  #header {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100%;
    width: 280px;
    padding: 20px 15px 40px;
    box-shadow: none;
    z-index: 9999;
    background: #040b14;
  }

  #header.active {
    left: 0;
    box-shadow: 3px 0 30px rgba(0, 0, 0, 0.3);
  }

  #main {
    margin-left: 0;
    padding: 20px;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .nav-menu {
    padding: 0;
  }

  .nav-menu a {
    padding: 12px 15px;
    font-size: 18px;
  }

  .portfolio .portfolio-container {
    grid-template-columns: 1fr;
  }

  #hero h1 {
    font-size: 36px;
  }

  #hero p {
    font-size: 18px;
  }
  html, body {
    overflow-x: hidden;
  }
}
