/* --- CSS Variables for Luxury Theme --- */
:root {
    --primary-color: #1a1a1a; /* Deep Charcoal */
    --accent-color: #c5a059; /* Brushed Gold */
    --text-light: #f9f9f9; /* Off-white */
    --text-dark: #333333;
    --bg-light: #ffffff;
    --bg-alt: #f4f4f4;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Base Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--primary-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
}

/* Gold dot accent on logo */
.logo span, .footer-brand span {
    color: var(--accent-color);
}

/* --- Navigation --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 25px 0;
    transition: var(--transition);
    background: transparent;
}

header.scrolled {
    background: var(--primary-color);
    padding: 15px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.mobile-menu {
    display: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Buttons --- */
.btn-primary, .btn-secondary {
    padding: 12px 28px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: var(--transition);
    border: 1px solid var(--accent-color);
}

.btn-primary {
    background: var(--accent-color);
    color: var(--primary-color) !important;
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-color) !important;
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    margin-top: 30px;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1541881451368-2235c342f1f0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(26, 26, 26, 0.8), rgba(26, 26, 26, 0.4));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-light);
}

.hero .subtitle {
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.hero h1 {
    font-size: 4.5rem;
    color: var(--text-light);
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero .description {
    font-size: 1.1rem;
    max-width: 500px;
    font-weight: 300;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: #555;
}

.about-image img {
    width: 100%;
    height: auto;
    box-shadow: -20px 20px 0px var(--accent-color);
}

/* --- Expertise Section --- */
.expertise {
    background-color: var(--bg-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.service-card {
    background: var(--bg-light);
    padding: 50px 40px;
    border-top: 3px solid var(--accent-color);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand h2 {
    color: var(--text-light);
    font-size: 2rem;
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--accent-color);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-contact h3 {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-contact p {
    color: #999;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    color: #777;
}

/* --- Animations & Utilities --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .mobile-menu { 
        display: block; 
    }
    
    /* Mobile Dropdown Styling */
    .nav-links { 
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 30px 0;
        text-align: center;
        gap: 25px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        
        /* Animation settings */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition);
    }

    /* Active class added via JavaScript */
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .hero h1 { font-size: 3rem; }
    .about-grid, .footer-grid { grid-template-columns: 1fr; }
    .about-image img { box-shadow: -10px 10px 0px var(--accent-color); }
}

/* --- Portfolio / Legacy Section --- */
.portfolio {
    background-color: var(--bg-light);
}

.portfolio .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.portfolio .section-header p {
    color: #666;
    margin-top: 10px;
}

/* Portfolio Filters */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    cursor: pointer;
    padding-bottom: 5px;
    position: relative;
    transition: var(--transition);
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--primary-color);
}

.filter-btn.active::after,
.filter-btn:hover::after {
    width: 100%;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Portfolio Cards */
.portfolio-item {
    position: relative;
    border-radius: 2px; /* Very subtle rounding for an architectural feel */
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/5; /* Tall, elegant aspect ratio */
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 50px 30px 30px;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.95) 0%, rgba(26, 26, 26, 0) 100%);
    color: var(--text-light);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.08); /* Slow, smooth zoom on hover */
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    display: block;
    margin-bottom: 8px;
}

.portfolio-overlay h3 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.portfolio-overlay .location {
    font-size: 0.85rem;
    font-weight: 300;
    color: #ccc;
    font-style: italic;
}

/* JavaScript Hiding Class & Animation */
.portfolio-item.hide {
    display: none;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Modal & Form Styles --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999; /* Sit on top of everything including navbar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.85); /* Deep charcoal overlay */
    backdrop-filter: blur(8px); /* Luxury frosted glass effect */
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-light);
    width: 90%;
    max-width: 600px;
    padding: 60px 50px;
    position: relative;
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--accent-color);
}

.modal-header {
    text-align: center;
    margin-bottom: 40px;
}

.modal-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.modal-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Minimalist Form Design */
.form-group {
    margin-bottom: 30px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color 0.3s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-bottom: 2px solid var(--accent-color);
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
    color: #999;
    font-weight: 300;
}

.submit-btn {
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    border: none;
}

/* --- Core Values Section --- */
.values {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.values .section-title {
    color: var(--text-light);
}

.values .section-header p {
    color: #999;
    margin-bottom: 50px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.value-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 40px 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.value-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.value-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: rgba(197, 160, 89, 0.2); /* Faint gold */
    position: absolute;
    top: 10px;
    right: 20px;
}

.value-item h4 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.value-item p {
    font-size: 0.9rem;
    color: #ccc;
    position: relative;
    z-index: 2;
}

/* --- Certifications Section --- */

/* --- Certifications Image Gallery --- */
.certs {
    background-color: var(--bg-alt);
}

.certs-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.cert-item {
    background: var(--bg-light);
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    text-align: center;
}

.cert-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(197, 160, 89, 0.15); /* Subtle gold glow */
}

.cert-img-wrapper {
    width: 100%;
    height: 350px; /* Forces all certs to be the same height */
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #eaeaea;
    border-radius: 2px;
}

.cert-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Change to 'contain' if you don't want the edges cropped */
    object-position: top;
    transition: transform 0.6s ease;
}

.cert-item:hover .cert-img-wrapper img {
    transform: scale(1.05); /* Slight zoom on hover */
}

.cert-info h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-family: var(--font-body);
    font-weight: 600;
}

.cert-info p {
    color: #777;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}


.cert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(197, 160, 89, 0.15); /* Gold shadow glow */
}

.cert-card h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cert-card p {
    font-size: 0.85rem;
    color: #666;
}

/* --- Portfolio Section --- */
.portfolio {
    background-color: var(--bg-light);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    cursor: pointer;
    padding-bottom: 5px;
    position: relative;
    transition: var(--transition);
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--primary-color);
}

.filter-btn.active::after,
.filter-btn:hover::after {
    width: 100%;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/5;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 50px 30px 30px;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.95) 0%, rgba(26, 26, 26, 0) 100%);
    color: var(--text-light);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.08);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    display: block;
    margin-bottom: 8px;
}

.portfolio-overlay h3 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.portfolio-overlay .location {
    font-size: 0.85rem;
    font-weight: 300;
    color: #ccc;
    font-style: italic;
}

.portfolio-item.hide {
    display: none;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Lightbox Modal Styles --- */
.lightbox {
    flex-direction: column;
    padding: 20px;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh; /* Keeps the image from overflowing the screen height */
    border-radius: 4px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.6);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    object-fit: contain; /* Ensures the whole cert is visible without distortion */
}

/* Smooth zoom effect when modal opens */
.modal.show .lightbox-content {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.close-lightbox:hover {
    color: var(--accent-color);
}

#lightboxCaption {
    margin-top: 20px;
    color: var(--text-light);
    font-size: 1.2rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

/* Ensure the cert cards look clickable */
.cert-item {
    cursor: pointer;
}

/* --- Modal Success State --- */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 4.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    opacity: 0;
}

.modal.show .success-icon.animate {
    animation: popIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.success-message h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.success-message p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}