/* Dwyer Architectural Team Grid - Enhanced Larson Theme Integration */
.dcttg-grid {
    display: grid;
    gap: 24px;
    font-family: "Poppins", "Arial", sans-serif; /* Match Larson theme font */
    font-size: 16px; /* Match theme base size */
}
.dcttg-cols-1 { grid-template-columns: 1fr; }
.dcttg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.dcttg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.dcttg-cols-4 { grid-template-columns: repeat(4, 1fr); }
.dcttg-cols-5 { grid-template-columns: repeat(5, 1fr); }
.dcttg-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 960px){
  .dcttg-cols-4, .dcttg-cols-5, .dcttg-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px){
  .dcttg-cols-3, .dcttg-cols-4, .dcttg-cols-5, .dcttg-cols-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .dcttg-cols-2, .dcttg-cols-3, .dcttg-cols-4, .dcttg-cols-5, .dcttg-cols-6 { grid-template-columns: 1fr; }
}

.dcttg-card { display: flex; flex-direction: column; }
.dcttg-photo {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1.2 / 1; /* Make photos larger (was 1:1) */
    background: #f4f4f4;
}
.dcttg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: opacity, transform; transition: opacity var(--dcttg-transition, 300ms) cubic-bezier(0.4, 0.0, 0.2, 1), transform var(--dcttg-transition, 300ms) cubic-bezier(0.4, 0.0, 0.2, 1); }
.dcttg-img.pro { opacity: 1; transform: scale(1); }
.dcttg-img.fun { opacity: 0; transform: scale(1.02); }
.dcttg-photo:hover .dcttg-img.fun, .dcttg-photo:focus .dcttg-img.fun, .dcttg-card:focus-within .dcttg-img.fun { opacity: 1; transform: scale(1); }
.dcttg-photo:hover .dcttg-img.pro, .dcttg-photo:focus .dcttg-img.pro, .dcttg-card:focus-within .dcttg-img.pro { opacity: 0; transform: scale(1.02); }

.dcttg-meta {
    padding-top: 12px;
    font-family: "Poppins", "Arial", sans-serif;
}
.dcttg-name {
    font-weight: 600;
    color: #ffb74d; /* Fallback color */
    font-size: 1rem;
    line-height: 1.2; /* Tightened line height */
    margin-bottom: 4px;
}

/* Use Larson theme color when available */
.dcttg-grid[style*="--larson-theme-color"] .dcttg-name {
    color: var(--larson-theme-color);
}

/* Override with user's custom color when CSS variable is set */
.dcttg-grid[style*="--dcttg-name-color"] .dcttg-name {
    color: var(--dcttg-name-color);
}
.dcttg-role {
    color: #787878; /* Default to Larson theme's body text color */
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.2; /* Tightened line height */
    opacity: 0.9;
}

.dcttg-email {
    margin-top: 6px;
}

.dcttg-email a {
    color: #2d5b9a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2; /* Tightened line height */
    transition: all 0.2s ease;
}

.dcttg-email a:hover {
    text-decoration: underline;
    color: #1e4275;
}

/* Override with user's custom color when CSS variable is set */
.dcttg-grid[style*="--dcttg-role-color"] .dcttg-role {
    color: var(--dcttg-role-color);
}
.dcttg-linkedin {
    margin-top: 8px;
    display: inline-block;
    color: #ffb74d; /* Fallback color */
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Use Larson theme color for links when available */
.dcttg-grid[style*="--larson-theme-color"] .dcttg-linkedin {
    color: var(--larson-theme-color);
}

/* Override with user's custom colors when CSS variables are set */
.dcttg-grid[style*="--dcttg-link-color"] .dcttg-linkedin {
    color: var(--dcttg-link-color);
}

.dcttg-linkedin:hover {
    color: #e59c2e; /* Default darker shade for hover */
    text-decoration: underline;
    transform: translateY(-1px);
}

.dcttg-grid[style*="--dcttg-link-hover-color"] .dcttg-linkedin:hover {
    color: var(--dcttg-link-hover-color);
}

/* Enhanced styling for Larson architectural theme integration */
.dcttg-card {
    background: #ffffff;
    position: relative;
}

/* Clickable card styling */
.dcttg-card-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dcttg-card-clickable:hover,
.dcttg-card-clickable:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    outline: none;
}

.dcttg-card-clickable:focus {
    box-shadow: 0 4px 16px rgba(45, 91, 154, 0.2);
}

/* Larson theme integration - sharp, architectural aesthetic */
.dcttg-photo {
    border-radius: 0; /* Sharp corners to match Larson's architectural aesthetic */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: #f8f8f8;
    position: relative;
    transition: transform 0.2s ease;
}

/* Only add very subtle hover effect to the photo area for the dual-image effect */
.dcttg-card:hover .dcttg-photo {
    transform: translateY(-1px); /* Very subtle lift only on the photo */
}

/* For clickable cards, don't duplicate the lift effect */
.dcttg-card-clickable:hover .dcttg-photo {
    transform: none;
}

/* Architectural overlay effect matching Larson's design */
.dcttg-photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #ffd563; /* Dwyer yellow accent color */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Use Larson theme color for the accent line when available */
.dcttg-grid[style*="--larson-theme-color"] .dcttg-photo::after {
    background: var(--larson-theme-color);
}

/* Override with user's custom color when CSS variable is set */
.dcttg-grid[style*="--dcttg-name-color"] .dcttg-photo::after {
    background: var(--dcttg-name-color);
}

/* Force cobalt accent for Dwyer brand */
.dcttg-photo::after {
    background: #2d5b9a !important;
}

.dcttg-card:hover .dcttg-photo::after {
    opacity: 1;
}

/* Bio Modal Styles */
.dcttg-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.dcttg-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dcttg-modal-content {
    background-color: #ffffff;
    margin: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dcttg-modal-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 20px;
}

.dcttg-modal-photo {
    width: 112px;
    height: 112px;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid #39c2d7; /* Match theme teal */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.dcttg-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dcttg-modal-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    font-family: neue-haas-grotesk-display, roboto, sans-serif;
}

.dcttg-modal-meta-line {
    margin: 0 0 24px 0;
    color: #666;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
}

.dcttg-modal-meta-line .email-link {
    color: #2d5b9a;
    text-decoration: none;
}

.dcttg-modal-meta-line .email-link:hover {
    text-decoration: underline;
}

.dcttg-modal-body {
    padding: 24px;
}

.dcttg-modal-bio {
    font-size: 1rem;
    line-height: 1.4; /* Reduced line height */
    color: #444;
    margin: 0;
    letter-spacing: .03em; /* Match theme letter spacing */
}

.dcttg-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #2d5b9a; /* Cobalt blue */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dcttg-modal-close:hover {
    color: #1e4275; /* Darker cobalt on hover */
    background-color: rgba(45, 91, 154, 0.1); /* Light cobalt background */
}

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Mobile responsive modal */
@media (max-width: 768px) {
    .dcttg-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 90vh;
    }

    .dcttg-modal-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .dcttg-modal-photo {
        width: 100px;
        height: 100px;
    }

    .dcttg-modal-body {
        padding: 20px;
    }
}
