/*
Template Name: Tunis - Personal Portfolio
Author: celtano
Author URI: http://themeforest.net/user/celtano
Description: Tunis - Personal Portfolio
Version: 1.0
*/

/*------------------------------------------------------------------
[Table of contents]
	+ General
	    - Miscellaneous
		- Light Body
		- Buttons
		- Page Title
	+ Header
		- Desktop Navigation
		- Mobile Navigation
	+ Pages
		- Homepage
		+ About
		    - Personal Info List
			- Box Stats
			- Resume
			- Skills
		+ Portfolio
		    - Grid
		    + Slideshow
                - Embedded Videos
                - Carousel
                - Navigation
        + Contact
            - Left Side
            - Contact Form
		+ Blog
            - Latest Posts
            - Pagination
	- Responsive Design Styles
-------------------------------------------------------------------*/

/* [ GENERAL ] */
/*================================================== */

/*** Miscellaneous ***/

html {
  overflow-x: hidden;
  height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  color: #fff;
  font-weight: 500;
  line-height: 1.6;
  position: relative;
  background-size: cover;
  background-position: center;
  height: 100%;
  width: 100%;
  background-color: #111;
}

.poppins-font {
  font-family: 'Poppins', sans-serif;
}

.open-sans-font {
  font-family: 'Open Sans', sans-serif;
}

hr.separator {
  border-top: 1px solid #252525;
  margin: 70px auto 55px;
  max-width: 40%;
}

.ft-wt-600 {
  font-weight: 600;
}

.mb-30 {
  margin-bottom: 30px;
}

.no-transform {
  transform: none !important;
}

.custom-title {
  padding-bottom: 22px;
  font-size: 26px;
}

/*** Light Body ***/

body.light {
  color: #666;
  background-color: #fff;
}

body.home.light .home-details h1 span,
body.light .button .button-text {
  color: #666;
}

body.light .button:hover .button-text {
  color: #fff;
}

body.home.light .home-details h6 {
  color: #777;
}

body.light .preloader .black_wall {
  background-color: #eee;
}

body.light .preloader {
  background-color: #fff;
}

body.light .title-section h1 {
  color: #666;
}

body.light .title-bg {
  color: rgba(30, 37, 48, 0.07);
}

body.light.about .box-stats {
  border: 1px solid #ddd;
}

body.light.about .c100,
body.light.about .resume-box .time {
  background-color: #eee;
}

body.light.about .resume-box .time,
body.light.about .resume-box p {
  color: #666;
}

body.light.about .resume-box .place:before {
  background-color: #666;
}

body.light.about  .resume-box li:after {
  border-left: 1px solid #ddd;
}

body.light.about .c100 > span {
  color: #666;
}

body.light.about .c100:after {
  background-color: #fff;
}

body.light.portfolio .slideshow figure {
  background-color: #fff;
}

body.light.portfolio .slideshow ul > li:after {
  background: rgba(255,255,255,0.77);
}

body.light.portfolio .slideshow {
  background: rgba(0,0,0,0.7);
}

body.light.contact .contactform input[type=text],
body.light.contact .contactform input[type=email],
body.light.contact .contactform textarea {
  background-color: #fff;
  border: 1px solid #ddd;
  color: #666;
}

body.light.contact  ul.social li a {
  color: #666;
  background: #eee;
}

body.light.contact  ul.social li a:hover {
  color: #fff;
}

body.light.blog .post-content {
  background-color: #f2f2f2;
}

body.light.blog .post-content .entry-header h3 a {
  color: #666;
}

body.light.blog .page-link {
  color: #666;
  background-color: #eee;
  border: 1px solid #eee;
}

body.light.blog-post .meta {
  color: #888;
}

body.light.blog .page-item.active .page-link {
  color: #fff;
}

body.light hr.separator {
  border-top: 1px solid #ddd;
}

@media (min-width: 992px) {
  body.light .header ul.icon-menu li.icon-box {
    background-color: #eee;
  }

  body.light .header ul.icon-menu li.icon-box i {
    color: #666;
  }

  body.light .header ul.icon-menu li.icon-box.active,
  body.light .header ul.icon-menu li.icon-box:hover,
  body.light .header ul.icon-menu li.icon-box.active i,
  body.light .header ul.icon-menu li.icon-box:hover i {
    color: #fff;
  }
}

@media (max-width: 991px) {

  body.light .main-img-mobile {
    border: 4px solid #eee;
  }

  body.light #menuToggle {
    border: 1px solid #ddd;
  }

  body.light #menuToggle,
  body.light #menu {
    background: #eee;
  }

  body.light #menuToggle > span,
  body.light #menuToggle input:checked ~ span {
    background: #666;
  }

  body.light #menu li a {
    color: #666;
  }

  body.light #menu li:after {
    background: #ddd;
  }

  body.light.portfolio .slideshow nav {
    background: #eee;
    border-bottom: 1px solid #ddd;
  }

  body.light.portfolio .slideshow nav span img {
    display: none;
  }

  body.light.portfolio .slideshow nav span.nav-next {
    background-image: url("../img/projects/navigation/right-arrow.png");
    background-size: cover;
  }

  body.light.portfolio .slideshow nav span.nav-prev {
    background-image: url("../img/projects/navigation/left-arrow.png");
    background-size: cover;
  }

  body.light.portfolio .slideshow nav span.nav-close {
    background-image: url("../img/projects/navigation/close-button.png");
    background-size: cover;
  }

  body.light.portfolio .slideshow nav span.nav-next,
  body.light.portfolio .slideshow nav span.nav-prev {
    top: 51px;
  }

  body.light.portfolio .slideshow {
    background: #fff;
  }
}

@media (max-width: 576px) {
  body.light .title-section {
    background: #eee;
    border-bottom: 1px solid #ddd;
  }

  body.light #menuToggle {
    border: 0;
  }

  body.light.portfolio .slideshow nav span.nav-next,
  body.light.portfolio .slideshow nav span.nav-prev {
    top: 31px;
  }
}
/*** Buttons ***/
.button {
  overflow: hidden;
  display: inline-block;
  line-height: 1.4;
  border-radius: 35px;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  cursor: pointer;
  vertical-align: middle;
  user-select: none;
  transition: 250ms all ease-in-out;
  text-transform: uppercase;
  text-decoration: none !important;
  position: relative;
  z-index: 1;
  padding: 16px 70px 16px 35px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background-color: transparent;
  outline: none !important;
}

.button .button-text {
  position: relative;
  z-index: 2;
  color: #fff;
  transition: .3s ease-out all;
}

.button:before {
  z-index: -1;
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateX(100%);
  transition: .3s ease-out all;
}

.button:hover .button-text {
  color: #ffffff;
}

.button:hover:before {
  transform: translateX(0);
}

.button-icon {
  position: absolute;
  right: -1px;
  top: -1px;
  bottom: 0;
  width: 55px;
  height: 55px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 19px;
  color: #ffffff;
  border-radius: 50%;
}

/*** Page Title ***/

.title-section {
  margin: 0 auto;
  width: 100%;
  position: relative;
  padding: 80px 0;
}

.title-section h1 {
  font-size: 56px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  margin: 0;
}

.title-bg {
  font-size: 110px;
  left: 0;
  letter-spacing: 10px;
  line-height: 0.7;
  position: absolute;
  right: 0;
  top: 50%;
  text-transform: uppercase;
  font-weight: 800;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.07);
}

/* [ HEADER ] */
/*================================================== */

/*** Desktop Navigation ***/

@media (min-width: 992px) {

  /*** Navigation ***/

  .header {
    position: fixed;
    right: 30px;
    bottom: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    height: calc(100vh - 200px);
    top: 100px;
    opacity: 1;
    transition: opacity 0.3s;
    -webkit-transition: opacity 0.3s;
  }

  .header.hide-header {
    z-index: 0 !important;
    opacity: 0;
  }

  .header ul.icon-menu {
    margin: 0;
    padding: 0;
  }

  .header ul.icon-menu li.icon-box {
    width: 50px;
    height: 50px;
    list-style: none;
    position: relative;
    display: flex;
    align-items: center;
    transition: .3s;
    margin: 20px 0;
    border-radius: 50%;
    background: #2b2a2a;
  }

  .header ul.icon-menu li.icon-box i {
    color: #ddd;
    font-size: 19px;
    transition: .3s;
  }

  .header ul.icon-menu li.icon-box.active,
  .header ul.icon-menu li.icon-box:hover,
  .header ul.icon-menu li.icon-box.active i,
  .header ul.icon-menu li.icon-box:hover i {
    color: #fff;
  }

  .header .icon-box h2 {
    font-size: 15px;
    font-weight: 500;
  }

  .header .icon-box a {
    display: block;
    padding: 0;
    width: 50px;
    height: 50px;
  }

  .header .icon-box i.fa {
    position: absolute;
    pointer-events: none;
  }

  .header .icon-menu i {
    left: 0;
    right: 0;
    margin: 0 auto;
    display: block;
    text-align: center;
    font-size: 35px;
    top: 15px;
  }

  .header .icon-box h2 {
    z-index: -1;
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0;
    color: #fff;
    line-height: 50px;
    font-weight: 500;
    transition: all .3s;
    border-radius: 30px;
    text-transform: uppercase;
    padding: 0 25px 0 30px;
    height: 50px;
  }

  .header .icon-box a:hover h2 {
    opacity: 1;
    right: 27px;
    margin: 0;
    text-align: center;
    border-radius: 30px 0 0 30px;
  }
}

/* [ Pages ] */
/*================================================== */

/*** Homepage ***/

.home .color-block {
  position: fixed;
  height: 200%;
  width: 100%;
  transform: rotate(-15deg);
  left: -83%;
  top: -50%;
}

.home .bg {
  background-image: url(http://via.placeholder.com/610x1020);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top;
  height: calc(100vh - 80px);
  z-index: 111;
  border-radius: 30px;
  left: 40px;
  top: 40px;
  box-shadow: 0 0 7px rgba(0,0,0,.9);
}

.home .container-home {
  display: flex;
  align-items: center;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

.home .home-details > div {
  max-width: 650px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Modern Corporate Typography */
.home .home-details h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 56px;
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 15px;
  position: relative;
  letter-spacing: -1.5px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Glowing Tech Accent */
.home .home-details h1:before {
  content: '';
  position: absolute;
  left: -20px;
  top: 15px;
  bottom: 15px;
  width: 4px;
  background: #9acd32;
  box-shadow: 0 0 10px #9acd32;
  border-radius: 2px;
  display: none; /* Hidden by default, shown on large screens if desired */
}

@media (min-width: 992px) {
    .home .home-details h1:before {
        display: block;
    }
    .home .home-details h1 {
        padding-left: 0;
        margin-left: 0;
    }
}

/* Subtitle - Tech/Code Style */
.home .home-details h1 span {
  font-family: 'Fira Code', 'Courier New', monospace;
  color: #9acd32;
  display: block;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0px;
  margin-top: 10px;
  text-transform: none;
  background: rgba(154, 205, 50, 0.1);
  padding: 5px 15px;
  border-left: 3px solid #9acd32;
  width: fit-content;
  border-radius: 0 4px 4px 0;
}

/* Description Text */
.home .home-details p {
  margin: 25px 0 35px;
  font-size: 18px;
  line-height: 1.8;
  color: #d0d0d0;
  font-weight: 300;
  max-width: 90%;
}

/* Modern Professional Button */
.home .home-details .button {
    background: transparent;
    border: 2px solid #9acd32;
    color: #9acd32;
    padding: 14px 40px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
    text-decoration: none;
}

.home .home-details .button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #9acd32;
    z-index: -1;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.home .home-details .button:hover {
    color: #111;
    border-color: #9acd32;
    box-shadow: 0 10px 25px rgba(154, 205, 50, 0.4);
    transform: translateY(-3px);
}

.home .home-details .button:hover:before {
    width: 100%;
}

.home .home-details .button .button-text {
    position: relative;
    z-index: 2;
}

.home .home-details .button .button-icon {
    margin-left: 12px;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.home .home-details .button:hover .button-icon {
    transform: translateX(5px);
}

.home .home-details h6 {
  color: #eee;
  font-size: 22px;
  font-weight: 400;
  display: block;
}

.home .home-details p {
  margin: 15px 0 28px;
  font-size: 16px;
  line-height: 35px;
}

/*** About ***/

.about .main-content {
  padding-bottom: 20px;
}

/* Personal Info List */

.about .about-list li:not(:last-child) {
  padding-bottom: 20px;
}

.about .about-list .title {
  opacity: .8;
  text-transform: capitalize;
}

.about .about-list .value {
  font-weight: 600;
}

/* Box Stats */

.about .box-stats {
  padding: 20px 30px 25px 40px;
  border-radius: 5px;
  border: 1px solid #252525;
}

.about .box-stats.with-margin {
  margin-bottom: 30px;
}

.about .box-stats h3 {
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: 50px;
  font-weight: 700;
}

.about .box-stats h3:after {
  content: '+';
  position: absolute;
  right: -24px;
  font-size: 33px;
  font-weight: 300;
  top: 2px;
}

.about .box-stats p {
  padding-left: 45px;
}

.about .box-stats p:before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 30px;
  height: 1px;
  background: #777;
}

/* Resume */

.about .resume-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about .resume-box li {
  position: relative;
  padding: 0 20px 0 60px;
  margin: 0 0 50px;
}

.about .resume-box li:after {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  bottom: 0;
  border-left: 1px solid #333;
}

.about .resume-box .icon {
  width: 40px;
  height: 40px;
  position: absolute;
  left: 0;
  right: 0;
  line-height: 40px;
  text-align: center;
  z-index: 1;
  border-radius: 50%;
  color: #fff;
  background-color: #252525;
}

.about .resume-box .time {
  color: #fff;
  font-size: 12px;
  padding: 1px 10px;
  display: inline-block;
  margin-bottom: 12px;
  border-radius: 20px;
  font-weight: 600;
  background-color: #252525;
  opacity: .8;
}

.about .resume-box h5 {
  font-size: 18px;
  margin: 7px 0 10px;
}

.about .resume-box p {
  margin: 0;
  color: #eee;
  font-size: 14px;
}

.about .resume-box .place {
  opacity: .8;
  font-weight: 600;
  font-size: 15px;
  position: relative;
  padding-left: 26px;
}

.about .resume-box .place:before {
  position: absolute;
  content: '';
  width: 10px;
  height: 2px;
  background-color: #fff;
  left: 7px;
  top: 9px;
  opacity: .8;
}

/* --- Nuevas Secciones y Mejoras --- */

/* Parallax Divider */
.parallax-divider {
    background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 100px 0;
    margin: 60px 0;
    position: relative;
    text-align: center;
}

.parallax-divider .overlay {
    background-color: rgba(0, 0, 0, 0.7);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.parallax-divider .content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.parallax-divider h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.parallax-divider p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Glassmorphism for Stats & Resume */
.glass-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Improved Timeline inside Glass Box */
.glass-box .resume-box li:after {
    border-left: 1px solid rgba(255,255,255,0.15) !important;
}

.glass-box .resume-box .icon {
    background-color: rgba(0,0,0,0.3) !important; /* Semi-transparent dark bg */
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: #fff;
}

.glass-box .resume-box .time {
    background-color: rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff !important;
}

.glass-box .resume-box h5 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.glass-box .resume-box p {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Parallax Section */
.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 80px 0;
    position: relative;
    width: 100%;
}

.experience-bg {
    background-image: url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

.overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1;
}

.z-index-2 {
    position: relative;
    z-index: 2;
}

.text-white {
    color: #fff !important;
}

.text-white span {
    color: inherit !important; /* Keep span white or use theme color? */
}

/* Overwrite existing stats to fit glass */
.about .box-stats {
    border: none !important; /* Quitar borde antiguo */
    padding: 0;
}

.about .box-stats.with-margin {
    margin-bottom: 0; /* Controlado por glass-box ahora */
}

/* Skills Improvements */
.about .c100 {
  background-color: transparent !important;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  border-radius: 50%;
}

/* Skills */

.about .c100 {
  float: none !important;
  margin: 0 auto;
  background-color: #252525;
}

.about .c100 > span {
  color: #fff;
}

.about .c100:after {
  background-color: #111;
}

/*** Portfolio ***/
.portfolio .main-content {
  padding-bottom: 60px;
  margin-top: -15px;
}

/* Grid */

.portfolio .grid-gallery ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portfolio .grid-gallery figure {
  margin: 0;
}

.portfolio .grid-gallery figure img {
  display: block;
  width: 100%;
  border-radius: 5px;
  transition: .3s;
}

.portfolio .grid-wrap {
  margin: 0 auto;
}

.portfolio .grid {
  margin: 0 auto;
}

.portfolio .grid li {
  width: 33.333333%;
  float: left;
  cursor: pointer;
  padding: 15px;
}

.portfolio .grid figure {
  -webkit-transition: 0.3s;
  transition: 0.3s;
  border-radius: 5px;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.portfolio .grid figure img {
  display: block;
  position: relative;
}

.portfolio .grid li a {
  overflow: hidden;
}

.portfolio .grid li figure div {
  position: absolute;
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.portfolio .grid li figure div span {
  margin: 0;
  text-transform: uppercase;
  color: #fff;
  font-size: 18px;
}

/* Slideshow */

.portfolio .slideshow {
  position: fixed;
  background: rgba(0,0,0,0.85);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1111;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
  -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
  transition: opacity 0.5s, visibility 0s 0.5s;
  text-align: left;
}

.portfolio .slideshow-open .slideshow {
  opacity: 1;
  visibility: visible;
  -webkit-transition: opacity 0.5s;
  transition: opacity 0.5s;
}

.portfolio .slideshow ul {
  width: 100%;
  height: 100%;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transform: translate3d(0,0,150px);
  transform: translate3d(0,0,150px);
  -webkit-transition: -webkit-transform 0.5s;
  transition: transform 0.5s;
}

.portfolio .slideshow ul.animatable > li {
  -webkit-transition: -webkit-transform 0.5s;
  transition: transform 0.5s;
}

.portfolio .slideshow-open .slideshow ul {
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

.portfolio .slideshow ul > li {
  width: 90%;
  height: 90%;
  max-width: 1400px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  visibility: hidden;
}

.portfolio .slideshow ul > li.show {
  visibility: visible;
}

.portfolio .slideshow ul > li:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.7);
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
  z-index: 111;
  border-radius: 10px;
}

.portfolio .slideshow ul > li.current:after {
  visibility: hidden;
  opacity: 0;
  -webkit-transition: opacity 0.3s, visibility 0s 0.3s;
  transition: opacity 0.3s, visibility 0s 0.3s;
}

.portfolio .slideshow figure {
  width: 100%;
  height: 100%;
  background: #252525;
  padding: 30px;
  overflow: auto;
  border-radius: 10px;
}

.portfolio .slideshow a {
  text-decoration: underline;
}

.portfolio .slideshow figcaption {
  margin-bottom: 15px;
}

.portfolio .slideshow figcaption h3 {
  text-transform: uppercase;
  padding: 10px 0 20px;
  font-weight: 700;
  text-align: center;
  font-size: 33px;
}

/* Embedded Videos */

.portfolio .slideshow .videocontainer,
.portfolio .slideshow .responsive-video {
  max-width: 100%;
  border-radius: 4px;
  display: block;
  object-fit: cover;
}

.portfolio .slideshow .videocontainer {
  position: relative;
  padding-bottom: 56.20%;
  padding-top: 0;
  height: 0;
  max-width: 100%;
  overflow: hidden;
  width: 100%;
  display: block;
  margin: 0;
  border-radius: 4px;
}

.portfolio .slideshow .videocontainer iframe,
.portfolio .slideshow .videocontainer object,
.portfolio .slideshow .videocontainer embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Carousel */

.portfolio .slideshow .carousel-indicators {
  bottom: 0;
  background: rgba(0,0,0,.4);
  padding: 10px 0;
  margin: 0;
}

.portfolio .slideshow .carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 7px;
  background-color: #fff;
  opacity: 1;
}

/* Navigation */

.portfolio .slideshow nav span {
  position: fixed;
  z-index: 1000;
  text-align: center;
  cursor: pointer;
  padding: 200px 30px;
  color: #fff;
}

.portfolio .slideshow nav span.nav-prev,
.portfolio .slideshow nav span.nav-next {
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  font-size: 41px;
  line-height: 58px;
}

.portfolio .slideshow nav span.nav-prev {
  left: 0;
}

.portfolio .slideshow nav span.nav-next {
  right: 0;
}

.portfolio .slideshow nav span.nav-close {
  top: 30px;
  right: 30px;
  padding: 0;
}

/*** Contact ***/
.contact .main-content {
  padding-bottom: 85px;
}
/* Left Side */

.contact .custom-span-contact {
  font-weight: 600;
  padding-left: 50px;
  line-height: 21px;
  padding-top: 5px;
}

.contact .custom-span-contact i {
  left: 0;
  top: 10px;
  font-size: 33px;
}

.contact .custom-span-contact i.fa-phone-square {
  font-size: 39px;
  top: 7px;
}

.contact .custom-span-contact span {
  text-transform: uppercase;
  opacity: .8;
  font-weight: 400;
}

.contact ul.social {
  margin-left: -5px;
}

.contact ul.social li {
  display: inline-block;
}

.contact ul.social li a {
  display: inline-block;
  height: 40px;
  width: 40px;
  line-height: 42px;
  text-align: center;
  color: #fff;
  transition: .3s;
  font-size: 17px;
  margin: 0 6px;
  background: #2b2a2a;
  border-radius: 50%;
}
/* Form */
.contact .contactform input[type=text],
.contact .contactform input[type=email] {
  border: 1px solid #111;
  width: 100%;
  background: #252525;
  color: #fff;
  padding: 11px 26px;
  margin-bottom: 30px;
  border-radius: 30px;
  outline: none !important;
  transition: .3s;
}

.contact .contactform textarea {
  border: 1px solid #111;
  background: #252525;
  color: #fff;
  width: 100%;
  padding: 12px 26px;
  margin-bottom: 20px;
  height: 160px;
  overflow: hidden;
  border-radius: 30px;
  outline: none !important;
  transition: .3s;
}

.contact .contactform .form-message {
  margin: 24px 0;
}

.contact .contactform .output_message {
  display: block;
  color: #fff;
  height: 46px;
  line-height: 46px;
  border-radius: 30px;
}

.contact .contactform .output_message.success {
  background: #28a745;
}

.contact .contactform .output_message.success:before {
  font-family: FontAwesome;
  content: "\f14a";
  padding-right: 10px;
}

.contact .contactform .output_message.error {
  background: #dc3545;
}

.contact .contactform .output_message.error:before {
  font-family: FontAwesome;
  content: "\f071";
  padding-right: 10px;
}

/*** Blog ***/

.blog .main-content {
  padding-bottom: 85px;
}

/* Latest Posts */

.blog .post-container {
  display: block;
  background-color: #252525;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
  height: 100%;
  pointer-events: auto; /* Ensure it captures events */
}

.blog .post-container:hover {
  transform: translateY(-7px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.blog .post-thumb {
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  position: relative;
}

.blog .post-thumb a {
  display: block;
  overflow: hidden;
}

.blog .post-thumb img {
  width: 100%;
  transition: transform 0.5s ease;
}

.blog .post-container:hover .post-thumb img {
  transform: scale(1.1);
}

.blog .post-content {
  padding: 25px;
  background-color: transparent; /* Inherited from container now */
}

.blog .entry-header h3 {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog .entry-header h3 a {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.3s;
}

.blog .post-container:hover .entry-header h3 a {
  /* Color will be handled by skin files or default hover */
}

.blog .entry-meta {
  font-size: 0.85rem;
  margin-bottom: 15px;
  display: block;
}

.blog .entry-meta i {
  margin-right: 5px;
}

.blog .entry-content p {
  color: #ddd;
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.blog .btn-read-more {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s;
  border-bottom: 2px solid transparent; /* Prepare for border effect */
}

.blog .btn-read-more i {
  margin-left: 5px;
  transition: transform 0.3s;
}

.blog .post-container:hover .btn-read-more i {
  transform: translateX(5px);
}

/* pagination */

.blog .pagination {
  margin-bottom: 30px;
}

.blog .page-link {
  color: #fff;
  background-color: #252525;
  border: 1px solid #252525;
  padding: 0;
  margin: 0 10px;
  border-radius: 50% !important;
  width: 43px;
  height: 43px;
  line-height: 43px;
  text-align: center;
  transition: .3s;

}

.blog .page-link:focus,
.blog .page-link:active{
  box-shadow: none !important;
}

.blog .page-link:hover {
  color: #fff !important;
}

/* Blog Post */

.blog-post article {
  max-width: 700px;
  margin: 0 auto;
}

.blog-post article h1 {
  font-weight: 600;
  margin: 13px 0 20px;
}

.blog-post article img {
  border-radius: 5px;
  margin-bottom: 20px;
}

.blog-post .meta {
  color: #eee;
  font-size: 13px;
}

.blog-post .meta span {
  padding-right: 15px;
}

.blog-post .meta i {
  padding-right: 3px;
}

/* [ RESPONSIVE DESIGN STYLES ] */

@media (min-width: 1351px) {
  .portfolio .container-portfolio .grid {
    text-align: left;
  }
}

@media (max-width: 1350px) and (min-width: 992px) {
  .container {
    max-width: calc(100% - 195px);
  }

  .portfolio .container-portfolio {
    max-width: calc(100% - 195px);
  }
}


@media (max-width: 1200px) {
  /* Modern styles handle this */
}

@media (max-width: 1200px) and (min-width: 992px) {
   /* Modern styles handle this */
}

@media (max-width: 1100px) and (min-width: 992px) {
   /* Modern styles handle this */
}


@media (min-width: 1600px) {
  .home .home-details > div {
    max-width: 600px;
  }
}

@media (min-width: 992px) {
  .home .home-details-container {
    width: 100%;
    height: 100vh;
  }

  body.home {
    overflow: hidden;
  }
}

/* Mobile  Navigation */

@media (max-width: 991px) {

  body.home {
    padding: 25px;
  }

  body.home .main-container {
    padding: 30px 0 !important;
  }

  .home .home-details-container {
    margin: 0 auto;
  }

  .home .home-details {
    padding: 0;
  }

  .main-img-mobile {
    border-radius: 50%;
    width: 270px;
    height: 270px;
    border: 4px solid #252525;
    margin: 0 auto 25px;
    display: block;
  }

  .home .home-details h1 {
    font-size: 38px;
    line-height: 48px;
    margin: 29px 0 13px;
  }

  .home .home-details p {
    margin: 10px 0 23px;
    font-size: 15px;
    line-height: 30px;
  }

  #menuToggle {
    display: inline-block;
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1111;
    user-select: none;
    padding: 19px 0 0 16px;
    width: 54px;
    height: 54px;
    border-radius: 5px;
    background: #252525;
  }

  #menuToggle input {
    display: flex;
    width: 54px;
    height: 54px;
    position: absolute;
    cursor: pointer;
    opacity: 0;
    z-index: 2;
    top: 0;
    left: 0;
  }

  #menuToggle > span {
    display: flex;
    width: 23px;
    height: 2px;
    margin-bottom: 5px;
    position: relative;
    background: #ffffff;
    border-radius: 3px;
    z-index: 1;
    transform-origin: 5px 0;
    transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
    background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
    opacity 0.55s ease;
  }

  #menuToggle > span:first-child {
    transform-origin: 0 0;
  }

  #menuToggle > span:nth-last-child(2) {
    transform-origin: 0 100%;
  }

  #menuToggle input:checked ~ span {
    opacity: 1;
    transform: rotate(45deg) translate(4px, 0);
    background: #fff;
  }

  #menuToggle input:checked ~ span:nth-last-child(3) {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
  }

  #menuToggle input:checked ~ span:nth-last-child(2) {
    transform: rotate(-45deg) translate(2px, 4px);
  }

  #menu {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding-top: 60px;
    background-color: #252525;
    -webkit-font-smoothing: antialiased;
    transform-origin: 0 0;
    transform: translate(-100%, 0);
    transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
  }

  #menuToggle input:checked ~ ul {
    transform: none;
  }

  #menu li {
    position: relative;
    padding-left: 30px;
  }

  #menu li:after {
    position: absolute;
    content: '';
    height: 1px;
    width: calc(100% - 60px);
    background: #333;
    left: 30px;
  }

  #menu li:last-child:after {
    display: none;
  }

  #menu li.active a span {
    font-weight: 600;
  }

  #menu li a {
    color: #fff;
    text-transform: uppercase;
    transition-delay: 2s;
    font-size: 26px;
    display: block;
    text-decoration: none;
    padding: 14px 0;
    position: relative;
  }

  #menu li a span {
    position: absolute;
    left: 50px;
    font-weight: 400;
  }

  .portfolio .grid li {
    width: 50%;
  }

  .portfolio .grid li figure div {
    display: none !important;
  }

  .portfolio .slideshow {
    background: #252525;
  }

  .portfolio .slideshow nav span {
    padding: 0;
  }

  .portfolio .slideshow ul > li {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
  }

  .portfolio .slideshow ul > li:after {
    display: none;
  }

  .portfolio .slideshow figure {
    padding: 125px 30px 30px;
    border-radius: 0;
    max-width: 720px;
    margin: 0 auto;
  }

  .portfolio .slideshow nav span.nav-prev,
  .portfolio .slideshow nav span.nav-next {
    top: 35px;
    width: 32px;
    height: 32px;
  }

  .portfolio .slideshow nav span.nav-next {
    right: 30px;
  }

  .portfolio .slideshow nav span.nav-prev {
    left: 30px;
  }

  .portfolio .slideshow nav span.nav-prev img,
  .portfolio .slideshow nav span.nav-next img {
    width: 32px;
    height: 32px;
  }

  .portfolio .slideshow nav span:before {
    display: none;
  }

  .portfolio .slideshow nav span.nav-close {
    top: 35px;
    right: 0;
    left: 0;
    margin: 0 auto;
    width: 32px;
    height: 32px;
    display: block;
    line-height: 0;
  }

  .portfolio .slideshow nav span.nav-close img {
    width: 32px;
    height: 32px;
  }

  .portfolio .slideshow nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 102px;
    background: #252525;
    z-index: 1;
    border-bottom: 1px solid #333;
  }

  .contact .main-content {
    padding-bottom: 0;
  }
}

@media (max-width: 767px) {
  .home .home-details p {
    font-size: 14px;
    line-height: 28px;
  }
}

@media (max-width: 576px) {

  body {
    font-size: 14px;
  }

  .title-section.revealator-delay1 {
    transform: none !important;
    opacity: 1 !important;
  }

  #menuToggle {
    right: 10px;
    top: 4px;
    padding: 19px 0 0 13px;
    width: 49px;
    height: 49px;
  }

  .home #menuToggle {
    right: 25px;
    top: 25px;
    padding: 17px 0 0 13px;
  }

  #menu li {
    padding-left: 25px;
  }

  #menu li a {
    font-size: 18px;
  }

  #menu li:after {
    width: calc(100% - 50px);
    left: 25px;
  }

  #menu li a span {
    left: 35px;
  }

  .main-content {
    padding-top: 85px;
  }

  .main-content > .container {
    padding: 0 25px;
  }

  .main-img-mobile {
    width: 230px;
    height: 230px;
  }

  .home .home-details h1 {
    font-size: 29px;
    line-height: 39px;
    margin: 18px 0 13px;
  }

  .home .home-details h6 {
    font-size: 19px;
  }

  .title-section {
    padding: 16px 25px 14px;
    background: #252525;
    border-bottom: 1px solid #333;
    margin-bottom: 36px;
    position: fixed;
    right: 0;
    left: 0;
    z-index: 11;
    top: 0;
  }

  .title-section h1 {
    font-size: 26px;
  }

  .title-bg {
    display: none;
  }

  .custom-title {
    font-size: 21px;
  }

  .about .main-content {
    padding-bottom: 0;
  }

  .about .resume-box h5 {
    font-size: 17px;
  }

  .about .box-stats {
    padding: 15px 20px 20px 25px;
  }

  .about .c100 {
    transform: scale(.8);
  }

  .about .box-stats.with-margin {
    margin-bottom: 25px;
  }

  .about .box-stats h3 {
    font-size: 40px;
  }

  .about .box-stats p {
    padding-left: 0;
  }

  .about .box-stats p:before {
    display: none;
  }

  .portfolio .main-content {
    padding-bottom: 10px;
    margin-top: -12px;
  }

  /* Modified for 2 Columns on Mobile */
  .portfolio .grid li {
    width: 50%;
    padding: 5px; /* Tighten padding for 2-col layout */
  }

  .portfolio .main-content > .container {
    padding: 0 10px;
  }

  .portfolio .slideshow figure {
    padding: 85px 25px 25px;
  }

  .portfolio .slideshow figcaption h3 {
    font-size: 25px;
  }

  .portfolio .slideshow nav span.nav-prev,
  .portfolio .slideshow nav span.nav-next {
    top: 9px;
    width: 20px;
    height: 20px;
  }

  .portfolio .slideshow nav span.nav-next {
    right: 20px;
  }

  .portfolio .slideshow nav span.nav-prev {
    left: 20px;
  }

  .portfolio .slideshow nav span.nav-prev img,
  .portfolio .slideshow nav span.nav-next img {
    width: 20px;
    height: 20px;
  }

  .portfolio .slideshow nav span.nav-close {
    top: 21px;
    width: 20px;
    height: 20px;
  }

  .portfolio .slideshow nav span.nav-close img {
    width: 20px;
    height: 20px;
  }

  .portfolio .slideshow nav {
    height: 62px;
  }

  .blog .main-content {
    padding-bottom: 55px;
  }

  .blog-post article h1 {
    font-size: 25px;
  }

  .separator.mt-1 {
    margin-top: 35px !important;
  }
}

/* Timeline Reveal Enhancements */
.revealator-slideup.revealator-within {
    transform: translateY(0);
    opacity: 1;
}

.revealator-slideup {
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s ease-out;
}

/* Timeline Connector */
.resume-box ul li.revealator-within:after {
    height: 100%;
    transition: height 0.6s ease-in 0.3s;
}

/* Delay for staggering */
.about .resume-box li:nth-child(1) { transition-delay: 0.1s; }
.about .resume-box li:nth-child(2) { transition-delay: 0.3s; }
.about .resume-box li:nth-child(3) { transition-delay: 0.5s; }


/* Custom Layout & Effects */
.glass-box.p-0 {
    padding: 0 !important;
}
.row.no-gutters {
    margin-right: 0;
    margin-left: 0;
}
.row.no-gutters > [class^='col-'],
.row.no-gutters > [class*=' col-'] {
    padding-right: 0;
    padding-left: 0;
}
.object-fit-cover {
    object-fit: cover;
    height: 100%;
    width: 100%;
}
.grayscale-img {
    filter: grayscale(100%) contrast(1.1);
}
.tech-image-container {
    overflow: hidden;
    position: relative;
    height: 100%;
    min-height: 400px; /* Ensure height on tall screens if content is short */
    background-color: #000;
}
.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
.tech-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 0, 0.05); /* Slight green tint for tech feel */
    z-index: 3;
    pointer-events: none;
    mix-blend-mode: overlay;
}


/* Horizontal Timeline */
.horizontal-timeline-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    margin-bottom: 30px;
    cursor: grab;
}
.horizontal-timeline-container:active, 
.horizontal-timeline-container.active {
    cursor: grabbing;
}
.horizontal-timeline {
    display: inline-flex;
    gap: 30px;
    padding: 10px 5px; /* Avoiding shadow cut-off */
}
.timeline-item {
    width: 350px; /* Fixed width */
    flex: 0 0 auto;
    white-space: normal; /* Wrapping text */
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}
.timeline-item .icon {
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: #fff;
    font-size: 24px;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.timeline-item:hover .icon {
    background-color: #fff; /* Fallback */
    color: #000;
}
.timeline-item .time {
    display: inline-block;
    padding: 5px 15px;
    margin-bottom: 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: fit-content;
}
.timeline-item h5 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.timeline-item h5 span.place {
    display: block;
    opacity: 0.8;
    font-size: 14px;
    margin-top: 5px;
}
.timeline-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
}
/* Scrollbar Styling */
.horizontal-timeline-container::-webkit-scrollbar {
    height: 6px;
}
.horizontal-timeline-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.horizontal-timeline-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}
.horizontal-timeline-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}


/* Mobile Glitch Effect */
.mobile-img-glitch-container {
    animation: mobile-glitch-anim 5s infinite;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
}
.glitch-circle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 2;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    mix-blend-mode: overlay;
}
@keyframes mobile-glitch-anim {
    0% { transform: translate(0, 0); filter: hue-rotate(0deg); }
    94% { transform: translate(0, 0); filter: hue-rotate(0deg); }
    95% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
    96% { transform: translate(2px, -2px); filter: hue-rotate(-90deg); }
    97% { transform: translate(-1px, 1px); }
    98% { transform: translate(1px, -1px); }
    99% { transform: translate(-2px, 0); }
    100% { transform: translate(0, 0); filter: hue-rotate(0deg); }
}


/* Home Page Glitch Effects */
.desktop-glitch-container {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}
/* Ensure overlay covers full area */
.home-details-container .bg .glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    mix-blend-mode: overlay;
}
/* Mobile Styles */
.main-img-mobile.mobile-img-glitch-container {
    border-radius: 50%;
    border: 4px solid #252525;
    margin: 0 auto 25px; /* Re-apply margin here or ensure it inherits */
    display: block;
    position: relative;
    overflow: hidden;
    animation: mobile-glitch-anim 5s infinite;
}
.main-img-mobile img {
    border-radius: 0; /* Let container handle radius */
}
@media (max-width: 991px) {
    .main-img-mobile.mobile-img-glitch-container {
        width: 270px;
        height: 270px;
    }
}
@media (max-width: 767px) {
    .main-img-mobile.mobile-img-glitch-container {
        width: 230px;
        height: 230px;
    }
}
/* Grayscale for Bg Image */
.bg-img.grayscale-img {
    filter: grayscale(100%) contrast(1.1);
}


/* Custom Scrollbar for Portfolio Modal */
.portfolio .slideshow div::-webkit-scrollbar,
.portfolio .slideshow figure::-webkit-scrollbar,
.portfolio .slideshow-open .slideshow ul::-webkit-scrollbar,
.col-lg-5.overflow-auto::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.portfolio .slideshow div::-webkit-scrollbar-track,
.portfolio .slideshow figure::-webkit-scrollbar-track,
.col-lg-5.overflow-auto::-webkit-scrollbar-track {
    background: #111; 
}

.portfolio .slideshow div::-webkit-scrollbar-thumb,
.portfolio .slideshow figure::-webkit-scrollbar-thumb,
.col-lg-5.overflow-auto::-webkit-scrollbar-thumb {
    background: #9acd32; /* YellowGreen */
    border-radius: 3px;
}

.portfolio .slideshow div::-webkit-scrollbar-thumb:hover, 
.portfolio .slideshow figure::-webkit-scrollbar-thumb:hover,
.col-lg-5.overflow-auto::-webkit-scrollbar-thumb:hover {
    background: #86b32d; 
}

/* Ensure Portfolio Content Text is Readable */
.portfolio .project-content,
.portfolio .project-content p,
.portfolio .project-content h1,
.portfolio .project-content h2,
.portfolio .project-content h3,
.portfolio .project-content h4,
.portfolio .project-content h5,
.portfolio .project-content h6,
.portfolio .project-content li {
    color: #fff !important;
    background: transparent !important;
}

.portfolio .project-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

/* Ensure Intro Content is styled nicely */
.intro-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #fff;
    margin-bottom: 20px;
}

/* Portfolio Item Overlay Text */
.portfolio .grid li figure div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.portfolio .grid li figure div span {
   font-size: 18px;
   font-weight: 700;
   text-transform: uppercase;
   margin-bottom: 5px;
}

/* Ensure grid items content is centered properly */
.portfolio .grid li figure div.hover-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
}

.portfolio .grid li figure:hover .btn-action {
    background-color: #9acd32;
    border-color: #9acd32 !important;
    color: #fff !important;
}

.portfolio .grid li figure h5 {
    transform: translateY(20px);
    transition: all 0.4s ease;
    opacity: 0;
}

.portfolio .grid li figure:hover h5 {
    transform: translateY(0);
    opacity: 1;
}

.portfolio .grid li figure .project-type {
    transform: translateY(20px);
    transition: all 0.4s 0.1s ease;
    opacity: 0;
}

.portfolio .grid li figure:hover .project-type {
    transform: translateY(0);
    opacity: 1;
}

.portfolio .grid li figure .btn-action {
    transform: translateY(20px);
    transition: all 0.4s 0.2s ease;
    opacity: 0;
}

.portfolio .grid li figure:hover .btn-action {
    transform: translateY(0);
    opacity: 1;
}

/* Slideshow Navigation Fix for FontAwesome */
.portfolio .slideshow nav span {
    color: #fff;
    cursor: pointer;
    font-size: 30px;
}

.portfolio .slideshow nav span:hover {
    color: #9acd32;
}

.portfolio .slideshow nav span.nav-prev, 
.portfolio .slideshow nav span.nav-next {
    top: 50%;
    transform: translateY(-50%);
    position: fixed;
    z-index: 2000;
}

.portfolio .slideshow nav span.nav-prev {
    left: 20px;
}

.portfolio .slideshow nav span.nav-next {
    right: 20px;
}

.portfolio .slideshow nav span.nav-close {
    top: 20px;
    right: 30px;
    position: fixed;
    z-index: 2000;
    font-size: 40px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
}

/* Also add a close button inside the modal content for better UX */
.close-content {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    z-index: 10;
    color: #fff;
    font-size: 24px;
}
.close-content:hover {
    color: #9acd32;
}
/* Adjust Contact Form Button Size */
.contact .contactform .button { padding: 10px 50px 10px 25px; font-size: 14px; border-radius: 25px; }
.contact .contactform .button .button-icon { width: 42px; height: 42px; font-size: 16px; line-height: 42px; }
/* Adjust Contact Form Button Size */
.contact .contactform .button { padding: 10px 50px 10px 25px; font-size: 14px; border-radius: 25px; height: auto; }
.contact .contactform .button .button-icon { width: 42px; height: 42px; font-size: 16px; line-height: 42px; }

/* Tool Card Styles for page-utilidades.php */
.tool-card {
    background: #252525;
    padding: 40px 30px;
    border-radius: 15px;
    border: 1px solid #333;
    transition: all 0.4s ease;
    height: 100%;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-10px);
    border-color: #9acd32;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.tool-card .icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    transition: all 0.4s ease;
}

.tool-card:hover .icon-container {
    background: #9acd32;
    color: #fff;
    transform: scale(1.1) rotate(10deg);
}

.tool-card .icon-container i {
    font-size: 32px;
    color: #9acd32;
    transition: all 0.4s ease;
}

.tool-card:hover .icon-container i {
    color: #fff;
}

.tool-card:hover .icon-container .fa-cog, 
.tool-card:hover .icon-container .fa-gear {
    animation: fa-spin 2s infinite linear;
}

.tool-card h5 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
    text-transform: uppercase;
}

.tool-card p {
    color: #bbb;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tool-card .btn-tool {
    background: transparent;
    border: 2px solid #9acd32;
    color: #fff;
    border-radius: 30px;
    padding: 10px 30px;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    transition: all 0.3s;
}

.tool-card .btn-tool:hover {
    background: #9acd32;
    color: #fff;
    text-decoration: none;
}

/* Disabled state */
.tool-card.disabled {
    opacity: 0.6;
    cursor: default;
}
.tool-card.disabled:hover {
    transform: none;
    border-color: #333;
    box-shadow: none;
}
.tool-card.disabled:hover .icon-container {
    background: #333;
    color: inherit;
    transform: none;
}
.tool-card.disabled:hover .icon-container i {
    color: #9acd32;
}


/* Styles for Technical Calculator */
.technical-calculator {
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.technical-calculator .calc-header {
    background: #333;
    padding: 10px 15px;
    margin: -20px -20px 20px -20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 1px solid #444;
    font-size: 18px;
    font-weight: 600;
    color: #eee;
}

.technical-calculator .tech-form {
    padding-right: 15px;
    border-right: 1px solid #333;
}

.tech-subtitle {
    font-size: 14px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.tech-input {
    background: #333 !important; /* Lighter background for better contrast */
    border: 1px solid #555;
    color: #fff !important; /* Force white text */
    font-weight: 500;
    border-radius: 4px; /* Slight radius */
}
.tech-input:focus {
    background: #444 !important; /* Slightly lighter on focus */
    border-color: #9acd32;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(154, 205, 50, 0.25); /* Focus ring */
}
.tech-input::placeholder {
    color: #aaa;
    opacity: 1;
}

.input-group-text.tech-addon {
    background: #333;
    border: 1px solid #444;
    color: #ccc;
    border-radius: 0;
}

.custom-control-label::before {
    background-color: #1a1a1a;
    border: 1px solid #555;
}
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #9acd32;
    border-color: #9acd32;
}

.btn-tech {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 12px;
    transition: all 0.3s;
}
.btn-tech:hover {
    background: #9acd32;
    border-color: #9acd32;
    color: #fff;
}

/* Results Panel */
.results-panel {
    background: #181818;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #333;
}

.result-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.5s ease;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px dashed #333;
}
.result-row:last-child {
    border-bottom: none;
}
.result-row.bg-darker {
    background: rgba(0,0,0,0.2);
}
.result-row.highlight {
    background: rgba(154, 205, 50, 0.1); /* Theme color tint */
    border: 1px solid #9acd32;
    border-radius: 4px;
}

.result-row .label {
    font-size: 14px;
    color: #aaa;
}

.result-row .value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    font-weight: 700;
}

.tech-note {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

@media (max-width: 991px) {
    .technical-calculator .tech-form {
        border-right: none;
        border-bottom: 1px solid #333;
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}


/* --- Custom Responsive Fixes for Home Details --- */
@media (max-width: 991px) {
    .home .home-details h1 {
        font-size: 38px;
        line-height: 1.2;
        text-align: center;
        margin-bottom: 20px;
    }
    .home .home-details h1 span {
        font-size: 16px;
        margin: 10px auto;
        display: inline-block;
        border-left: 3px solid #9acd32;
        border-right: 3px solid #9acd32;
        border-radius: 4px;
        background: rgba(154, 205, 50, 0.1);
        text-align: center;
    }
    .home .home-details p {
        font-size: 16px;
        text-align: center;
        margin: 0 auto 30px;
    }
    .home .home-details div {
        text-align: center;
    }
    .home .home-details .button {
        margin-top: 10px;
        background: rgba(154, 205, 50, 0.1); /* Subtle bg on mobile for touch target */
    }
}

/* --- Professional Tex Entrance Animation --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.home .home-details h1 {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.home .home-details h1 span {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.home .home-details p {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.home .home-details .button {
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

/* Mobile About List Adjustments */
@media (max-width: 575px) {
    .about .about-list .value {
        font-size: 14px;
        word-break: break-word;
    }
    .about .about-list .title {
        font-size: 13px;
    }
}

/* Mobile Portfolio Details Adjustments */
@media (max-width: 575px) {
    .slideshow .col-lg-5 {
        padding: 20px !important;
    }
    .slideshow h3 {
        font-size: 20px;
        margin-top: 10px;
    }
    .slideshow .mobile-details-grid i {
        font-size: 14px;
    }
    .slideshow .small-text-mobile {
        font-size: 13px;
        line-height: 1.4;
        word-break: break-word;
        color: #ddd;
    }
    .slideshow .project-label.d-none {
        /* Ensure label is hidden on xs only */
        display: none !important;
    }
    /* Show colon only on mobile if label is hidden? No, label is icon + text. */
    /* Make icons larger on mobile to compensate for missing text label */
    .slideshow .mobile-details-grid i {
        font-size: 18px;
        color: #9acd32;
        width: 25px;
        text-align: center;
    }
}

/* --- Mobile-First Portfolio Slideshow Fixes --- */
.portfolio-figure {
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    margin: 0;
    background: #000;
}

.portfolio .slideshow .media-column {
    min-height: 100%;
}

.portfolio .slideshow .content-column {
    background: #252525;
}

/* Mobile Behavior (Below 992px) */
@media (max-width: 991px) {
    .portfolio .slideshow ul > li {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        transform: none;
        max-width: none;
        border-radius: 0;
    }
    
    .portfolio-figure {
        overflow-y: auto; /* Enable vertical scrolling for the whole modal */
        -webkit-overflow-scrolling: touch;
    }
    
    .portfolio-figure .row {
        height: auto !important; /* Allow content to grow naturally */
        min-height: 100%;
        display: block; /* Stack blocks normally */
    }
    
    .portfolio .slideshow .media-column {
        height: auto !important;
        min-height: 300px; /* Keep minimum height for media */
        width: 100%;
        display: block;
    }
    
    .portfolio .slideshow .content-column {
        height: auto !important; /* Allow content to expand */
        overflow: visible !important; /* Remove internal scrollbar */
        padding-bottom: 60px !important; /* Space for bottom nav/safe area */
    }
    
    /* Fix Close Button on Mobile */
    .close-content {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 9999;
        background: rgba(0,0,0,0.5);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        color: #fff;
    }
    
    /* Adjust media content sizing */
    .media-column img, 
    .media-column iframe, 
    .media-column video {
        max-height: 50vh; /* Don't take up full screen height on mobile */
        width: 100%;
        object-fit: contain;
    }
}

/* --- Mobile-First Utilities Grid Fixes --- */
@media (max-width: 576px) {
    .tool-card {
        padding: 20px 10px;
        margin-bottom: 20px;
    }
    .tool-card .icon-container {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    .tool-card .icon-container i {
        font-size: 20px;
    }
    .tool-card h5 {
        font-size: 14px;
        margin-bottom: 10px;
        min-height: 34px; /* Ensure 2 lines for alignment */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .tool-card p {
        font-size: 12px;
        margin-bottom: 15px;
        display: none; /* Hide description on mobile to save space */
    }
    .tool-card .btn-tool {
        padding: 6px 15px;
        font-size: 11px;
        border-width: 1px;
    }
}
