/* * 1. VISUAL STYLE TOKENS & GLOBALS
 * Consolidated from all pages
 */
/* CINZEL (Headings) */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cinzel-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cinzel-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/cinzel-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/cinzel-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/cinzel-latin-800.woff2') format('woff2');
}

/* INTER (Body Text) - Variable Font */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900; /* Ranges from 100 to 900 */
  font-display: swap;
  src: url('/assets/fonts/inter-latin-var.woff2') format('woff2');
}

/* PLAYFAIR DISPLAY (Accents & 404) */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-latin-700.woff2') format('woff2');
}

:root {
    --color-bg: #FFFFFF;
    --color-bg-light: #f8f8f8; /* from about.html */
    --color-text: #1A1A1A;
    --color-text-soft: #555555;
    --color-accent: #003366; /* Muted Deep Blue */
    --color-border: #EAEAEA;
    --radius-cards: 12px;
    --shadow-cards: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.08);
    
    /* TYPOGRAPHY UPDATES */
    --font-primary: "Inter", sans-serif;
    --font-heading: "Cinzel", serif;        /* NEW: For Main Headings */
    --font-accent: "Playfair Display", serif; /* NEW: For Taglines */
    --font-serif: "Playfair Display", serif; /* Kept for backward compatibility if used elsewhere */
    
    --transition-speed: 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary), sans-serif; /* Fallback added */
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-speed);
}

button {
    font-family: var(--font-primary), sans-serif;
    cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: 0.5px;
}

p {
    color: var(--color-text-soft);
    margin-bottom: 1rem;
}

/* * 2. SHARED LAYOUT & UTILITIES
 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition-speed);
    cursor: pointer;
}

.btn-outline {
    border: 2px solid var(--color-text);
    color: var(--color-text);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
}

/* --- Floating WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 20px; /* Takes the original spot of Back to Top */
    right: 20px;
    width: 50px;
    height: 50px;
    z-index: 99; /* Just below the nav/modals */
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
    
    /* Default State: Visible */
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-float img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* "Back to Top" Button (Adjusted) */
.back-to-top-btn {
    position: fixed;
    /* Move UP to sit above WhatsApp (20px + 50px + 15px gap) */
    bottom: 85px; 
    right: 23px; /* Align visual center with WhatsApp icon */
    width: 44px;
    height: 44px;
    background-color: var(--color-text);
    color: var(--color-bg);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 44px;
    text-align: center;
    z-index: 100;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}
.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top-btn:hover {
    background-color: var(--color-text-soft);
}

/* * 3. SHARED HEADER (Used on work.html & about.html)
 */
.site-header {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 1.5rem 5vw;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-heading); /* Apply Cinzel to Logo */
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    display: flex; 
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap; 
    z-index: 102; 
}

/* Logo Icon Styling */
.site-logo-icon {
    width: 30px; 
    height: 30px;
    overflow: hidden;
    border-radius: 50%;
    border: 1px solid var(--color-border); 
}
.site-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-text-soft);
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-links a.active {
    color: var(--color-text);
    font-weight: 700;
}


/* --- RESPONSIVE NAVIGATION LOGIC --- */

/* 1. Hamburger Toggle Button */
.nav-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 104;
}
.hamburger-bar {
    width: 30px;
    height: 3px;
    background: var(--color-text);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* 2. Mobile Breakpoint Logic (900px) */
@media (max-width: 900px) {
    
    /* Show the hamburger */
    .nav-toggle {
        display: flex;
    }
    
    /* Un-hide the logo text but resize it */
    .logo-text {
        display: block; /* Changed from none */
        font-size: 0.9rem; /* Reduced size for mobile fit */
    }
    
    /* Style the slide-out panel */
    .main-nav-wrapper {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background-color: rgba(0,0,0,0.5); /* Backdrop */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out, visibility 0.3s;
        z-index: 103;
        visibility: hidden;
    }
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        width: 70%; /* Panel width */
        max-width: 300px; /* Max panel width */
        height: 100%;
        background: var(--color-bg);
        position: absolute;
        top: 0;
        right: 0;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    .nav-links a {
        font-size: 1.2rem; /* Make links larger for touch */
    }

    /* 3. The "Open" State */
    .main-nav-wrapper.is-open {
        transform: translateX(0);
        visibility: visible;
    }
    
    /* 4. Animate the hamburger icon to an "X" */
    .nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    .nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* * FORCE MOBILE DRAWER ON DESKTOP 
 * When the landing page hamburger triggers the menu on Desktop, 
 * we need the drawer styles to apply even though we are above 900px width.
 */
.main-nav-wrapper.is-open {
    /* Re-assert the drawer styles usually found in the media query */
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 100%;
    background-color: rgba(0,0,0,0.5); /* Backdrop */
    z-index: 103;
    display: block; /* Ensure it overrides any desktop 'display: flex' */
    visibility: visible;
    transform: translateX(0);
}

.main-nav-wrapper.is-open .nav-links {
    /* Force vertical layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 300px; /* Fixed width drawer */
    height: 100%;
    background: var(--color-bg);
    position: absolute;
    top: 0;
    right: 0;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.main-nav-wrapper.is-open .nav-links a {
    font-size: 1.5rem; /* Larger font for the drawer experience */
}


/* * 4. SHARED FOOTER (Used on all pages)
 */
.contact-section {
    background-color: var(--color-bg);
    /* Reduced excessive top/bottom padding */
    padding: 60px 5vw 2rem 5vw; 
    border-top: 1px solid var(--color-border);
    margin-top: 2rem; /* Reduced from 3rem */
}

.map-wrapper {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
}

.map-wrapper iframe {
    filter: grayscale(1);
    pointer-events: none;
}

/* Re-enable interaction when the wrapper is active (clicked) */
.map-wrapper.is-active iframe {
    pointer-events: auto;
}

.contact-group {
    margin-bottom: 2rem;
}

.contact-subheading {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-soft);
    margin-bottom: 0.75rem;
}

.contact-info address,
.contact-info a {
    font-style: normal;
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 500;
}
.contact-info a:hover {
    text-decoration: underline;
}

.email-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.email-text {
    font-size: 1.1rem;
    font-weight: 500;
    word-break: break-all;
    cursor: pointer; /* Add this for a click hint */
}

.copy-email-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    background: #f9f9f9;
    border-radius: 6px;
    color: var(--color-text-soft);
    transition: var(--transition-speed);
}
.copy-email-btn:hover {
    background: #eee;
}
.copy-email-btn.copied {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    color: var(--color-text-soft);
}
.social-icons a:hover {
    color: var(--color-text);
}
.social-icons svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.site-copyright {
    border-top: 1px solid #eee;
    padding-top: 2rem;
    margin-top: 3rem;
    width: 90%;
    max-width: 1200px;
    margin: 3rem auto 0 auto;
}
.site-copyright p {
    color: #999;
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
}
.site-copyright a {
    color: #777;
    font-weight: 500;
    text-decoration: none;
}
.site-copyright a:hover {
    text-decoration: underline;
}

/* Footer Responsive */
@media (max-width: 900px) {
    .grid-2-col {
        grid-template-columns: 1fr;
    }
    .map-wrapper {
        margin-bottom: 3rem;
    }
    .contact-info {
        text-align: center;
    }
    .social-icons {
        justify-content: center;
    }
    .email-group {
        justify-content: center;
    }
}

/* * 5. SHARED PROJECT DETAIL VIEW (Used on index.html & work.html)
 */
.project-detail {
    display: none;
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 2rem 5vw; 
    min-height: 60vh; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-btn {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-soft);
    background: none;
    border: none;
    padding: 0; 
    margin-top: -1rem; 
    margin-bottom: 2rem; 
    cursor: pointer;
}
.back-btn:hover {
    color: var(--color-text);
}


.project-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--radius-cards);
    overflow: hidden;
    background-color: #f0f0f0;
    box-shadow: var(--shadow-cards);
}

.project-slider {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.slider-slide {
    flex: 0 0 100%;
    aspect-ratio: 16 / 9;
    cursor: zoom-in; /* Indicate clickable lightbox */
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* New <picture> element support */
.slider-slide picture {
    width: 100%;
    height: 100%;
    display: block;
}
.slider-slide picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    color: var(--color-text);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.slider-nav:hover {
    background-color: white;
}
.slider-nav.prev {
    left: 1rem;
}
.slider-nav.next {
    right: 1rem;
}

.project-content {
    max-width: 800px;
    margin: 3rem auto 0 auto;
    text-align: center;
}

.project-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem); 
    margin-bottom: 1rem;
}
.project-description {
    font-size: 1.1rem; 
    color: var(--color-text-soft);
    line-height: 1.7;
    margin-bottom: 1.5rem; 
}

/* Quote styling */
.project-quote-wrapper {
    margin: 2rem auto;
    max-width: 700px;
    position: relative;
    padding: 1.5rem;
    background-color: var(--color-bg-light);
    border-left: 4px solid var(--color-accent);
    border-radius: 4px;
}

.project-quote {
    font-family: var(--font-primary), serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    text-align: center;
}

.project-client {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-soft);
    text-align: center; /* Centered per request */
    font-style: normal;
}
/* Tags (Kept in CSS for fallback, even if hidden in HTML) */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem; 
}

.detail-tag {
    padding: 0.4rem 1rem;
    border-radius: 99px;
    background-color: #f0f0f0;
    font-size: 0.85rem; 
    font-weight: 500;
    text-transform: capitalize;
}

/* * 6. SHARED ERROR MESSAGE STYLE
 */
.error-message {
    text-align: center;
    color: #D8000C; /* Red */
    background-color: #FFD2D2;
    padding: 1rem;
    border: 1px solid #D8000C;
    border-radius: 8px;
    margin: 2rem auto;
}

/* * 7. SHARED ARIA LIVE REGION
 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- 8. SHARE BUTTONS (v2 - ICONS) --- */
.share-button-group {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.share-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-soft);
    margin-bottom: 1.5rem;
}

.share-icon-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
    position: relative; /* Needed for the tooltip */
}

.share-icon-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.share-icon-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: all 0.2s ease; /* Add transition to icon */
}

/* Brand Colors */
.share-icon-btn.whatsapp { background-color: #25D366; }
.share-icon-btn.facebook { background-color: #1877F2; }
.share-icon-btn.linkedin { background-color: #0A66C2; }
.share-icon-btn.x        { background-color: #000000; }
.share-icon-btn.telegram { background-color: #0088cc; }
.share-icon-btn.mail     { background-color: #777777; }
.share-icon-btn.copy-link {
    background-color: var(--color-bg-light);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

/* --- NEW TOOLTIP STYLES --- */
.copy-tooltip {
    position: absolute;
    bottom: 120%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%) translateY(5px); /* Start hidden */
    background-color: var(--color-text);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
}

/* Tooltip Arrow */
.copy-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--color-text) transparent transparent transparent;
}

/* Show tooltip when .copied class is added */
.share-icon-btn.copy-link.copied .copy-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Hide the copy icon and show a checkmark (or simple animation) */
.copy-icon-default,
.copy-icon-copied {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px; /* Ensure specific icon size */
    height: 24px;
    transition: all 0.2s ease;
}

.copy-icon-copied {
    /* Hide the checkmark by default, starting off-screen */
    opacity: 0; 
    transform: translate(-50%, -50%) scale(0);
}

/* Show only the checkmark when .copied is active */
.share-icon-btn.copy-link.copied .copy-icon-default {
    /* 1. Hide the default copy icon instantly */
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}

.share-icon-btn.copy-link.copied .copy-icon-copied {
    /* 2. Show the checkmark instantly */
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    color: var(--color-bg); /* Ensure the checkmark is white on the dark success color */
}

/* --- 9. NEW: LIGHTBOX STYLES --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-close:hover {
    color: #ccc;
}

/* NEW: Lightbox Navigation Styles */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    z-index: 1001;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* --- 10. SCROLL ANIMATIONS (Performance Optimized) --- */
/* The element starts slightly hidden and moved down */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform; /* Hint to browser for optimization */
}

/* When the JS adds this class, it fades in and moves up */
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
html {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}