/* Custom CSS for Huthiepha Portfolio */

/* Font Awesome overrides for Lighthouse score (display: swap) */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2') format('woff2'),
        url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.ttf') format('truetype');
}

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.woff2') format('woff2'),
        url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.ttf') format('truetype');
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2') format('woff2'),
        url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.ttf') format('truetype');
}

:root {
    --primary: #000000;
    --primary-dark: #222222;
    --primary-light: #444444;
    --secondary: #ffffff;
    --secondary-dark: #000000;
    --secondary-light: #f5f5f5;
    --accent: #000000;
    --accent-dark: #4b4848;
    --accent-light: #ffffff;
    --background: #ffffff;
    --card-bg: #ffffff;
    --text-main: #000000;
    --text-muted: #444444;
    --text-light: #888888;
    --border-radius: 18px;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.13);
    /* Restoring Gradients to Black/Grey theme */
    --gradient-primary: linear-gradient(135deg, #000000 0%, #222222 100%);
    --gradient-secondary: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
    --gradient-accent: linear-gradient(135deg, #000000 0%, #ffffff 100%);
}

body {
    background: var(--background);
    color: var(--text-main);
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: rgb(122, 122, 122);
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
}

h5 {
    color: black;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-dark);
}

/* Page Header Gradient */
.page-header-gradient {
    background: linear-gradient(135deg, #000000 0%, #4a4a4a 100%) !important;
    color: white;
}

.page-header-gradient h1,
.page-header-gradient p {
    color: white !important;
}

/* Header */
.modern-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.modern-navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.3rem 0;
}

/* Hero Section */
.hero-section {
    margin-top: 76px;
}

.hero-content {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100vh;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content .container {
    position: relative;
    z-index: 2;
}

/* Logo Section */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-placeholder {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ffffff, #ffffff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* Restoring original color from Step 41 */
.brand-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: #2c3e50;
    /* Was in Step 41 */
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1;
}

/* Modern Toggle Button (Hamburger) */
.modern-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    background: transparent;
}

.toggler-line {
    display: block;
    width: 25px;
    height: 3px;
    background: #2c3e50;
    /* Original color */
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.modern-toggler:hover .toggler-line {
    background: #000000;
    /* Replaced Blue with Black */
}

/* Modern Navigation Menu */
.modern-nav {
    gap: 0.5rem;
}

.modern-nav .nav-item {
    position: relative;
}

.modern-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #2c3e50;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #000000 0%, #4a4a4a 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 25px;
    z-index: -1;
}

.modern-nav .nav-link:hover::before,
.modern-nav .nav-link.active::before {
    opacity: 1;
}

.modern-nav .nav-link:hover,
.modern-nav .nav-link.active {
    color: white;
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.modern-nav .nav-link:hover .nav-icon,
.modern-nav .nav-link.active .nav-icon {
    transform: scale(1.1);
}

/* Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 0.9rem;
}

.contact-item i {
    color: #000000;
    /* Replaced Blue */
}

/* CTA Button */
.modern-cta {
    background: linear-gradient(135deg, #000000 0%, #4a4a4a 100%);
    border: none;
    border-radius: 25px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modern-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #222222, #5a5a5a);
}

/* Admin Button */
.admin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 50%;
    color: rgba(108, 117, 125, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
}

.admin-btn:hover {
    background: rgba(108, 117, 125, 0.15);
    color: rgba(108, 117, 125, 0.8);
    transform: scale(1.05);
    opacity: 0;
}

/* Navbar Progress */
.navbar-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

/* Cards (Restoring 12px border as per Step 41 original) */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    border: 12px solid black;
    /* Restored original heavy border */
}

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

.project-card {
    position: relative;
    overflow: hidden;
}

.project-card img {
    transition: transform 0.3s ease;
}

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

/* Buttons */
.btn {
    border-radius: 25px;
    font-weight: 500;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

.btn.active {
    background-color: black;
}

.btn-primary,
.btn-request-service {
    background: white;
    color: var(--primary);
    border-color: black;
    border-radius: 25px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    border-color: black;
}

.btn-primary:hover,
.btn-request-service:hover {
    background: black;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0);
    border-color: black;
    background-color: black;
}

.btn-outline-primary {
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
    background: transparent;
    border-radius: 25px;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
}

/* Carousel */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

[dir="rtl"] .carousel-control-prev {
    left: auto;
    right: 20px;
}

[dir="rtl"] .carousel-control-next {
    right: auto;
    left: 20px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: brightness(0) invert(1);
}

/* Footer & Social */
footer {
    background: var(--primary-dark);
    color: #fff;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

footer a {
    color: #fbbf24;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 10px;
}

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

/* Footer Specific Social Styles */
footer .social-links a {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

/* Brand Colors on Hover */
.social-facebook:hover {
    background: #3b5998 !important;
    border-color: #3b5998 !important;
    color: white !important;
}

.social-twitter:hover {
    background: #1da1f2 !important;
    border-color: #1da1f2 !important;
    color: white !important;
}

.social-instagram:hover {
    background: #e1306c !important;
    border-color: #e1306c !important;
    color: white !important;
}

.social-linkedin:hover {
    background: #0077b5 !important;
    border-color: #0077b5 !important;
    color: white !important;
}

/* Contact Page Social Icons Fix */
/* Ensure icons in cards (like Contact Us) are visible and not white-on-white */
.card .social-links a i {
    font-size: 1.1rem;
}


.fa-3x {
    color: var(--primary);
}

.badge {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 991.98px) {
    .modern-navbar {
        padding: 0.3rem 0;
    }

    .modern-nav {
        margin-top: 1rem;
        gap: 0.5rem;
        width: 100%;
    }

    .navbar-nav {
        align-items: center;
        width: 100%;
    }

    .modern-nav .nav-item {
        width: 60%;
        display: flex;
        justify-content: center;
    }

    .modern-nav .nav-link {
        padding: 0.5rem 1rem;
        border-radius: 15px;
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .navbar-actions {
        margin-top: 1rem;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }

    .contact-info {
        display: none;
    }

    .modern-cta {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .navbar-collapse.show {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 15px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 576px) {
    .brand-title {
        font-size: 1.1rem;
    }

    .brand-subtitle {
        font-size: 0.7rem;
    }

    .modern-cta span {
        display: none;
    }

    .modern-cta {
        padding: 0.5rem;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .service-buttons-wrapper {
        width: 100%;
        padding: 0 10px;
    }

    .service-buttons-wrapper .btn {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding-left: 5px;
        padding-right: 5px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .service-buttons-wrapper .btn i {
        margin-left: 4px !important;
    }

    /* Mobile Store Buttons Alignment */
    .product-actions {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0 10px;
    }

    .product-actions .btn {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding-left: 5px;
        padding-right: 5px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .product-actions .btn i {
        margin-left: 4px !important;
    }

    /* Mobile Project Filters */
    .project-filters {
        justify-content: center;
        gap: 0.5rem !important;
    }

    .project-filters .btn {
        flex: 1 1 45%;
        /* Allow buttons to take ~half width, wrapping nicely */
        max-width: 100%;
        font-size: 0.85rem;
        padding: 0.5rem 0.2rem;
        display: flex;
        justify-content: center;
        align-items: center;
        white-space: nowrap;
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-control {
    border-radius: 12px;
    border: 1px solid black;
    box-shadow: none;
    transition: border 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.alert-danger {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
}

.alert-warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: white;
}

.alert-info {
    background: linear-gradient(45deg, #000000, #222222);
    color: white;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}