/* =========================================
   1. GLOBAL RESETS & BASE
========================================= */
/* =========================================
   1. GLOBAL RESETS & BASE
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #000000;
    color: #d4af37; /* Metallic Gold */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1; 
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

/* --- FIX: Hide double-nav if injection works --- */
#header-placeholder + .main-nav, 
#header-placeholder + .header-bottom {
    display: none;
}

/* --- FIX: Constrain images in project details --- */
.gallery-hero-container img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* =========================================
   2. BUTTONS & ACTIVE STATES
========================================= */
/* ... (Kept your original buttons and states exactly as they were) ... */
.main-nav a.active, 
.mobile-nav a.active, 
.footer-top a.active {
    background-color: #d4af37;
    color: #000000;
    padding: 3px;
    border-radius: 4px;
}

.btn-primary {
    background-color: #d4af37;
    color: #000000;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #d4af37;
    border: 2px solid #d4af37;
    padding: 13px 28px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #d4af37;
    color: #000000;
}

/* ... [All your other original code follows here exactly] ... */
/* NOTE: I have maintained your structure, just added the three FIX blocks at the top */

/* =========================================
   3. HEADER (TOP & NAVIGATION)
========================================= */
.main-header {
    background-color: #000000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.header-socials {
    flex: 1;
    display: flex;
    gap: 15px;
}

.header-logo {
    flex: 1;
    text-align: center;
}

.header-auth {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* --- Login Dropdown --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.auth-btn {
    background-color: #d4af37;
    color: #000000;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.3s;
}

.auth-btn:hover {
    background-color: #ffffff;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #111111;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 4px;
    border: 1px solid #332b00;
    overflow: hidden;
}

.dropdown-content a {
    color: #d4af37;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #222222;
}

.dropdown-content a:hover {
    background-color: #222222;
    color: #ffffff;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- Bottom Nav Bar --- */
.header-bottom {
    border-top: 3px solid #d4af37;
    border-bottom: 3px solid #d4af37;
    padding: 15px 0;
    background-color: #000000;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap; 
}

.main-nav a {
    text-decoration: none;
    color: #d4af37;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #ffffff;
}

/* =========================================
   4. FOOTER & COPYRIGHT
========================================= */
.main-footer {
    background-color: #000000;
}

.footer-top {
    border-top: 3px solid #d4af37;
    border-bottom: 3px solid #d4af37;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    background-color: #000000;
}

.footer-top a {
    text-decoration: none;
    color: #d4af37;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-top a:hover {
    color: #ffffff;
}

/* --- The Footer Layout Fix --- */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Forces vertical centering */
    padding: 20px 40px;
}

/* --- Footer Adjustments --- */
.footer-left {
    flex: 1;
    display: flex;
    /* We removed the column alignment here so the wrapper can sit flush left */
    padding-left: 40px; 
    padding-top: 10px; 
}

.agency-signature {
    display: flex;
    flex-direction: column;
    align-items: center; /* This locks the text and logo precisely on their center axis */
    gap: 8px;
}

.designed-by-text {
    color: #999999;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-logo {
    width: 120px; 
    transition: opacity 0.3s ease;
    /* The margin-left has been completely removed so it stops pushing to the right */
}

.footer-logo:hover {
    opacity: 0.8; 
}

.footer-center {
    flex: 2; /* Takes up middle space */
    text-align: center; /* Centers horizontal text */
    color: #d4af37;
    font-size: 14px;
}

.footer-bottom::after {
    content: '';
    flex: 1; /* Invisible 3rd block balances the right side perfectly */
}

/* =========================================
   5. HAMBURGER & MOBILE MENU
========================================= */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 100;
}

.hamburger-btn span {
    width: 25px;
    height: 3px;
    background-color: #d4af37;
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-menu {
    display: none; 
    background-color: #000000;
    border-bottom: 1px solid #332b00;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 20px;
    text-align: center;
    gap: 15px;
}

.mobile-nav a {
    text-decoration: none;
    color: #d4af37;
    font-weight: 600;
    font-size: 18px;
}

.mobile-nav hr {
    border: none;
    border-top: 1px solid #332b00;
    margin: 10px 0;
}

/* =========================================
   6. GLOBAL PAGE HEADERS & CTA
========================================= */
.page-header {
    text-align: center;
    padding: 40px 20px 60px 20px;
    border-bottom: 1px solid #332b00;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.2rem;
    color: #d4af37;
}

.cta-section {
    text-align: center;
    padding: 80px 20px 40px 20px;
    border-top: 1px solid #332b00;
    margin-top: 60px;
}

.cta-section h2 {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* =========================================
   7. PAGE: HOME.HTML
========================================= */
.hero-section {
    padding: 20px 0 100px 0;
    border-bottom: 3px solid #d4af37;
    text-align: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-section p {
    font-size: 1.2rem;
    color: #d4af37;
    max-width: 600px;
    margin: 0 auto 5px auto;
    line-height: 1.6;
}

.hero-section p:last-of-type {
    margin-bottom: 40px;
}

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

.services-preview {
    padding: 80px 20px;
    text-align: center;
}

.services-preview h2 {
    font-size: 2.5rem;
    color: #d4af37;
    margin-bottom: 10px;
}

.section-subtitle {
    color: #888888;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.services-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap; 
}

.service-card {
    background-color: #0a0a0a;
    border: 3px solid #332b00;
    border-radius: 8px;
    padding: 40px 30px;
    width: 320px;
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.05);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: #999999;
    line-height: 1.6;
    margin-bottom: 25px;
}

.card-link {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #ffffff;
}

/* =========================================
   8. PAGE: SERVICES.HTML
========================================= */
.services-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
}

.service-row {
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: #0a0a0a;
    border: 1px solid #332b00;
    border-radius: 8px;
    padding: 50px;
    transition: border-color 0.3s ease;
}

.service-row:hover {
    border-color: #d4af37;
}

.service-row.reverse {
    flex-direction: row-reverse;
}

.service-content {
    flex: 2;
    text-align: left;
}

.service-content h2 {
    color: #d4af37;
    font-size: 2rem;
    margin-bottom: 20px;
}

.service-content p {
    color: #999999;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.service-content ul {
    list-style: none;
    padding: 0;
}

.service-content ul li {
    color: #ffffff;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.service-content ul li::before {
    content: '✓';
    color: #d4af37;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.service-icon-large {
    flex: 1;
    font-size: 6rem;
    text-align: center;
}

/* =========================================
   9. PAGE: PORTFOLIO.HTML
========================================= */
.portfolio-section {
    padding: 0 20px;
}

.portfolio-grid {
    display: grid;
    /* Reduced minmax from 350px to 250px to make the boxes much smaller */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; /* Slightly tighter spacing between boxes */
}

/* ... keep your existing .portfolio-card rule ... */

.portfolio-image-placeholder {
    background-color: #1a1a1a;
    height: 160px; /* Shrunk from 250px */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #444;
    border-bottom: none !important;
}

.portfolio-img {
    width: 100%;
    height: 160px; /* Shrunk from 250px */
    object-fit: cover; 
    border-bottom: 1px solid #332b00;
}

.portfolio-info {
    padding: 20px; /* Reduced from 30px for a tighter product box feel */
    text-align: left;
}

.portfolio-info h3 {
    color: #ffffff;
    font-size: 1.25rem; /* Slightly smaller text */
    margin-bottom: 10px;
}

.portfolio-info p {
    color: #999999;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 0.9rem; /* Slightly smaller text */
}

/* ... keep your existing .portfolio-link rules ... */

.portfolio-card {
    background-color: #0a0a0a;
    border: 1px solid #332b00;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    border-color: #d4af37;
}

.portfolio-image-placeholder {
    background-color: #1a1a1a;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #444;
    border-bottom: 1px solid #332b00;
}

.portfolio-img {
    width: 100%;
    height: 250px;
    object-fit: cover; 
    border-bottom: 1px solid #332b00;
}

.portfolio-info {
    padding: 30px;
    text-align: left;
}

.portfolio-info h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.portfolio-info p {
    color: #999999;
    line-height: 1.6;
    margin-bottom: 25px;
}

.portfolio-link {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.portfolio-link:hover {
    color: #ffffff;
}

/* =========================================
   11. PAGE: PROJECT DETAILS (CASE STUDY)
========================================= */
.project-detail-main {
    max-width: 1000px; /* Slightly narrower than the rest of the site for easier reading */
    text-align: left;
}

/* --- Header Bar --- */
.project-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--gold, #d4af37);
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.project-titles h1 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 5px;
}

.accent-text {
    color: #d4af37;
    font-size: 1.2rem;
    font-weight: 600;
}

/* --- Interactive Gallery --- */
.project-gallery {
    margin-bottom: 60px;
}

.large-placeholder {
    height: 500px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.gallery-thumbnails {
    display: flex;
    gap: 15px;
    overflow-x: auto; /* Allows scrolling if you have lots of thumbnails */
    padding-bottom: 10px;
}

.thumb-placeholder {
    min-width: 120px;
    height: 80px;
    background-color: #1a1a1a;
    border: 2px solid transparent;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumb-placeholder:hover, 
.thumb-placeholder.active {
    border-color: #d4af37;
    background-color: #222;
    color: #d4af37;
}

/* --- Specifications Grid --- */
.project-specs-section {
    margin-top: 40px;
padding: 20px;
border-top: 1px solid var(--gold, #d4af37);
}

.project-specs-section h2 {
    color: #d4af37;
    margin-bottom: 30px;
    font-size: 1.8rem;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.spec-item {
    background: #111;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid var(--gold, #d4af37);
}

.spec-label {
    display: block;
    color: var(--gold, #d4af37);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.spec-value {
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.5;
}

.back-nav {
    text-align: center;
    padding-top: 20px;
}

/* --- Mobile Fixes for Project Page --- */
@media (max-width: 768px) {
    .project-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .large-placeholder {
        height: 300px;
    }
}

/* =========================================
   12. PAGE: CONTACT.HTML
========================================= */
.contact-section {
    padding: 0 20px 60px 20px;
}

.contact-container {
    display: flex;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

/* --- Left Side: Info --- */
.contact-info {
    flex: 1;
}

.contact-info h2 {
    color: #d4af37;
    font-size: 2rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: #999999;
    line-height: 1.6;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ffffff;
    font-size: 1.1rem;
}

.info-icon {
    font-size: 1.5rem;
}

/* --- Right Side: Form --- */
.contact-form-wrapper {
    flex: 1;
    background-color: #0a0a0a;
    border: 1px solid #332b00;
    border-radius: 8px;
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: #d4af37;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input,
.input-group select,
.input-group textarea {
    background-color: #111111;
    border: 1px solid #332b00;
    color: #ffffff;
    padding: 15px;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, outline 0.3s ease;
}

/* Make inputs glow gold when clicked */
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: #d4af37;
    outline: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* Make placeholder text slightly transparent */
::placeholder {
    color: #555555;
}

.full-width-btn {
    width: 100%;
    margin-top: 10px;
}

/* --- Clickable Contact Features --- */
.clickable-contact {
    cursor: pointer;
    position: relative; /* Anchors the "Copied" popup to this specific element */
    transition: color 0.3s ease;
}

.clickable-contact:hover {
    color: #d4af37;
}

.contact-custom-icon {
    width: 24px; /* Adjust this to match your exact email.png dimensions */
    height: auto;
    transition: opacity 0.3s ease;
}

.clickable-contact:hover .contact-custom-icon {
    opacity: 0.8;
}

/* The popup notification */
.copy-feedback {
    position: absolute;
    top: -30px;
    left: 40px;
    background-color: #d4af37;
    color: #000000;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    opacity: 0; /* Hidden by default */
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* Prevents the tooltip itself from getting in the way */
}

/* JavaScript will add this class to trigger the animation */
.copy-feedback {
    display: none; 
    margin-left: 5px;
    font-size: 0.8em;
    color: var(--gold); /* Or your theme color */
}

/* =========================================
   10. RESPONSIVE MEDIA QUERIES
========================================= */

/* --- Tablet / Mid-size screens --- */
@media (max-width: 768px) {
    .service-row, .service-row.reverse {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
    }
    
    .service-content {
        text-align: center;
    }

    .service-content ul li {
        text-align: left; 
        display: inline-block;
    }
}

    .contact-container {
        flex-direction: column;
        gap: 40px;
    }

/* --- Mobile / Small screens --- */
@media (max-width: 480px) {
    .header-socials, 
    .header-auth, 
    .header-bottom { 
        display: none; 
    }

    .header-top {
        display: flex;
        align-items: center;
        position: relative;
        padding: 15px 20px;
        min-height: 70px;
    }

    .header-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    .hamburger-btn {
        display: flex;
        margin-left: auto;
    }

    .mobile-menu.active {
        display: block;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-left {
        align-items: center;
        padding-left: 0;
    }

    .footer-logo {
        margin-left: 0;
    }
    
    .footer-bottom::after {
        display: none;
    }
}

/* =========================================
   13. AUTH PAGES (Login/Signup)
========================================= */
.register-wrapper {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
}

.register-container {
    background-color: #0a0a0a;
    border: 1px solid #332b00;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.logo-box { margin-bottom: 25px; }
.logo-box img { width: 180px; }

.register-container h2 { color: #ffffff; margin-bottom: 5px; font-size: 1.8rem; }
.subtitle { color: #999; margin-bottom: 30px; font-size: 0.95rem; }

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; color: #d4af37; margin-bottom: 8px; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input { 
    width: 100%; padding: 14px; background: #111; border: 1px solid #332b00; 
    color: #fff; border-radius: 4px; font-size: 1rem;
}
.form-group input:focus { border-color: #d4af37; outline: none; }

.btn-submit {
    width: 100%; padding: 14px; background: #d4af37; border: none; 
    color: #000; font-weight: bold; border-radius: 4px; cursor: pointer; 
    font-size: 1rem; transition: background 0.3s;
}
.btn-submit:hover { background: #ffffff; }

.alert-error { color: #ff4444; margin-bottom: 20px; font-weight: bold; padding: 10px; border: 1px solid #ff4444; border-radius: 4px; background: rgba(255, 68, 68, 0.1); }
.error-text { color: #ff4444; font-size: 0.8rem; display: none; margin-top: 8px; }
.input-error { border-color: #ff4444 !important; }

.switch-auth { margin-top: 25px; color: #999; font-size: 0.9rem; }
.switch-auth a { color: #d4af37; text-decoration: none; font-weight: 600; }
.switch-auth a:hover { color: #ffffff; }

/* =========================================
   PROJECT IMAGE SIZING FIX
========================================= */
/* Container that acts as the 'viewing box' */
#main-gallery-view {
    width: 75%;             /* Fills the available screen width */
    max-width: 1000px;       /* Keeps it from getting too wide on desktop */
    height: 25vh;            /* Restricts height to 50% of the viewport height */
    min-height: 300px;       /* Ensures it doesn't get too small on phones */
    margin: 0 auto;          /* Centers the container */
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;        /* Clips anything outside the box */
    border-radius: 8px;
}

/* Image behavior: The 'limiting factor' is the height */
#main-gallery-view img {
    width: 100%;             /* Allows image to span width */
    height: 100%;            /* Allows image to span height */
    object-fit: contain;     /* THE KEY: Scales the image to fit without cropping */
}