/* ==========================================================================
   Custom Variables & Base Reset
   ========================================================================== */
:root {
    --primary-color: #34495e;
    --secondary-color: #222222;
    --accent-color: #f39c12;
    --bg-color: #f8f9fa;
    --text-color: #2c3e50;
    --light-color: #ffffff;
    --transition-smooth: all 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================================================================
   Typography & Reusable Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 700;
}

.section-padding {
    padding: 80px 0;
}

.bg-primary-custom { background-color: var(--primary-color); }
.bg-secondary-custom { background-color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }

.btn-accent {
    background-color: var(--accent-color);
    color: var(--light-color);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 4px;
    transition: var(--transition-smooth);
    border: none;
}

.btn-accent:hover {
    background-color: #d3830c;
    color: var(--light-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.btn-outline-custom {
    border: 2px solid var(--light-color);
    color: var(--light-color);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 4px;
    background: transparent;
    transition: var(--transition-smooth);
}

.btn-outline-custom:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* ==========================================================================
   Navigation Header
   ========================================================================== */
.top-bar {
    background-color: var(--secondary-color);
    font-size: 0.9rem;
}

.navbar {
    background-color: var(--primary-color) !important;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand img {
    max-height: 50px;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    padding: 15px 20px;
    transition: var(--transition-smooth);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--accent-color);
}

.sticky-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    background: linear-gradient(rgba(34, 34, 34, 0.75), rgba(52, 73, 94, 0.75)), 
                url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=1920') no-repeat center center/cover;
    height: 85vh;
    display: flex;
    align-items: center;
    color: var(--light-color);
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

/* ==========================================================================
   Feature Cards & Hover Effects
   ========================================================================== */
.custom-card {
    background: var(--light-color);
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
}

.custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.icon-box {
    width: 70px;
    height: 70px;
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.custom-card:hover .icon-box {
    background-color: var(--accent-color);
    color: var(--light-color);
}

/* ==========================================================================
   Projects & Gallery (Masonry / Grid)
   ========================================================================== */
.filter-btn.active {
    background-color: var(--accent-color) !important;
    color: var(--light-color) !important;
    border-color: var(--accent-color) !important;
}

.project-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.project-img-wrapper img {
    transition: transform 0.5s ease;
}

.custom-card:hover .project-img-wrapper img {
    transform: scale(1.08);
}

.gallery-grid {
    columns: 3 300px;
    column-gap: 20px;
}

.gallery-item {
    margin-bottom: 20px;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: var(--transition-smooth);
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(52, 73, 94, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

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

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

/* ==========================================================================
   Scroll-To-Top Button
   ========================================================================== */
#btnScrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    background-color: var(--accent-color);
    color: white;
    border: none;
    outline: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: var(--transition-smooth);
}

#btnScrollToTop:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--secondary-color);
    color: #a0aab2;
}

footer h5 {
    color: var(--light-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
}

footer a {
    color: #a0aab2;
    text-decoration: none;
    transition: var(--transition-smooth);
}

footer a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    margin-right: 8px;
    color: var(--light-color);
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--light-color) !important;
    padding-left: 0;
}

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