/* Client Portal Styles */
/* SilverCreek Modular Brand Colors
   Primary Colors:
   - #F1823B (orange)
   - #414644 (dark gray)
   - #E86511 (darker orange)
   - #C8C8C8 (light gray)
   Secondary Colors:
   - #FFFFFF (white)
   - #000000 (black)
*/

/* Custom Font for Mazzard if available */
@font-face {
    font-family: 'Mazzard';
    src: url('../fonts/MazzardH-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mazzard';
    src: url('../fonts/MazzardH-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

.client-portal-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #414644;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scrolling from full-width elements */
}

/* Portal Actions */
.portal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.portal-actions-left {
    display: flex;
    align-items: center;
}

.portal-actions-right {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

/* Container for content inside full-width sections */
.content-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
}

.admin-link, .logout-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #414644;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    margin-left: 10px;
}

.admin-link:hover, .logout-link:hover {
    background-color: #E86511;
    color: #ffffff;
    text-decoration: none;
}

/* Company Dropdown Styles */
.company-dropdown-container {
    margin-left: 10px;
}

.company-dropdown {
    display: inline-block;
    padding: 10px 20px;
    background-color: #414644;
    color: #ffffff;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0 0h12L6 6z" fill="%23ffffff"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.company-dropdown:hover {
    background-color: #E86511;
}

.company-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(241, 130, 59, 0.5);
}

/* Hero Section */
.portal-hero {
    background-color: #414644;
    /*
    IMPORTANT: Replace this URL with your actual building image.
    You can upload an image to your WordPress media library and use that URL.
    */
    background-image: url('https://silvercreekmodular.com/wp-content/uploads/2022/07/updated_cal.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding: 100px 20px 60px;
    text-align: center;
    margin-bottom: 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    box-sizing: border-box;
}

.portal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for better text visibility */
    z-index: 1; /* This is already lower than the menu's z-index of 10 */
}

.portal-hero h1, .portal-hero p {
    position: relative;
    z-index: 2; /* Place text above the overlay */
    margin-left: auto;
    margin-right: auto;
}

.portal-hero .content-container {
    position: relative;
    z-index: 2; /* Place content above the overlay */
    text-align: center;
}

.portal-hero h1 {
    margin: 0;
    font-size: 4em;
    color: #ffffff;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-family: 'Mazzard', 'Inter', sans-serif;
}

.portal-hero p {
    font-size: 1.4em;
    color: #ffffff;
    margin-top: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-family: 'Inter', sans-serif;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 30px;
    background-color: #414644;
    color: #ffffff;
    padding: 40px 20px;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.welcome-section h2 {
    font-size: 2.5em;
    color: #ffffff;
    margin: 0 0 10px 0;
    font-family: 'Mazzard', 'Inter', sans-serif;
}

.welcome-section p {
    font-size: 1.2em;
    color: #ffffff;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.welcome-section .content-container {
    text-align: center;
}

/* Projects Grid */
.projects-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    text-align: center;
    margin-top: 30px;
    padding: 0;
}

.project-icon {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 200px;
    margin: 0 15px;
}

.project-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border-color: #F1823B;
}

.project-icon .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    color: #414644;
}

.project-icon .project-thumbnail {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    overflow: hidden;
    border-radius: 8px;
}

.project-icon .project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.project-icon:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-icon h3 {
    margin: 0;
    font-size: 1.3em;
    color: #414644;
    font-weight: 600;
    font-family: 'Mazzard', 'Inter', sans-serif;
}

/* Modal Styles */
.portal-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.content-container .portal-modal {
    left: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.portal-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
}

.portal-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.portal-modal-close:hover,
.portal-modal-close:focus {
    color: black;
}

.portal-modal-body h2 {
    margin-top: 0;
}

.project-assets {
    margin-top: 20px;
}

.project-assets h3 {
    border-bottom: 2px solid #C8C8C8;
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-family: 'Mazzard', 'Inter', sans-serif;
    color: #414644;
}

.project-images, .project-documents, .project-videos {
    margin-bottom: 30px;
}

/* Asset Grid Styles */
.asset-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    justify-content: center;
}

/* Document List Styles */
.document-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.document-list li {
    margin-bottom: 10px;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.document-list a {
    display: block;
    color: #2c3e50;
    text-decoration: none;
    padding-left: 24px;
    position: relative;
}

.document-list a:before {
    content: '\f498'; /* Document icon */
    font-family: 'dashicons';
    position: absolute;
    left: 0;
    top: 0;
}

.document-list a:hover {
    color: #1a2530;
}

/* Removed duplicate .asset-thumb and .asset-thumb-image definitions */

.asset-thumb-image .dashicons {
    font-size: 48px;
    color: #555;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Specific styling for document icons */
.document-thumb .asset-thumb-image .dashicons {
    margin: 0 auto;
    text-align: center;
    line-height: 1;
    font-size: 60px; /* Larger icon size */
    height: auto; /* Override default dashicons height */
    width: auto; /* Override default dashicons width */
    display: block; /* Ensure proper centering */
}

.asset-thumb-title {
    margin-top: 8px;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-item a {
    color: #2c3e50;
    text-decoration: none;
    display: block;
    padding-left: 24px;
    position: relative;
}

.video-item a:before {
    content: '\f236'; /* Video icon */
    font-family: 'dashicons';
    position: absolute;
    left: 0;
    top: 0;
}

.video-item a:hover {
    color: #1a2530;
}

/* Consolidated .asset-thumb definition */
.asset-thumb {
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    text-align: center;
}

/* Consolidated .asset-thumb-image definition */
.asset-thumb-image {
    width: 100%;
    height: 100px;
    background-size: cover;
    background-position: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
    position: relative; /* For absolute positioning of children if needed */
}

/* Specific styling for document thumbnails */
.document-thumb .asset-thumb-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.asset-thumb:hover .asset-thumb-image {
    transform: scale(1.05);
}

.asset-thumb-image .dashicons {
    font-size: 48px;
    color: #555;
}

.asset-thumb-title {
    margin-top: 8px;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    width: 100%;
}

/* Video thumbnail overlay */
.asset-thumb-image.video-thumb::after {
    content: '\f236'; /* Dashicon for play button */
    font-family: 'dashicons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    padding: 10px;
    line-height: 1;
}

/* Image thumbnail overlay for lightbox */
.image-lightbox .asset-thumb-image::after {
    content: '\f128'; /* Dashicon for view/zoom */
    font-family: 'dashicons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    padding: 10px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-lightbox:hover .asset-thumb-image::after {
    opacity: 1;
}

/* YouTube Video Thumbnail Styles */
.youtube-video .asset-thumb-image {
    background-color: #000;
    overflow: hidden;
}

.youtube-video .asset-thumb-image.video-thumb {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Make sure the dashicons don't show for YouTube thumbnails */
.youtube-video .asset-thumb-image .dashicons {
    display: none;
}

/* Login Form Styles */
.login-container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.portal-login-form {
    max-width: 400px;
    width: 100%;
    margin: -60px auto 40px;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 5;
}

.portal-login-form form {
    margin-bottom: 15px;
}

.portal-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.portal-login-form .input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.portal-login-form .button-primary {
    background-color: #F1823B;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.portal-login-form .button-primary:hover {
    background-color: #E86511;
}

.login-register-link {
    text-align: center;
    margin-top: 15px;
}

.login-register-link a {
    color: #F1823B;
    text-decoration: none;
}

.login-register-link a:hover {
    text-decoration: underline;
}

.login-remember {
    margin-bottom: 15px;
}

.login-remember label {
    display: inline-flex;
    align-items: center;
    font-weight: normal;
}

.login-remember input[type="checkbox"] {
    margin-right: 8px;
}

/* YouTube Video Styles */
.youtube-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin-bottom: 15px;
}

.youtube-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    color: #F1823B;
}

.youtube-container:hover .play-button {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Contact Card Styles */
.project-contacts {
    margin-bottom: 30px;
}

.contacts-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.contact-info {
    display: flex;
    align-items: center;
}

.contact-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    background-color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-profile-icon {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ddd;
}

.default-profile-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #888;
}

.contact-details {
    flex-grow: 1;
}

.contact-details h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Mazzard', 'Inter', sans-serif;
    color: #414644;
}

.contact-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.contact-email, .contact-phone {
    margin: 5px 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.contact-email .dashicons, .contact-phone .dashicons {
    margin-right: 8px;
    color: #666;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.contact-email a, .contact-phone a {
    color: #333;
    text-decoration: none;
}

.contact-email a:hover, .contact-phone a:hover {
    color: #F1823B;
    text-decoration: underline;
}