/* Responsive Styles */

/* Hide mobile theme toggle in desktop view */
.mobile-theme-toggle {
    display: none;
}

/* Remove mobile theme toggle from nav-links when active */
.nav-links.active .mobile-theme-toggle {
    display: none;
}

/* Ensure theme toggle stays visible in nav-icons */
.nav-icons {
    display: flex !important;
    align-items: center;
    margin-left: auto;
    padding: 0;
    gap: 16px; /* Increase gap for better spacing between icons */
    z-index: 1001; /* Ensure it stays above the mobile menu */
}

.theme-toggle {
    margin: 0;
    display: flex !important;
    order: 2; /* Move theme toggle to the right */
}

/* Mobile menu toggle positioning */
.mobile-menu-toggle {
    display: none; /* Hidden by default on desktop */
    order: 1; /* Move hamburger menu to the left of theme toggle */
}

/* Large screens (laptops/desktops, 1200px and up) */
@media only screen and (max-width: 1200px) {
    .hero-content,
    .project-showcase,
    .skills-container,
    .about-hero-content {
        padding: 0 2rem;
    }
}

/* Medium screens (tablets, 992px and down) */
@media only screen and (max-width: 992px) {
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero-content,
    .about-hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text,
    .about-text {
        margin-bottom: 3rem;
        order: 2;
    }
    
    .hero-image,
    .about-image {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .about-image {
        max-width: 300px;
        margin: 0 auto 2rem;
    }
    
    .hero-text {
        margin-bottom: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 1rem;
    }
    
    .btn, .outline-btn, .filter-btn {
        min-width: 130px;
    }
    
    .project-showcase {
        flex-direction: column;
    }
    
    .project-image,
    .project-details {
        max-width: 100%;
    }
    
    .skills-container {
        flex-direction: column;
    }
    
    .skills-column {
        margin-bottom: 2rem;
    }
    
    .client-carousel {
        max-width: 100%;
    }
    
    .carousel-container::before, 
    .carousel-container::after {
        width: 10%;
    }
    
    .logo-item {
        width: 120px;
        height: 60px;
        margin: 0 15px;
    }
    
    .logo-item img {
        height: 35px;
        max-width: 100px;
    }
    
    @keyframes marquee {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }
    
    .carousel-track {
        animation-duration: 25s; /* Slightly faster for smaller screens */
    }
    
    /* Featured Project Responsive Styles */
    .featured-project-content {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .featured-project-image {
        min-height: 300px;
    }
    
    .featured-project-details {
        padding: 2rem;
    }
    
    .featured-project-details h2 {
        text-align: center;
    }
    
    .project-meta {
        text-align: center;
    }
    
    .project-highlights {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Timeline Responsive Styles - Tablets */
    .timeline::before {
        left: 30px; /* Move timeline to left side */
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 22px; /* Adjust circle position */
    }
}

/* Small screens (mobiles, 768px and down) */
@media only screen and (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .main-nav {
        display: flex;
        align-items: center;
        padding: 0 1.5rem;
        height: 60px;
    }
    
    .logo {
        display: flex;
        align-items: center;
        margin: 0;
        padding-right: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex !important; /* Force display with !important */
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin: 0; /* Remove any margin */
        color: inherit;
        z-index: 100;
    }

    .mobile-menu-toggle i {
        font-size: 1.2rem;
        opacity: 1;
    }
    
    .nav-icons {
        gap: 12px; /* Slightly reduce gap on mobile for tighter layout */
    }
    
    .hero-content,
    .project-showcase,
    .skills-container,
    .about-hero-content {
        padding: 0 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .client-logos {
        gap: 1.5rem;
    }
    
    .logo-item {
        width: 100px;
        height: 50px;
        margin: 0 12px;
    }
    
    .logo-item img {
        height: 30px;
        max-width: 80px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
        max-width: 260px;
        margin: 0 auto;
    }
    
    .cta-buttons .btn {
        width: 100%;
        min-width: 100%;
    }
    
    .filter-btn {
        min-width: 110px;
        padding: 0.6rem 1rem;
    }
    
    /* Timeline Responsive Styles - Mobile */
    .timeline {
        padding: 1.5rem 0;
    }
    
    .timeline-item {
        margin-bottom: 2rem;
        padding-left: 60px;
    }
    
    .timeline-content {
        padding: 1.2rem;
    }
    
    .timeline-item::after {
        width: 12px;
        height: 12px;
        top: 18px;
    }
    
    .company, .date {
        font-size: 0.9rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .carousel-container::before, 
    .carousel-container::after {
        width: 8%;
    }
    
    .carousel-track {
        animation-duration: 20s; /* Even faster for mobile */
    }
    
    /* Override any old styles for nav-links to ensure frosted glass effect */
    .nav-links {
        background-color: rgba(255, 255, 255, 0.8) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        padding: 1rem 0;
        display: none;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .nav-links.active li {
        margin: 0.75rem 1.5rem;
        width: calc(100% - 3rem);
    }
    
    .nav-links.active a {
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1.5rem; /* Match desktop button padding */
        height: 44px; /* Match button height */
        font-size: 0.9rem; /* Match button font size */
    }
    
    .dark-theme .nav-links {
        background-color: rgba(30, 30, 30, 0.8) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    /* Featured Project Responsive Styles - Mobile */
    .featured-project-image {
        min-height: 250px;
    }
    
    .featured-project-details {
        padding: 1.5rem;
    }
    
    .featured-project-details h2 {
        font-size: 1.5rem;
    }
    
    .project-tag {
        margin-bottom: 0.5rem;
    }
    
    .project-highlights {
        padding-left: 1rem;
    }

    /* Design Process Timeline Responsive Styles - Mobile */
    .process-steps {
        flex-direction: column;
        gap: 2.5rem;
        padding: 0;
        margin: 0 1.5rem;
    }

    .process-steps::before {
        left: 29px;
        right: auto;
        top: 0;
        bottom: 0;
        width: 2px;
        height: 100%;
    }

    .process-step {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-gap: 1.5rem;
        text-align: left;
        max-width: none;
        width: 100%;
        margin: 0;
        padding-left: 0;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
        margin: 0;
        align-self: flex-start;
    }

    .step-content {
        padding-right: 1rem;
        background-color: transparent;
    }

    .process-step h3 {
        font-size: 1.1rem;
        margin: 0.25rem 0 0.75rem;
        white-space: normal;
        line-height: 1.4;
    }

    .process-step p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin: 0;
        background-color: transparent;
    }
}

/* Extra small screens (small mobiles, 480px and down) */
@media only screen and (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
    }
    
    .nav-links li {
        margin: 0.5rem;
    }
    
    .nav-links a {
        padding: 0.6rem 1.2rem; /* Slightly smaller padding for very small screens */
        height: 40px; /* Slightly reduced height for small screens */
        font-size: 0.85rem; /* Slightly smaller font for small screens */
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 260px;
        margin: 2rem auto 0;
    }
    
    .hero-buttons .btn {
        width: 100%;
        min-width: 100%;
        justify-content: center;
    }
    
    .filter-btn {
        min-width: 100px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    #clients h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    #clients p.subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }
    
    .carousel-container {
        max-width: 100%;
        overflow: hidden;
        padding: 0;
    }
    
    .carousel-container::before, 
    .carousel-container::after {
        width: 5%;
    }
    
    .logo-item {
        width: 80px;
        height: 40px;
        margin: 0 8px;
    }
    
    .logo-item img {
        height: 25px;
        max-width: 60px;
    }
    
    .carousel-track {
        animation-duration: 20s;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* Timeline Responsive Styles - Extra Small */
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item::after {
        left: 12px;
        width: 10px;
        height: 10px;
    }

    /* Design Process Timeline Stroke Alignment Fix */
    .process-steps {
        margin: 0;
        padding: 0 1rem;
    }

    .process-steps::before {
        left: 19px;
        width: 2px;
        height: calc(100% - 30px);
        top: 20px;
        background-color: var(--border-color);
        z-index: 1;
    }

    .process-step {
        display: grid;
        grid-template-columns: 40px 1fr;
        gap: 1.25rem;
        margin-bottom: 2rem;
        background-color: transparent;
    }

    .step-number {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 3;
    }

    .step-content {
        position: relative;
        z-index: 2;
        padding: 0.5rem 0.75rem;
        background-color: transparent;
        border-radius: 4px;
        padding-top: 0.5rem;
    }

    /* Remove margin from last step for proper stroke end */
    .process-step:last-child {
        margin-bottom: 0;
    }

    .section-intro {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }
}

/* Mobile menu toggle styles */
.mobile-menu-toggle {
    display: none; /* Hidden by default on desktop */
}

@media only screen and (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .nav-links.active li {
        margin: 0.75rem 0;
    }
}

/* ===== Align Design Proficiency intro paragraph ===== */
#skills > p {
  /* Match the section's global horizontal padding */
  padding: 0 1.5rem;
  /* Center it and constrain its width like your containers */
  max-width: 1200px;      /* or whatever your global max-content width is */
  margin: 0 auto 2rem;    /* auto-center + bottom space to separate from the cards */
  box-sizing: border-box; /* include the padding in the width */
}

/* On larger screens you might prefer no side padding: */
@media (min-width: 992px) {
  #skills > p {
    padding: 0;           /* container itself already has enough gutter */
  }
}

