/* Gallery CPT */
/* --- Custom Photo Gallery Additions --- */

/* 1. Ensure the grid images look uniform */
.features article .image.gallery-link {
    margin-bottom: 2em;
    display: block;
    position: relative;
    overflow: hidden;
    background-color: #2e3450; /* Matches theme dark blue */
}

.features article .image.gallery-link img {
    width: 100%;
    height: 350px;
    object-fit: cover; /* This prevents photos from stretching */
    display: block;
    transition: transform 0.3s ease;
}

/* 2. The Original Hover Overlay Effect */
.features article .image.gallery-link:before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 0 solid rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1;
}

.features article .image.gallery-link:after {
    content: 'View Image';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    border: 2px solid #fff;
    padding: 10px 20px;
}

/* 3. Hover States */
.features article .image.gallery-link:hover img {
    transform: scale(1.05); /* Slight zoom on hover */
}

.features article .image.gallery-link:hover:before {
    border-width: 15px; /* The border look from your original request */
    background: rgba(46, 52, 80, 0.6); /* Tint background */
}

.features article .image.gallery-link:hover:after {
    opacity: 1;
}

/* 4. Magnific Popup Styling (To match theme colors) */
.mfp-bg {
    background: #1e2235 !important; /* Theme background color */
}

.mfp-title {
    font-family: "Montserrat", sans-serif;
    line-height: 1.6;
}

.mfp-title small {
    display: block;
    color: #a0a0a0;
    margin-top: 5px;
}

/* --- Post Meta & Featured Image --- */
.post-meta {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2em;
}

.post-meta .sep {
    margin: 0 10px;
}

.post-featured-image {
    text-align: center;
    margin: 2em 0;
}

.post-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.post-featured-image figcaption {
    font-style: italic;
    font-size: 0.9em;
    margin-top: 10px;
    color: #ccc;
}

/* --- Post Content --- */
.content {
    line-height: 1.8;
}

/* --- Social Share Styling --- */
.social-share {
    margin-top: 4em;
    padding-top: 2em;
    border-top: solid 2px rgba(255, 255, 255, 0.125);
}

.social-share ul.icons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center; /* Vertical alignment */
}

.social-share ul.icons li {
    display: inline-block;
    padding: 0;
    margin-right: 1em; /* Spacing between icons */
}

.social-share ul.icons li:last-child {
    margin-right: 0;
}

/* Ensure the links don't have bottom borders */
.social-share ul.icons li a {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: none !important;
    text-decoration: none;
    width: 2em;
    height: 2em;
}

/* Fix for X (Twitter) Icon - forcing the specific Unicode */
.fa-x-twitter:before {
    content: "" !important;
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    background-color: currentColor;
    /* The SVG Path for the X Logo */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'/%3E%3C/svg%3E") no-repeat center;
}

/* --- Hover Colors --- */

/* X (Twitter) - Light Gray/White */
.fa-x-twitter:hover {
    color: #ffffff !important;
    opacity: 0.7;
}

/* WhatsApp - Official Green */
.fa-whatsapp:hover {
    color: #25D366 !important;
}

/* Facebook - Official Blue */
.fa-facebook-f:hover {
    color: #1877F2 !important;
}

/* LinkedIn - Official Blue */
.fa-linkedin-in:hover {
    color: #0077B5 !important;
}

/* --- Comments Section --- */
#comments-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2em;
    margin-top: 2em;
    padding-bottom: 2em;
}

.comment-list {
    list-style: none;
    padding-left: 0;
}

#comments {
    margin-top: 2em;
}

/* About Page layout */
.about-container {
    display: flex;
    align-items: center; /* Centers items vertically */
    gap: 3em;           /* Space between text and image */
    margin-bottom: 3em;
}

.about-text {
    flex: 1; /* Takes up proportional space */
}

.about-image {
    flex: 0 0 40%; /* Image takes up exactly 40% width */
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Responsive: Stack them on mobile */
@media screen and (max-width: 736px) {
    .about-container {
        flex-direction: column;
        gap: 2em;
    }
    .about-image {
        width: 100%;
    }
}

/* --- High Priority Animation Fix --- */

/* 1. Define the Hidden State */
body.is-preload #banner .logo,
body.is-preload #banner h2,
body.is-preload #banner p {
    opacity: 0 !important;
    transition: none !important; /* No transition while hidden */
}

body.is-preload #banner .logo { transform: translateY(0.5em) !important; }
body.is-preload #banner h2   { transform: translateX(0.25em) !important; filter: blur(2px) !important; }
body.is-preload #banner p    { transform: translateX(0.5em) !important; filter: blur(2px) !important; }

/* 2. Define the Transition when class is REMOVED */
#banner .logo, #banner h2, #banner p {
    will-change: transform, opacity;
}

/* Contact Form Submission */
#form-response p {
    padding: 1em;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 1.5em;
    border: 1px solid currentColor;
}

.success-msg {
    background: rgba(39, 174, 96, 0.1);
}

.error-msg {
    background: rgba(231, 76, 60, 0.1);
}

/* Ensure banner fills the screen and eliminates the black gap */
#banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* Forces the section to be at least the height of the screen */
    min-height: 100vh; 
    
    /* Reset padding to allow min-height to take control */
    padding: 4em 0 !important; 
    
    /* Ensure the background image covers the entire area */
    background-size: cover !important;
    background-attachment: fixed; /* Optional: adds a parallax feel */
    margin-bottom: 0 !important;
}

/* Fix for the first section overlap */
#one {
    margin-top: 0 !important;
}

/* Adjust for wider screens to prevent the 'inner' container from being too narrow */
#banner .inner {
    width: 100% !important;
    max-width: 65em;
    padding: 0 3em;
}

/* Banner Slider */
#banner {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background-color: #2e3141; /* Fallback */
}

.banner-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
	z-index: 1;
}

.banner-slide.active {
    opacity: 1;
	z-index: 1;
}

#banner .inner {
    position: relative;
    z-index: 1; /* Ensures text stays above the sliding images */
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 49, 65, 0.8); 
    z-index: 3; /* Always stays above the images */
    pointer-events: none;
}

#banner .inner {
    position: relative;
    z-index: 4; /* Always stays above the overlay */
}

/* Section BG*/


/* 404 Specific Styles */
.error-404-page {
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-404-page .logo .icon {
    color: #ed4933; /* A soft red to indicate error without being ugly */
    border-color: #ed4933;
}

.error-404-page h2.major {
    border-bottom-color: #ed4933;
    margin-bottom: 1em;
}

.error-404-page .search-box {
    margin-top: 3em;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Modernize the WordPress Search Form on 404 */
.error-404-page .search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 4px;
}

.error-404-page .search-field {
    background: transparent;
    border: none;
    color: #fff;
    flex-grow: 1;
}

.error-404-page .search-submit {
    background: #fff;
    color: #2e3141 !important;
    height: 3em;
    line-height: 3em;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.error-404-page h2:hover {
    animation: glitch 0.3s linear infinite;
    color: #fff;
}

/* Search Form Container */
.search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* The Input Field Container */
.search-form .field {
    width: 100%;
    margin-bottom: 1em;
}

/* The Text Input */
.search-form input[type="search"] {
    background: rgba(255, 255, 255, 0.05);
    border: solid 2px rgba(255, 255, 255, 0.125);
    color: #fff;
    border-radius: 4px;
    padding: 0.75em 1em;
    width: 100%;
    transition: border-color 0.2s ease;
}

.search-form input[type="search"]:focus {
    border-color: #2e3141; /* Or your theme's accent color */
    outline: none;
}

/* Center the Search Button */
.search-form .actions {
    justify-content: center;
    margin-bottom: 0;
}

/* Hide the label but keep it for screen readers (Accessibility) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

