/* Modern Portfolio Redesign Styles */
:root {
    --primary-color: #ffd700;
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #aaaaaa;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Modern Navigation Styles */
.modern-header {
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.modern-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-sig {
    height: 45px;
    width: auto;
    mix-blend-mode: screen;
    filter: grayscale(1) brightness(2) contrast(1.1);
    transition: transform 0.3s ease;
}

.logo-sig:hover {
    transform: scale(1.05);
}

.modern-nav {
    list-style: none;
    display: flex;
    gap: 30px;
}

.modern-nav li a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.modern-nav li a:hover {
    color: var(--primary-color);
}

/* Container */
.modern-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-main);
}

/* Category Grid (portfolio.php and clients.php) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

.category-card,
.client-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    /* Reduced height for better cropping/visibility */
    background-color: var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    text-decoration: none;
}

.category-card:hover,
.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.category-card img,
.client-card-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    transition: transform 0.5s ease;
    z-index: 1;
}

.category-card:hover img,
.client-card:hover .client-card-img {
    transform: translate(-50%, -50%) scale(1.05);
}

.category-overlay,
.client-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    z-index: 2;
}

.category-title,
.client-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 3;
}

/* Client Card Specifics */
.client-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.client-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

.client-submit {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* Image Grid (portfolio2.php) */
.image-grid {
    column-count: 3;
    column-gap: 20px;
}

.image-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.03);
}

/* Main Front Page Body */
#main-front {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Footer */
#footer {
    clear: both;
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 60px;
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10000;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* Responsive */
@media (max-width: 900px) {
    .image-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .modern-nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9998;
        border-left: 1px solid rgba(255, 215, 0, 0.1);
    }

    .modern-nav-wrapper.active {
        right: 0;
    }

    .modern-nav {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .modern-nav li a {
        font-size: 1.5rem;
    }

    /* Hamburger Animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -8px);
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .image-grid {
        column-count: 1;
    }
}