:root {
    /* Main Brand Colors */
    --primary-color: #0A2342; /* Teal for headings and accents */
    --accent-color: #D4A017;  /* Rich Gold/Mustard for buttons */
    --accent-color-dark: #b8860b; /* Darker Gold for hover */

    /* Grays & Neutrals */
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --body-bg: #f8f9fa;
    --content-bg: #ffffff;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.08);

    /* Font */
    --font-family: 'Inter', sans-serif;
}

/* --- Global Reset & Base Styles --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-family); background-color: var(--body-bg); color: var(--text-dark); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Hero Section --- */
.hero-section {
    background-color: #f8f9fa;
    min-height: auto;
    padding: 60px 20px;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center; /* This will center the logo on mobile after the fix */
    justify-content: center;
    text-align: center;
    position: relative;
    
}
.hero-section nav {
    position: absolute;
    top: 20px;
    left: 20px;
}
.hero-section nav .logo img {
    max-width: 180px;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}
.hero-content .subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-light);
}
.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.cta-button:hover {
    background-color: var(--accent-color-dark);
}

/* --- Projects Section --- */
.projects-section { padding: 80px 0; }
.projects-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 50px; color: var(--primary-color); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.project-card { background-color: var(--content-bg); border-radius: 8px; box-shadow: 0 4px 15px var(--shadow-color); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); }
.project-card-image-wrapper { background-color: #f1f3f5; padding: 20px; height: 220px; display: flex; align-items: center; justify-content: center; }
.project-card img { width: 100%; height: 100%; object-fit: contain; }
.project-card .card-content { padding: 25px; text-align: center; border-top: 1px solid var(--border-color); }
.project-card h3 { font-size: 1.4rem; color: var(--primary-color); }
.no-projects { text-align: center; color: var(--text-light); width: 100%; }

/* --- CONTACT SECTION --- */
.contact-section { padding: 80px 0; background-color: var(--body-bg); }
.contact-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 50px; color: var(--primary-color); }
.contact-details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.contact-item { padding: 30px; }
.contact-icon { margin-bottom: 20px; }
.contact-icon svg { width: 40px; height: 40px; color: var(--accent-color); }
.contact-item h3 { font-size: 1.4rem; margin-bottom: 10px; color: var(--primary-color); }
.contact-item p { color: var(--text-light); line-height: 1.8; }
.contact-item p a { color: var(--text-light); text-decoration: none; transition: color 0.3s ease; }
.contact-item p a:hover { color: var(--accent-color); }
.contact-links .link-separator { margin: 0 10px; }

/* --- Footer --- */
footer { background-color: var(--primary-color); color: rgba(255, 255, 255, 0.6); padding: 25px 0; font-size: 0.9rem; }
.footer-content { text-align: center; }
.footer-separator { display: inline-block; width: 1px; height: 12px; background-color: rgba(255, 255, 255, 0.2); margin: 0 20px; vertical-align: middle; }
.crm-login { color: rgba(255, 255, 255, 0.6); text-decoration: none; transition: color 0.3s ease; }
.crm-login:hover { color: white; }

/* --- MODAL STYLES --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.visible { opacity: 1; pointer-events: auto; }
.modal-content { background: white; padding: 40px; border-radius: 8px; max-width: 90vw; max-height: 90vh; position: relative; transform: scale(0.9); transition: transform 0.3s ease; }
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-close { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 2.5rem; color: #aaa; cursor: pointer; line-height: 1; }
.slideshow-container { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; max-width: 80vw; max-height: 75vh; }
.slideshow-container img { max-height: 75vh; scroll-snap-align: center; margin-right: 10px; }
.no-images-message { color: var(--text-light); padding: 50px; }
.loading-spinner { border: 4px solid #f3f3f3; border-top: 4px solid var(--accent-color); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* =================================================================== */
/*                      RESPONSIVE DESIGN SECTION                      */
/* =================================================================== */

@media (max-width: 768px) {
    
    /* --- HERO SECTION --- */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    /* FIX FOR MOBILE LOGO OVERLAP */
    .hero-section nav {
        position: static;      /* Takes the logo out of the top-left corner */
        margin-bottom: 30px;   /* Adds space between the logo and the headline */
        padding: 0;
        left: auto;            /* Reset positioning */
        top: auto;             /* Reset positioning */
    }

    /* --- CONTACT SECTION --- */
    .contact-details-grid {
        grid-template-columns: 1fr; /* Stacks the 3 columns into 1 vertical column */
        gap: 40px;
    }
}

/* Styling for the Project Card Image Area */
.project-card-image-wrapper {
    height: 180px; /* Give the image area a fixed height */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa; /* A light background color */
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.project-card-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* This ensures the logo is never stretched or cropped */
}

/* Styling for the Calligraphy Fallback */
.project-card-calligraphy {
    font-family: 'Dancing Script', cursive; /* Use the new font */
    font-size: 2.2rem; /* A large, elegant font size */
    color: #333;
    text-align: center;
    line-height: 1.2;
}