/*
    Trade Bridges Theme - Main Styles
    -----------------------------------
    This file contains general styling for the theme.
*/

/* --- Global Variables (if not defined in style.css or overriding) --- */
/*
    Defining CSS variables for consistent color usage across the theme.
    These variables can be easily updated to change the theme's color palette.
*/
:root {
    --tradebridges-primary-blue: #007bff; /* Bright blue for accents and primary actions */
    --tradebridges-dark-blue: #0056B3;  /* Darker blue for hover states and stronger elements */
    --tradebridges-text-dark: #343A40; /* Standard dark text color for readability */
    --tradebridges-text-light: #F8F9FA; /* Light text, typically used on dark backgrounds */
    --tradebridges-background-light: #F8F9FA; /* Default light page background color */
    --tradebridges-background-mid: #E9ECEF; /* Slightly darker background for contrasting sections */
    --tradebridges-heading-color: #212529; /* Dark color for headings */
}

/* --- Base Body Styles --- */
/*
    Sets fundamental typography, margins, and background for the entire document body.
    Using 'Arial' as a fallback, ensure Google Fonts (Roboto) are enqueued in functions.php.
*/
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif; /* Fallback font */
    line-height: 1.6; /* Standard line spacing for readability */
    color: var(--tradebridges-text-dark); /* Applies the global dark text color */
    background-color: var(--tradebridges-background-light); /* Applies the global light background color */
}

/* --- Headings (H1-H6) --- */
/*
    Defines consistent styling for all heading levels.
    'Roboto' is suggested for a modern, professional look (ensure it's enqueued).
*/
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif; /* Placeholder, ensure this font is enqueued or loaded */
    color: var(--tradebridges-heading-color); /* Applies the global heading color */
    margin-top: 1.5em; /* Top margin for spacing above headings */
    margin-bottom: 0.5em; /* Bottom margin for spacing below headings */
}

/* --- Links --- */
/*
    Sets default styling for all hyperlinks, including a smooth transition on hover.
*/
a {
    color: var(--tradebridges-primary-blue); /* Primary blue for links */
    text-decoration: none; /* Removes default underline */
    transition: color 0.3s ease; /* Smooth color change on hover */
}

a:hover {
    text-decoration: underline; /* Adds underline on hover */
    color: var(--tradebridges-dark-blue); /* Darker blue on hover */
}

/* --- Header Section --- */
/*
    Styling for the main site header, including background, text color, and padding.
*/
.site-header {
    background-color: #212529; /* Dark header background */
    color: var(--tradebridges-text-light); /* Light text on dark background */
    padding: 20px 0; /* Vertical padding */
    text-align: center; /* Centers content within the header */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow for depth */
    position: sticky; /* Makes the header stick to the top on scroll */
    top: 0;
    width: 100%;
    z-index: 1000; /* Ensures header is above other content */
}

/* --- Site Branding (Logo/Title) --- */
/*
    Styles for the site title or logo area within the header.
*/
.site-branding {
    float: left; /* Floats to the left (adjust for RTL in responsive.css) */
    font-size: 1.8em;
    font-weight: bold;
    line-height: 1; /* Aligns text vertically */
}

.site-branding a {
    color: #fff; /* White color for site title link */
    text-decoration: none;
}

.site-branding .site-description {
    color: #ccc; /* Lighter color for tagline */
    font-size: 0.8em;
    display: block; /* Ensures tagline is on its own line */
}

/* --- Main Navigation --- */
/*
    Styling for the primary navigation menu in the header.
*/
.main-navigation {
    float: right; /* Floats to the right (adjust for RTL in responsive.css) */
}

.main-navigation ul {
    list-style: none; /* Removes bullet points from list */
    margin: 0;
    padding: 0;
    display: flex; /* Arranges menu items horizontally */
    justify-content: center; /* Centers items horizontally */
    align-items: center; /* Centers items vertically */
}

.main-navigation li {
    margin-left: 25px; /* Spacing between navigation items */
}

.main-navigation li a {
    color: #fff; /* White text for navigation links */
    padding: 10px 15px; /* Padding for click area */
    display: block; /* Makes the whole area clickable */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transitions */
    font-weight: bold;
}

.main-navigation li a:hover,
.main-navigation li.current-menu-item a { /* Styles for hover and active menu item */
    background-color: var(--tradebridges-dark-blue); /* Darker blue on hover/active */
    color: var(--tradebridges-text-light); /* White text (or slightly different shade) */
    text-decoration: none;
    border-radius: 5px; /* Rounded corners for hover/active state */
}

/* Mobile Menu Toggle Button (hidden by default on desktop) */
.menu-toggle {
    display: none; /* Will be shown via responsive.css for mobile */
}

/* --- Buttons --- */
/*
    Consistent styling for all primary buttons across the website.
*/
.btn-primary, .button, .wp-block-button__link {
    background-color: var(--tradebridges-primary-blue); /* Primary blue button color */
    color: #fff !important; /* White text, overriding any default link styles */
    padding: 12px 25px; /* Padding inside the button */
    border-radius: 5px; /* Rounded corners */
    text-decoration: none; /* Removes underline */
    transition: background-color 0.3s ease; /* Smooth color change on hover */
    display: inline-block; /* Allows width/height adjustments */
    border: none; /* No default border */
    cursor: pointer; /* Pointer cursor on hover */
    font-weight: bold;
}

.btn-primary:hover, .button:hover, .wp-block-button__link:hover {
    background-color: var(--tradebridges-dark-blue); /* Darker blue on hover */
    color: #fff !important; /* Maintain white text on hover */
}

/* --- Section Padding --- */
/*
    Ensures consistent top and bottom padding for all major sections.
*/
.section-padding {
    padding: 80px 0; /* Top and bottom padding for sections */
}

/* --- Container for content width --- */
/*
    Limits content width and centers it on the page.
*/
.container {
    max-width: 1200px; /* Maximum width of content */
    margin: 0 auto; /* Centers the container */
    padding: 0 15px; /* Horizontal padding for smaller screens */
}

/* --- Hero Section --- */
/*
    Styles for the prominent hero banner on the homepage.
*/
.hero-section {
    background: url('../images/hero-bg.jpg') no-repeat center center/cover; /* Background image, ensure path is correct */
    color: #fff; /* White text over the image */
    text-align: center; /* Centers content horizontally */
    padding: 150px 0; /* Large padding for visual prominence */
    position: relative;
    z-index: 1; /* Ensures content is above the overlay */
}

.hero-section::before { /* Overlay for better text readability */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    z-index: -1; /* Puts overlay behind content */
}

.hero-content h1 {
    font-size: 3.5em; /* Large font size for headline */
    margin-bottom: 20px;
    color: #fff;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9); /* Slightly transparent white for sub-headline */
}

/* --- Feature Section (Strategic Advantage) --- */
/*
    Styling for feature boxes, often used for highlighting key advantages.
*/
.feature-section .feature-item {
    background-color: #fff; /* White background for feature cards */
    padding: 30px;
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); /* Stronger shadow for emphasis */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth animation */
    height: 100%; /* Ensures all cards in a row have equal height */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes content vertically */
}

.feature-section .feature-item:hover {
    transform: translateY(-8px); /* Lifts card on hover */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); /* Stronger shadow on hover */
}

.feature-section .feature-item i { /* Styling for Font Awesome icons within features */
    font-size: 3.5em; /* Larger icon size */
    color: var(--tradebridges-primary-blue);
    margin-bottom: 20px;
}

.feature-section .feature-item h3 {
    color: var(--tradebridges-heading-color);
    margin-bottom: 15px;
    font-size: 1.5em;
}

.feature-section .feature-item p {
    font-size: 0.95em;
    line-height: 1.7;
    margin-bottom: 0; /* No bottom margin for paragraph in item */
}

/* --- Minerals Showcase / Product Cards --- */
/*
    Styling for individual mineral product cards.
*/
.minerals-showcase {
    background-color: var(--tradebridges-background-light); /* Light background for section */
    text-align: center;
}

.mineral-card {
    background-color: #fff;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: left;
    height: 100%; /* Ensures uniform height in rows */
    display: flex;
    flex-direction: column;
}

.mineral-card:hover {
    transform: translateY(-5px);
}

.mineral-card img {
    max-width: 100%;
    height: 200px; /* Fixed height for consistent image display */
    object-fit: cover; /* Ensures images cover the area without distortion */
    border-radius: 5px;
    margin-bottom: 15px;
}

.mineral-card h3 {
    color: var(--tradebridges-primary-blue);
    font-size: 1.4em;
    margin-bottom: 10px;
}

.mineral-card p {
    font-size: 0.9em;
    line-height: 1.6;
    flex-grow: 1; /* Allows paragraph to take available space */
}

.mineral-card .btn-primary {
    margin-top: 15px;
    align-self: flex-start; /* Aligns button to the left within card */
}

/* --- About Section / Our Commitment --- */
/*
    Styling for sections with image and text layout.
*/
.about-section {
    background-color: var(--tradebridges-background-mid); /* Contrasting background */
}

.about-section .about-content {
    text-align: left;
}

.about-section .about-image {
    text-align: center;
}

.about-section .about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.about-section h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
}

.about-section p {
    font-size: 1.1em;
    margin-bottom: 25px;
}

/* --- Partnership / Collaboration Section --- */
/*
    Styling for sections inviting partnerships/collaborations.
*/
.partnership-section {
    background-color: var(--tradebridges-background-light); /* Light background */
    text-align: center;
}

.partnership-section h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
}

.partnership-section .lead {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* Partner logos (if used) */
.partnership-section img {
    filter: grayscale(100%); /* Grayscale for partner logos */
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.partnership-section img:hover {
    filter: grayscale(0%); /* Color on hover */
    opacity: 1;
}

/* --- Contact Section --- */
/*
    Styling for the contact form and contact information area.
*/
.contact-section {
    background-color: var(--tradebridges-background-mid); /* Contrasting background */
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--tradebridges-text-dark);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-sizing: border-box; /* Ensures padding is included in width */
    font-size: 1em;
}

.contact-form textarea {
    resize: vertical; /* Allows only vertical resizing */
    min-height: 120px;
}

/* Contact Info in page.php */
.contact-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.contact-info p {
    margin-bottom: 10px;
}

.contact-info strong {
    color: var(--tradebridges-text-dark);
}

/* --- Footer --- */
/*
    Styling for the site footer, including copyright and menu.
*/
.site-footer {
    background-color: #212529; /* Dark footer background */
    color: var(--tradebridges-text-light);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9em;
}

.site-footer .site-info {
    margin-bottom: 20px;
}

.site-footer a {
    color: var(--tradebridges-primary-blue);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer #footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.site-footer #footer-menu li {
    margin: 0 15px;
}

.site-footer #footer-menu li a {
    color: #ccc; /* Lighter color for footer menu links */
    transition: color 0.3s ease;
}

.site-footer #footer-menu li a:hover {
    color: var(--tradebridges-primary-blue);
}

/* --- General Content Styling for Posts/Pages --- */
.site-content {
    padding-top: 30px; /* Space below header */
    padding-bottom: 30px; /* Space above footer */
}

article.post, article.page {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.entry-header {
    text-align: center;
    margin-bottom: 30px;
}

.entry-title {
    font-size: 2.5em;
    color: var(--tradebridges-heading-color);
}

.entry-meta {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 10px;
}

.entry-content {
    line-height: 1.7;
    font-size: 1.05em;
}

.entry-content p {
    margin-bottom: 1em;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 5px;
}

/* For specific page sections in page.php */
.about-details img,
.minerals-details img,
.services-details img,
.partnerships-details img {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.service-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card img {
    max-width: 100%;
    height: 180px; /* Fixed height for service images */
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.service-card h4 {
    color: var(--tradebridges-primary-blue);
    font-size: 1.3em;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.9em;
    line-height: 1.6;
    flex-grow: 1;
}

.service-card .btn-primary {
    margin-top: 15px;
    align-self: flex-start;
}


/* Adjustments for text alignment in RTL */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .site-branding {
    float: right;
}

body.rtl .main-navigation {
    float: left;
}

body.rtl .main-navigation li {
    margin-left: 0;
    margin-right: 25px; /* Adjust spacing for RTL nav */
}

body.rtl .mineral-card,
body.rtl .feature-item,
body.rtl .service-card {
    text-align: right; /* Align text right for RTL cards */
}

body.rtl .mineral-card .btn-primary,
body.rtl .service-card .btn-primary {
    align-self: flex-end; /* Align button to the right for RTL cards */
}

body.rtl .contact-form label {
    text-align: right;
}
