/*
Theme Name: Green Eco Solution Theme
Author: Your Name
Description: A custom theme for Green Eco Solution, built with Tailwind CSS.
Version: 1.0
Tested up to: 6.4
Requires PHP: 7.4
Text Domain: ges
*/

/* ----------------------------------------------------------------
   EXTERNAL ASSET IMPORTS
   ---------------------------------------------------------------- */
/* Apply base font and default layout settings */
body {
    font-family: 'Merriweather', serif; 
    padding-top: 0;
    color: #374151; /* Default text color for contrast */
}

/* General Layout & Responsiveness */
.section-padding { padding-top: 4rem; padding-bottom: 4rem; }
.section-block {
    margin-bottom: 3.5rem;
    padding: 2.5rem 1.5rem;
    border-radius: 1rem;
    background-color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-top: 5px solid #0a532c; 
}

/* Interactive Card Hover Effects (Services, Projects, Blog) */
.interactive-card {
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent; 
}
.interactive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(10, 83, 44, 0.2); 
    border-color: #FFC107; 
}

/* --- GLOBAL HEADING CONSISTENCY FIX --- */

/* Ensures the text following the H1 in the header section is standardized (Blog/Projects) */
.blog-header-subheading {
    font-family: 'Merriweather', serif;
    font-size: 1.125rem; /* text-lg */
    color: #4b5563; /* text-gray-700 */
    font-weight: 400 !important; /* CRITICAL FIX: Ensures subheading is NOT bold */
    margin-top: 1rem !important; /* Forces a consistent 1rem (Tailwind mt-4) gap below H1 */
}

/* FIX: Ensure the blog image container maintains its aspect ratio correctly */
.blog-image {
    padding-top: 46.66%; 
    height: 0; 
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    position: relative; 
    border-bottom: 1px solid #e5e7eb;
}

/* ----------------------------------------------------------------
   CRITICAL VISIBILITY & ALIGNMENT FIXES FOR FOOTER
   ---------------------------------------------------------------- */

/* 1. Explicitly set the base text color for the entire footer block (Fixes invisible text issue) */
footer, #footer-block {
    color: #F3F4F6 !important; 
}

/* 2. Force light color for all common widget content tags */
.widget p,
.widget span,
.widget a,
.widget ul li a {
    color: #F3F4F6 !important; 
}

/* 4. ALIGNMENT FIX: Applies responsive padding to the dynamic widget area to match the header/content container */
.footer-widget-area {
    padding-left: 1rem; /* Matches Tailwind px-4 */
    padding-right: 1rem;
    
    /* The rest of the structural styles */
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem; /* Maintains the gap between columns */
    text-align: center;
}

@media (min-width: 640px) { /* sm: */
    .footer-widget-area {
        padding-left: 1.5rem; /* Matches sm:px-6 */
        padding-right: 1.5rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        text-align: left; /* CRITICAL: Forces all widget content to align left on desktop */
    }
}

@media (min-width: 1024px) { /* lg: */
    .footer-widget-area {
        padding-left: 2rem; /* Matches lg:px-8 */
        padding-right: 2rem;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


/* ----------------------------------------------------------------
   HEADER / NAVIGATION STYLES
   ---------------------------------------------------------------- */
.hero-video-container {
	   position: relative;
	   overflow: hidden;
       /* CRITICAL FIX: Use responsive viewport height for guaranteed mobile sizing */
       height: 85vh; 
       max-height: 800px; /* Cap height on large screens */
	   box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
	   width: 100%;
   }
   
   .hero-video {
	   position: absolute;
	   top: 50%;
	   left: 50%;
	   min-width: 100%;
	   min-height: 100%;
       object-fit: cover; /* Fail-safe to ensure the video covers the area */
	   width: auto;
	   height: auto;
	   transform: translate(-50%, -50%);
	   z-index: 1;
	   filter: brightness(0.7);
   }
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* --- Responsive adjustment for small screens (Mobile Text Scaling) --- */
@media (max-width: 768px) {
    /* Base aggressive shrink for tablets/small phones */
    .hero-overlay h1 {
        font-size: 2.25rem !important; /* ~36px */
        line-height: 1.2;
        margin-bottom: 0.5rem !important;
    }
    .hero-overlay h2 {
        font-size: 1.1rem !important; 
        margin-bottom: 1.5rem !important;
    }
    .hero-overlay a.bg-secondary {
        padding: 0.8rem 1.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* NEW: Ultra-aggressive scaling for small phones/high-density vertical screens */
    .hero-overlay h1 {
        font-size: 1.8rem !important; /* Reduced to ~29px */
        line-height: 1.1;
        margin-bottom: 0.3rem !important;
    }
    .hero-overlay h2 {
        font-size: 1rem !important; /* Reduced to ~16px */
        margin-bottom: 1rem !important;
    }
    .hero-overlay a.bg-secondary {
        padding: 0.6rem 1.6rem; /* Slimmer button */
        font-size: 0.85rem;
    }
}
/* --- END HERO TEXT SCALING FIX --- */

/* Styling for the Desktop Menu */
.desktop-menu li a {
    color: white; 
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    display: block; 
    transition: all 0.3s ease;
    font-weight: normal; 
}
.desktop-menu li a:hover {
    color: #FFC107; 
}

/* --- LOGO & BRANDING STYLES (Responsive Fix) --- */
.custom-logo-link {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin: 0;
}

.custom-logo-link img {
    /* Base size for desktop */
    height: 40px; 
    width: auto;
    margin-right: 0;
    max-height: 40px; 
    max-width: 100%; 
}

@media (max-width: 767px) {
    .custom-logo-link img {
        /* Standardize mobile size */
        height: 35px; 
        max-height: 35px;
    }
}

@media (max-width: 480px) {
    .custom-logo-link img {
        /* Further shrinking for very small screens */
        height: 30px; 
        max-height: 30px;
    }
}

.mobile-menu-ul li a {
    display: block;
    padding: 0.5rem 0;
    color: #fff; 
    text-decoration: none;
    transition: background-color 0.3s ease;
} 
.mobile-menu-ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1); 
}

/* --- ABOUT PAGE LOGO DEFINITION STYLING (The Fix) --- */
.about-brand-logo {
    height: 200px; /* Reduced height for manageable size */
    width: 200px; /* Reduced width for manageable size */
    max-width: 100%;
    object-fit: contain; /* Ensures logo fits within the box */
    margin: 0 auto; /* Centers image horizontally */
    display: block; /* Ensures centering works */
}

/* ----------------------------------------------------------------
   WIDGETS & FOOTER STYLES (CONTINUED)
   ---------------------------------------------------------------- */
.footer-widget-area .widget {
    margin-bottom: 2rem; 
}

.widget ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.widget ul li a {
    color: inherit; 
    text-decoration: none;
}

.widget ul li a:hover {
    color: #007BFF; 
}

/* Logo & Description Widget Alignment Fix */
.widget .custom-logo-link {
    display: inline-block; 
    margin: 0; 
}

.widget .footer-description {
    line-height: 1.5;
}

/* 3. Social Icons Styling */
.widget .footer-social-icons a {
    font-size: 1.5rem;
    transition: color 0.3s ease;
    color: inherit;
}

.widget .footer-social-icons a:hover {
    color: #007BFF;
}

.footer-social-icons {
    padding-top: 2rem !important;
}

/* ----------------------------------------------------------------
   PROJECT CARD & BLOG STYLING
   ---------------------------------------------------------------- */

/* Project Card Base */
.project-card-image {
    border-bottom: 1px solid #e5e7eb;
}

/* SDG Icon Styles */
.sdg-icon {
    display: inline-block;
    width: 32px; 
    height: 32px; 
    margin-right: 8px; 
    margin-bottom: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-radius: 0;
    object-fit: contain;
}

.sdg-icon-large {
    display: inline-block;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.project-phase-tag {
    display: inline-block;
    background-color: #E6F7FF; 
    color: #0056b3; 
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.project-impact-box {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-image {
    width: 100%;
    padding-top: 46.66%; 
    height: 0; 
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    position: relative; 
    border-bottom: 1px solid #e5e7eb;
}

/* ----------------------------------------------------------------
   PARTNERS MARQUEE
   ---------------------------------------------------------------- */

.logo-marquee {
    display: flex;
    overflow: hidden;
    background-color: #f7f7f7; 
    padding: 6rem 0; 
}

.logo-track {
    display: flex;
    animation: scroll 30s linear infinite; 
    white-space: nowrap; 
    flex-shrink: 0; 
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); } 
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 4rem; 
}

.partner-logo img {
    height: 50px; 
    width: auto;
    max-width: none; 
    filter: grayscale(100%); 
    opacity: 0.6; 
    transition: filter 0.3s, opacity 0.3s;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    cursor: default;
}

/* ----------------------------------------------------------------
   MANDATORY CUSTOM ALIGNMENT RULE (by User Request)
   ---------------------------------------------------------------- */

@media (min-width: 1024px) { /* lg: */
    .widget_ges_quick_links_widget {
        margin-left: 105px;
    }
}

/* ----------------------------------------------------------------
   CUSTOM 404 PAGE ANIMATIONS (Carbon / Nature Theme)
   ---------------------------------------------------------------- */

#carbon-404 {
    background: radial-gradient(circle at center, #0f5e33 0%, #052e16 100%); /* Deep forest gradient */
}

.carbon-visual-container {
    margin-top: 5rem;
}

/* Text Gradient for the big 404 */
.text-gradient-green {
    background: linear-gradient(to bottom, #86efac, #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Floating Carbon Particles */
.carbon-particles {
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -10px;
    width: 6px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: float-up-carbon 15s infinite linear;
}

/* Randomize particle positions and delays */
.particle:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; opacity: 0.2; }
.particle:nth-child(2) { left: 20%; animation-duration: 18s; animation-delay: 2s; opacity: 0.4; }
.particle:nth-child(3) { left: 30%; animation-duration: 10s; animation-delay: 4s; opacity: 0.1; }
.particle:nth-child(4) { left: 40%; animation-duration: 22s; animation-delay: 1s; opacity: 0.3; }
.particle:nth-child(5) { left: 50%; animation-duration: 14s; animation-delay: 3s; opacity: 0.2; }
.particle:nth-child(6) { left: 60%; animation-duration: 19s; animation-delay: 5s; opacity: 0.4; }
.particle:nth-child(7) { left: 70%; animation-duration: 11s; animation-delay: 2s; opacity: 0.1; }
.particle:nth-child(8) { left: 80%; animation-duration: 16s; animation-delay: 4s; opacity: 0.3; }
.particle:nth-child(9) { left: 90%; animation-duration: 13s; animation-delay: 1s; opacity: 0.2; }
.particle:nth-child(10) { left: 15%; width: 4px; height: 4px; animation-duration: 25s; opacity: 0.1; }

@keyframes float-up-carbon {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}

.animate-pulse-slow {
    animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.1); }
}

/* ----------------------------------------------------------------
   SINGLE POST CONTENT TYPOGRAPHY (Fixes Headings, Lists, Links, and Blockquote)
   ---------------------------------------------------------------- */

.entry-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem; 
    font-weight: 800;
    color: #0a532c; /* Primary Green */
    margin-top: 3rem;
    margin-bottom: 1.25rem;
}

.entry-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem; 
    font-weight: 800;
    color: #0a532c; /* Primary Green */
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem; 
    font-weight: 700;
    color: #0a532c; /* Primary Green */
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.entry-content h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem; 
    font-weight: 700;
    color: #0a532c; /* Primary Green */
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.entry-content h5 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem; 
    font-weight: 600;
    color: #0a532c; /* Primary Green */
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.entry-content h6 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem; 
    font-weight: 600;
    text-transform: uppercase;
    color: #4b5563; /* Dark gray for subtle labels */
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* --- Hyperlinks --- */
.entry-content a {
    color: #007BFF; /* Secondary Blue for all links */
    text-decoration: underline;
    transition: color 0.2s ease;
}

.entry-content a:hover {
    color: #FFC107; /* Accent Yellow on hover */
    text-decoration: none;
}

/* --- Lists (ol and ul) --- */
.entry-content ul, 
.entry-content ol {
    font-family: 'Merriweather', serif; /* Body Font */
    font-size: 1rem;
    line-height: 1.7;
    padding-left: 25px; /* Standard indentation */
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    list-style-position: outside;
    color: #374151;
}

/* Specific styling for the ordered source list */
.entry-content ol {
    list-style-type: decimal;
}


/* Custom Blockquote Style */
.entry-content blockquote {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    line-height: 1.6;
    font-style: italic;
    
    /* Branded Look */
    border-left: 5px solid #FFC107; /* Accent Yellow border */
    padding: 1.5rem;
    background-color: #f8fcf9; /* Very light background for contrast */
    margin: 2rem 0; /* Clear vertical spacing */
}

.entry-content blockquote a {
    color: #007BFF !important; /* Secondary Blue for links inside the quote */
}

/* ----------------------------------------------------------------
   NEW: COMMENTS SECTION STYLING (Modern Card UI)
   ---------------------------------------------------------------- */

#comments-section {
    font-family: 'Merriweather', serif;
    padding: 3rem 0; /* Clear spacing from surrounding content */
}

/* Main Comment Title */
.comments-area h2 {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    color: #0a532c !important; /* Primary Green */
    margin-bottom: 2rem !important;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

/* Comment List Structure */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Individual Comment Card */
.comment-list li {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

/* Nested Comments (Replies) */
.children {
    list-style: none;
    padding-left: 20px;
    margin-top: 1.5rem;
    border-left: 3px solid #f0fdf4; /* Light green sidebar to mark thread */
}

/* Comment Author and Metadata */
.comment-author {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #007BFF; /* Secondary Blue for the name */
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

/* Avatar Styling (Professional & Branded) */
.comment-author img.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    border: 3px solid #FFC107; /* Accent Yellow border */
    background-color: #f8fcf9;
}

.comment-metadata a {
    font-size: 0.8rem;
    color: #9ca3af; /* Light gray */
    text-decoration: none;
    transition: color 0.2s;
}

/* Comment Content Text */
.comment-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
    margin-top: 1rem;
}

/* Reply Link Styling */
.comment-reply-link {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #007BFF; /* Secondary Blue */
    text-decoration: none !important;
    margin-top: 0.5rem;
    display: inline-block;
}
.comment-reply-link:hover {
    color: #0a532c; /* Primary Green on hover */
    text-decoration: underline !important;
}

/* Comment Form Styling */
#respond {
    background-color: #f8fcf9;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem; /* Extra space above form */
}

.comment-form-comment label {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #0a532c;
    display: block;
    margin-bottom: 0.5rem;
}

/* Inputs and Textareas */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px; /* Increased padding */
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #007BFF; 
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2); /* Secondary Blue focus ring */
    outline: none;
}

/* Submit Button: Apply global CTA style */
#submit {
    /* Uses the standard btn-primary-cta styling for visual consistency */
    background-color: #007BFF;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 9999px; /* Pill shape */
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#submit:hover {
    background-color: #0a532c; /* Primary Green on hover */
    transform: translateY(-1px);
}

/* ----------------------------------------------------------------
   SOCIAL SHARING & GENERAL STYLES (CONTINUED)
   ---------------------------------------------------------------- */

/* Social Sharing Buttons */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    color: #0a532c; 
    background-color: #e6f7ff;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    color: #ffffff; 
    transform: translateY(-1px) scale(1.05);
}

/* Platform Specific Hover Colors */
.share-twitter:hover {
    background-color: #1DA1F2;
}

.share-linkedin:hover {
    background-color: #0077B5; 
}

.share-facebook:hover {
    background-color: #1877F2; 
}

/* --- DEFINITIVE NEWSLETTER TITLE OVERRIDE --- */

/* Targets ALL H2 titles inside the footer widget area, 
   regardless of whether they have 'widget-title' or 'widgettitle' */
.footer-widget-area h2 {
    /* Set display block to ensure it behaves like a heading */
    display: block !important; 
    
    /* UNIVERSAL STYLING INJECTION */
    color: #ffc107 !important; /* Forces the theme's Accent Color (Yellow) */
    font-family: 'Poppins', sans-serif !important; 
    font-size: 1.125rem !important; /* Enforces text-lg equivalent */
    font-weight: bold !important; 
    text-transform: uppercase;
    margin-bottom: 1rem;
}
