/* CRITICAL FIXES - Header and Layout Issues */
.header-wrapper {
    background: transparent !important;
    color: white;
    width: 100%;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    overflow: hidden;
}

header {
    background: transparent !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* MAIN CONTENT LAYOUT - FIXED WITH PROPER SCROLLING */
main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 80px 20px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    align-items: start;
}

/* PORTFOLIO SIDEBAR - FIXED POSITIONING */
.portfolio-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-self: start;
}

.sidebar-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.sidebar-section h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 12px;
}

.quick-links a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 5px;
}

.quick-links a:hover, .quick-links a.active {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.quick-links i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.quick-links a:hover i {
    transform: translateX(3px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    transform: translateY(-3px);
    background-color: var(--primary-light);
}

.social-links i {
    color: white;
    font-size: 1.1rem;
}

.updates {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.update-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.update-item:hover {
    transform: translateY(-2px);
}

.update-badge {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
}

.update-item p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* PORTFOLIO CONTENT - VERTICAL SCROLLING */
.portfolio-content {
    animation: fadeIn 1s ease;
    height: 100%;
    overflow-y: visible;
}

/* HERO SLIDESHOW SECTION */
.hero-slideshow {
    height: 80vh;
    overflow: hidden;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    margin-top: 200px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 50px;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    max-width: 600px;
    color: white;
    z-index: 5;
    animation: fadeInUp 1s ease;
}

.slide_child {
    display: flex;
    gap: 3rem;
    margin-left: 4rem;
    align-items: center;
    justify-content: center;
}

.slide-logo {
    width: 120px;
    margin-bottom: 20px;
}

.slide h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.slide hr {
    width: 1px;
    height: 150px;
    margin: 20px 0;
    background: white;
    border: none;
}

.slide p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.slide button {
    padding: 12px 30px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
    font-family: "Poppins", sans-serif;
}

.slide button:hover {
    background: var(--primary);
    color: white;
}

.slide-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slide-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.slide-dot.active {
    background: white;
}

/* PORTFOLIO ROWS - NETFLIX STYLE WITH SCROLL CONTROLS */
.portfolio-row {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
    position: relative;
}

.row-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

.row-header h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.row-header p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
}

.projects-scroller-container {
    position: relative;
}

.projects-scroller {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f0f0f0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.projects-scroller::-webkit-scrollbar {
    height: 8px;
}

.projects-scroller::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.projects-scroller::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.projects-scroller::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* SCROLL BUTTONS */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 51, 102, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.scroll-btn:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.scroll-left {
    left: -20px;
}

.scroll-right {
    right: -20px;
}

.projects-scroller-container:hover .scroll-btn {
    opacity: 1;
}

/* PROJECT CARDS */
.project-card {
    flex: 0 0 300px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img,
.card-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .card-image img,
.project-card:hover .card-image video {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.quick-view {
    background: white;
    color: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-view:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-content h4 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.project-status {
    background: #e9f5ff;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* FEATURED PROJECT SECTION */
.featured-project {
    position: relative;
    margin: 80px 0;
    border-radius: 15px;
    overflow: hidden;
    height: 500px;
    width: 100%;
}

.featured-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.featured-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,51,102,0.8) 0%, rgba(0,51,102,0.4) 100%);
}

.featured-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 60px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
}

.featured-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.featured-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.9;
}

.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255,255,255,0.2);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.featured-cta {
    background: white;
    color: var(--primary);
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.featured-cta:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* TESTIMONIALS SECTION */
.testimonials-section {
    margin: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.impact-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.metric {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.metric:hover {
    transform: translateY(-5px);
}

.metric h3 {
    color: var(--primary);
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.metric p {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

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

.testimonial-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--primary);
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-content p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.client-info h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.client-info span {
    color: #666;
    font-size: 0.9rem;
}

/* PORTFOLIO CTA SECTION */
.portfolio-cta {
    position: relative;
    margin: 80px 0;
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    width: 100%;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cta-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 60px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(45deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.cta-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-btn {
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.cta-btn.primary {
    background: white;
    color: var(--primary);
}

.cta-btn.primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.cta-btn.secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.cta-btn.secondary:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}
featured-project, .portfolio-cta {
    position: relative;
    margin: 80px 0;
    border-radius: 15px;
    overflow: hidden;
    width: calc(100vw - 40px); /* Account for padding */
    max-width: 1360px; /* Match main container max-width minus padding */
    left: 50%;
    transform: translateX(-50%);
}

.featured-project {
    height: 500px;
}

.portfolio-cta {
    height: 400px;
}

/* Ensure they stay within the main container on large screens */
@media (min-width: 1400px) {
    .featured-project, .portfolio-cta {
        max-width: 1360px; /* 1400px - 40px padding */
    }
}


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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.portfolio-row {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.portfolio-row.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    main {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
    
    .impact-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .scroll-btn {
        display: none;
    }
}

@media (max-width: 992px) {
    main {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .portfolio-sidebar {
        position: static;
        order: 2;
    }
    
    .portfolio-content {
        order: 1;
    }
    
    .featured-content {
        padding: 40px;
    }
    
    .featured-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-slideshow {
        height: 80vh;
    }
    
    .slide {
        padding: 0 20px;
        justify-content: center;
        text-align: center;
    }
    
    .slide-content {
        max-width: 100%;
    }
    
    .slide h1 {
        font-size: 2.2rem;
    }
    
    .slide_child {
        margin-left: 0;
        flex-direction: column;
        gap: 1rem;
    }
    
    .slide hr {
        margin: 20px auto;
        height: 80px;
    }
    
    main {
        padding: 50px 15px;
    }
    
    .row-header h2 {
        font-size: 1.8rem;
    }
    
    .project-card {
        flex: 0 0 280px;
    }
    
    .featured-project {
        height: 400px;
    }
    
    .featured-content {
        padding: 30px;
    }
    
    .featured-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content {
        padding: 40px;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .impact-metrics {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .slide h1 {
        font-size: 1.8rem;
    }
    
    .row-header h2 {
        font-size: 1.6rem;
    }
    
    .project-card {
        flex: 0 0 260px;
    }
    
    .featured-project {
        height: 350px;
    }
    
    .featured-content h2 {
        font-size: 1.6rem;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .cta-btn {
        width: 100%;
        text-align: center;
    }
    
    .sidebar-section {
        padding: 20px;
    }
}