/*==========  Non-Mobile First Method  ==========*/

/* CSS for Modern Hamburger Menu */
.hamburger-icon {
    width: 30px;
    height: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #3498db;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Mobile Menu Fix - Direct Implementation */
#mobile-menu-styles {
    display: none;
}

@media only screen and (max-width: 767px) {
    #mobile-menu-styles {
        display: block;
    }
    
    .site-header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background-color: rgba(33, 33, 33, 0.95) !important;
        padding: 10px 0 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        transition: background-color 0.3s ease;
    }
    
    .site-logo {
        font-size: 18px;
        font-weight: 600;
        color: #fff !important;
    }
    
    .site-logo .highlight {
        color: #3498db !important;
    }
    
    .hamburger-icon {
        width: 24px;
        height: 20px;
        margin-top: 5px;
    }
    
    .hamburger-bar {
        background-color: #3498db;
        height: 2px;
    }
    
    #hero {
        padding-top: 80px !important;
    }
    
    #portfolio-insights-collapse {
        top: 60px;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    }
    
    #portfolio-insights-collapse .navbar-nav > li > a {
        padding: 12px 20px;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    #portfolio-insights-collapse .navbar-nav > li > a:hover,
    #portfolio-insights-collapse .navbar-nav > li.active > a {
        background-color: rgba(52, 152, 219, 0.2);
        border-radius: 4px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .navbar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .main-menu {
        background-color: rgba(27, 36, 47, 0.95); /* Dark background matching the hero section */
        text-align: center;
        padding: 20px 0;
        margin-top: 10px;
        border-radius: 5px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }

    .main-menu.act {
        opacity: 1;
        -webkit-transform: scale(1);
        transform: scale(1);
    }

    .main-menu.act ul li {
        opacity: 1;
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }

    .main-menu ul {
        display: table-cell;
        vertical-align: middle;
    }

    .main-menu li {
        padding: 8px 0;
        -webkit-transition: all 400ms 510ms;
        transition: all 400ms 510ms;
        opacity: 0;
    }

    .main-menu li:nth-child(odd) {
        -webkit-transform: translateX(30%);
        transform: translateX(30%);
    }

    .main-menu li:nth-child(even) {
        -webkit-transform: translateX(-30%);
        transform: translateX(-30%);
    }

    .navbar-toggle {
        z-index: 9999;
        margin-right: 0;
        border: none;
        padding: 10px;
        background: transparent !important;
    }
    
    .navbar-toggle:focus {
        outline: none;
    }
    
    .navbar-toggle.collapsed .hamburger-bar:nth-child(1) {
        transform: rotate(0);
        top: 0;
    }
    
    .navbar-toggle.collapsed .hamburger-bar:nth-child(2) {
        opacity: 1;
    }
    
    .navbar-toggle.collapsed .hamburger-bar:nth-child(3) {
        transform: rotate(0);
        bottom: 0;
    }
    
    .navbar-toggle:not(.collapsed) .hamburger-bar:nth-child(1) {
        transform: rotate(45deg);
        position: absolute;
        top: 10px;
    }
    
    .navbar-toggle:not(.collapsed) .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    
    .navbar-toggle:not(.collapsed) .hamburger-bar:nth-child(3) {
        transform: rotate(-45deg);
        position: absolute;
        top: 10px;
    }
    
    .main-menu.collapse {
        display: none;
    }
    
    .main-menu.collapse.in {
        display: block;
    }
    
    .main-menu .navbar-nav {
        float: none;
        margin: 0;
    }
    
    .main-menu .navbar-nav > li {
        float: none;
        display: block;
    }
    
    .main-menu .navbar-nav > li > a {
        color: #fff; /* White text for better contrast */
        padding: 12px 0;
        margin: 0 !important;
        font-size: 16px;
        transition: all 0.3s ease;
        border-bottom: 2px solid transparent;
    }
    
    .main-menu .navbar-nav > li > a:hover,
    .main-menu .navbar-nav > li.active > a {
        color: #3498db; /* Blue color on hover */
        border-bottom: 2px solid #3498db;
        transform: translateX(5px);
    }

    #portfolio-insights-collapse {
        display: none;
        background-color: rgba(27, 36, 47, 0.95);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
        text-align: center;
        padding: 15px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        border-radius: 0 0 4px 4px;
    }
    
    #portfolio-insights-collapse.show-menu {
        display: block !important;
    }
    
    #portfolio-insights-collapse .navbar-nav {
        float: none;
        margin: 0 auto;
        display: inline-block;
        text-align: center;
        width: 100%;
    }
    
    #portfolio-insights-collapse .navbar-nav > li {
        float: none;
        display: block;
        text-align: center;
        margin: 10px 0;
    }
    
    #portfolio-insights-collapse .navbar-nav > li > a {
        display: inline-block;
        padding: 8px 15px;
        color: #fff;
        font-size: 16px;
        transition: all 0.2s ease;
    }
    
    #portfolio-insights-collapse .navbar-nav > li > a:hover,
    #portfolio-insights-collapse .navbar-nav > li.active > a {
        color: #3498db;
        border-bottom: 2px solid #3498db;
    }

    /* Enhanced Portfolio Mobile Responsiveness */
    @media only screen and (max-width: 767px) {
        /* Project section overall adjustments */
        .section-portfolio {
            padding: 60px 0 40px;
        }
        
        /* Project filters mobile adjustments */
        .project-filters {
            flex-wrap: wrap;
            margin-bottom: 25px;
            gap: 8px;
        }
        
        .filter-btn {
            padding: 8px 15px;
            font-size: 13px;
            width: calc(50% - 8px);
            text-align: center;
        }
        
        /* Project cards mobile adjustments */
        .project-card {
            margin-bottom: 25px;
        }
        
        .project-card-img {
            height: 180px;
        }
        
        .project-action-btn {
            opacity: 1;
            transform: translateY(0) scale(1);
            width: 40px;
            height: 40px;
        }
        
        .project-overlay {
            opacity: 0.9;
            background: linear-gradient(to bottom, rgba(27, 36, 47, 0.7), rgba(52, 152, 219, 0.85));
        }
        
        .project-card-body {
            padding: 15px;
        }
        
        .project-card-body h4 {
            font-size: 16px;
        }
        
        .project-tags span {
            font-size: 11px;
            padding: 4px 8px;
        }
        
        .project-card-body p {
            font-size: 13px;
            margin-bottom: 10px;
        }
        
        /* Project modals mobile adjustments */
        .project-modal .modal-dialog {
            width: 95%;
            margin: 15px auto;
        }
        
        .project-modal .modal-body {
            padding: 20px 15px;
        }
        
        .project-modal-banner {
            height: 200px;
        }
        
        .project-modal .modal-title {
            font-size: 20px;
            margin-bottom: 15px;
        }
        
        .project-modal-content {
            flex-direction: column;
            gap: 20px;
        }
        
        .project-description h5 {
            font-size: 16px;
            margin-top: 20px;
        }
        
        .project-description p, 
        .project-description li {
            font-size: 14px;
        }
        
        .project-details {
            padding-top: 10px;
            border-top: 1px solid #eee;
        }
        
        /* Tab navigation for modals */
        .project-tabs {
            margin-bottom: 20px;
            justify-content: space-between;
        }
        
        .project-tab {
            padding: 10px;
            font-size: 14px;
            flex: 1;
            text-align: center;
        }
        
        /* Video container adjustments */
        .video-container {
            margin-bottom: 15px;
        }
        
        /* Action buttons */
        .project-actions {
            flex-direction: column;
            gap: 10px;
        }
        
        .project-btn {
            width: 100%;
            justify-content: center;
            padding: 10px;
        }
    }
    
    /* Extra small devices adjustments */
    @media only screen and (max-width: 479px) {
        .project-filters {
            justify-content: center;
        }
        
        .filter-btn {
            width: 100%;
            margin-bottom: 5px;
        }
        
        .project-card-img {
            height: 160px;
        }
        
        .project-action-btn {
            width: 36px;
            height: 36px;
            font-size: 14px;
        }
        
        .project-overlay-content {
            gap: 10px;
        }
        
        .project-modal .modal-dialog {
            width: 100%;
            margin: 0;
            border-radius: 0;
        }
        
        .project-modal .modal-content {
            border-radius: 0;
        }
        
        .project-tabs::after {
            left: 5%;
            right: 5%;
        }
    }
}

/* Large Devices, Wide Screens */
@media only screen and (max-width : 1199px) {
	/* HEADER
	================================================== */
	/* Navigation */
	.navbar-nav > li + li > a {
	    margin-left: 30px;
	}

	/* HERO
	================================================== */
	.hero {
		min-height: 600px;
	}

	.hero img {
		height: 500px;
	}

	/* SITEMAIN
	================================================== */
	/* Modal */
	.modal-header {
		height: 400px;
	}
}

/* Medium Devices, Desktops */
@media only screen and (max-width : 991px) {
	/* CUSTOM RESETS
	================================================== */
	h4 {
		font-size: 24px;
	}

	/* Buttons */ 
	.btn {
	    min-width: 120px;
	    line-height: 40px;
	    padding: 0 25px;
	    font-size: 14px;
	} 

	/* HEADER
	================================================== */
	/* Navigation */
	.navbar-nav > li > a {
		font-size: 14px;
	}

	.navbar-nav > li + li > a {
	    margin-left: 20px;
	}

	/* HERO
	================================================== */
	.hero h1 {
		font-size: 38px
	}

	.job-title {
		font-size: 20px;
	}

	.hero img {
		height: 420px;
	}

	/* SITEMAIN
	================================================== */
	.site-section {
		padding-top: 90px;
	}

	.section-skills,
	.section-portfolio,
	.section-form {
	    padding-bottom: 90px;
	}

	.site-section h2,
	.site-section h3 {
		font-size: 32px
	}

	/* Section: Skills */
	.section-skills .col-md-4 + .col-md-4,
	.skill + .skill {
		margin-top: 20px;
	}

	.skill h4 {
		font-size: 22px;
	}

	/* Section: Services */
	.section-services{
		padding-top: 200px;
	}

	.section-services .container {
		padding: 70px 90px;
	}
	
	.service h4 {
		font-size: 22px; 
	}

	/* Section: Portfolio */
	.section-portfolio .col-md-4:nth-last-child(-n+3) .portfolio-item {
	    margin-bottom: 30px;
	}

	.section-portfolio .col-md-4:nth-last-child(-n+2) .portfolio-item {
	    margin-bottom: 0;
	}

	/* Section: Counters */
	.section-counters {
		padding: 70px 0;
	}

	.site-section p.counter {
		font-size: 80px;
	}

	/* Modal */
	.modal-header {
		height: 350px;
	}
}

/* Small Devices, Tablets */
@media only screen and (max-width : 767px) {
	/* CUSTOM RESETS
	================================================== */
	h4 {
		font-size: 20px;
	}

	/* Buttons */ 
	.btn {
	    min-width: 100px;
	    line-height: 30px;
	    padding: 0 20px;
	} 

	/* Input fields */
	.form-control {
	 	margin-top: 25px;
	}

	/* Margin and Paddings Resets */
	.mt-x-0 {
	    margin-top: 0;
	}

	/* HEADER
	================================================== */
	.site-logo {
		padding-left: 15px;
	}

	.site-logo img {
		height: 22px;
	}

	/* Navigation */
	.navbar-toggle {
	    margin: 0 15px 0 0;
	    padding: 5px 0;
	   	border: 0;
	}

	.navbar-toggle .icon-bar {
		height: 1px;
		width: 30px;
	    background-color: #212121;
	    -webkit-transition: all 0.3s;
	    -moz-transition: all 0.3s;
	    -ms-transition: all 0.3s;
	    -o-transition: all 0.3s;
	    transition: all 0.3s;
	}

	.navbar-toggle .icon-bar + .icon-bar {
		margin-top: 6px; 
	}

	.navbar-toggle.act .icon-bar:first-child, 
	.navbar-toggle.act .icon-bar:last-child  { 
	    position: absolute;
	    top: 10px;
	    height: 2px;
	    background-color: #fff;
	}

	.navbar-toggle.act .icon-bar:first-child {
		-webkit-transform: rotate(45deg);
		-moz-transform: rotate(45deg);
		-ms-transform: rotate(45deg);
		-o-transform: rotate(45deg);
		transform: rotate(45deg);
	}

	.navbar-toggle.act .icon-bar:last-child  {
		-webkit-transform: rotate(-45deg);
		-moz-transform: rotate(-45deg);
		-ms-transform: rotate(-45deg);
		-o-transform: rotate(-45deg);
		transform: rotate(-45deg);
	}

	.navbar-toggle.act .icon-bar:nth-child(2) {
		opacity: 0;
	}

	.navbar-toggle.act .icon-bar + .icon-bar  {
	    margin-top: 0px;
	}

	.navbar-nav > li > a,
	.navbar-nav > li + li > a {
		display: inline-block;
		margin: 0;
		color: #fff;
	}

	.navbar-nav > li > a:hover,
	.navbar-nav > li.active > a,
	.nav > li > a:hover,
	.nav > li.active > a {
	    border-bottom: 2px solid #fff;
	}

	.navbar-toggle.act {
		z-index: 9999;
		height: 25px;
	}

	.hero .col-md-6:first-child {
		top: 30%;
	}

	.hero h1 {
		font-size: 32px
		margin-bottom: 10px;
	}

	.job-title {
		font-size: 18px;
		margin-bottom: 20px;
	}

	.hero img {
		height: 360px
	}

	.hero {
        padding: 120px 0 60px;
        height: auto;
        min-height: auto;
    }
    
    .hero-row {
        flex-direction: column;
    }
    
    .hero-content-left,
    .hero-content-right {
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
    }
    
    .hero-content-left {
        margin-bottom: 40px;
        text-align: center;
    }
    
    .hero-text-container {
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 32px;
        margin-top: 30px;
    }
    
    .job-title-container {
        justify-content: center;
        flex-direction: column;
    }
    
    .job-title {
        font-size: 18px;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .typing-indicator {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .custom-btn {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .hero-card {
        margin-bottom: 30px;
    }
    
    .expertise-tags {
        justify-content: center;
    }

	/* SITEMAIN
	================================================== */
	.site-main {
		margin-bottom: 140px;
	}

	/* site-section */
	.site-section {
	   padding-top: 60px;
	}

	.section-skills,
	.section-portfolio,
	.section-form {
	    padding-bottom: 60px;
	}

	.site-section h2,
	.site-section h3 {
	    font-size: 28px;
	}

	.img-lines {
	    margin: 10px auto 30px;
	    display: block;
	    max-width: 100%;
	}

	.site-section p {
	    margin-bottom: 25px;
	}

	/* Section: Skills */
	.skill h4 {
	    text-transform: uppercase;
	    margin-bottom: 10px;
	}

	/* Section: Services */
	.section-services {
		padding-top: 180px;
	}

	.service h4 {
		margin: 10px 0;
	}

	/* Section: Portfolio */
	.section-portfolio .col-xs-6:nth-child(odd) {
		padding-right: 7.5px;
	}

	.section-portfolio .col-xs-6:nth-child(even) {
		padding-left: 7.5px;
	}

	.portfolio-item,
	.section-portfolio .col-md-4:nth-last-child(-n+3) .portfolio-item {
		margin-bottom: 15px; 
	}

	.section-portfolio .col-md-4:nth-last-child(-n+2) .portfolio-item {
		margin-bottom: 0px;
	}

	.section-services .container {
		width: 90%;
		padding: 40px 20px;
	}

	/* Section: Counters */
	.section-counters .col-xs-12 + .col-xs-12 {
		margin-top: 25px;
	}

	/* Section: Form */
	.section-form .btn {
		margin-top: 25px;
	}

	/* Modal */
	.modal-header {
		height: 250px;
	}

	/* FOOTER
	================================================== */
	.site-footer .col-xs-12 {
		text-align: center;
	}
}

/* Extra Small Devices, Phones */ 
@media only screen and (max-width : 479px) {
	.visible-xxs {
		display: block;
	}

	/* HERO
	================================================== */
	.hero .visible-xxs + .btn {
		margin-top: 10px;
	}

	.hero {
        padding: 100px 0 50px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero-description {
        font-size: 14px;
    }
    
    .expertise-tag {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .card-header h4 {
        font-size: 16px;
    }

	/* SITEMAIN
	================================================== */
	.site-main {
		margin-bottom: 180px;
	}

	/* Section: Portfolio */
	.section-portfolio .col-xs-6 {
		width: 100%;
		padding: 0;
	}

	.section-portfolio .col-xs-6:nth-child(odd) {
		padding-right: 0px;
	}

	.section-portfolio .col-xs-6:nth-child(even) {
		padding-left: 0px;
	}

	.portfolio-item,
	.section-portfolio .col-md-4:nth-last-child(-n+3) .portfolio-item {
		margin-bottom: 0px; 
	}

	.section-portfolio .btn {
		margin-top: 25px;
	}

	/* FOOTER
	================================================== */
	.site-footer .row {
		display:flex;
		flex-direction: column-reverse;	
	}

	.site-footer .text-right{
		text-align: center;
	}

	.site-footer .col-xs-6,
	.site-footer .col-xs-3 {
		width: 100%;
	}

	.site-footer .col-xs-offset-3 {
		margin-left: 0;
	}
}