/* Basic Resets & Body Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* A more modern sans-serif font */
    margin: 0;
    padding: 0;
    background-color: #2c2c2c; /* Dark gray background */
    color: #f0f0f0; /* Off-white text for contrast */
    line-height: 1.6; /* Improved readability */
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

.container {
    width: 90%; /* Slightly wider container */
    max-width: 1200px; /* Max width to prevent content from stretching too wide on large screens */
    margin: auto;
    padding: 20px 0;
    overflow: hidden; /* Clear floats */
}

/* Header & Navigation Bar */
.main-header {
    background: #1a1a1a; /* Even darker gray for header */
    color: #ffffff; /* Pure white text for logo and nav */
    padding: 15px 0;
    border-bottom: 3px solid #6699cc; /* A subtle accent color (blueish gray) */
    position: sticky; /* Make header stick to top */
    top: 0;
    z-index: 1000; /* Ensure header stays above other content */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Subtle shadow for depth */
}

.main-header .container {
    display: flex; /* Use flexbox for layout */
    justify-content: space-between; /* Space out logo and nav */
    align-items: center; /* Vertically align items */
}

.main-header .logo {
    margin: 0;
    font-size: 1.8em; /* Larger logo text */
    font-weight: bold;
}

.main-header .logo a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease; /* Smooth hover effect */
}

.main-header .logo a:hover {
    color: #6699cc; /* Accent color on hover */
}

.main-nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.main-nav li {
    display: inline-block; /* Horizontal navigation */
    margin-left: 25px; /* Space between nav items */
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.95em;
    padding: 5px 0; /* Add padding for larger clickable area */
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent; /* Transparent border for hover effect */
}

.main-nav a:hover,
.main-nav a.active { /* Add 'active' class to current page link if desired */
    color: #6699cc;
    border-bottom: 2px solid #6699cc; /* Underline effect on hover */
}

/* Sections Styling */
section {
    padding: 60px 0; /* More padding for sections */
    text-align: center;
}

.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('images/hero_background.jpg') no-repeat center center/cover; /* Background image with overlay */
    color: #ffffff;
    padding: 100px 0; /* More vertical padding */
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hero-section h2 {
    font-size: 3em; /* Larger hero heading */
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Subtle text shadow */
}

.hero-section p {
    font-size: 1.2em;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.content-section h2 {
    font-size: 2.2em;
    margin-bottom: 40px;
    color: #6699cc; /* Accent color for section headings */
}

.light-gray-bg {
    background-color: #3d3d3d; /* Lighter gray background for sections */
}

.dark-gray-bg {
    background-color: #252525; /* Darker gray background for sections */
    color: #f0f0f0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none; /* Remove default button border */
    cursor: pointer;
    margin-top: 20px; /* Space above buttons */
}

.primary-btn {
    background-color: #6699cc; /* Accent color */
    color: #ffffff;
}

.primary-btn:hover {
    background-color: #5588bb; /* Slightly darker on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

.secondary-btn {
    background-color: #555555; /* Neutral gray */
    color: #ffffff;
    border: 1px solid #777777; /* Subtle border */
}

.secondary-btn:hover {
    background-color: #666666;
    transform: translateY(-2px);
}

.large-btn {
    padding: 15px 30px;
    font-size: 1.1em;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 30px; /* Space between grid items */
    margin-top: 40px;
    margin-bottom: 50px;
}

.product-item {
    background: #4a4a4a; /* Slightly lighter gray for product cards */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); /* More pronounced shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Push button to bottom */
}

.product-item:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 8px 20px rgba(0,0,0,0.5); /* Darker shadow on hover */
}

.product-item img {
    max-width: 100%;
    height: 200px; /* Fixed height for consistent image size */
    object-fit: cover; /* Crop images to fit */
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #666; /* Subtle border around images */
}

.product-item h3 {
    color: #6699cc; /* Accent color for product titles */
    margin-bottom: 10px;
    font-size: 1.4em;
}

.product-item p {
    color: #d0d0d0; /* Lighter gray for product description */
    font-size: 0.95em;
    flex-grow: 1; /* Allow description to take available space */
    margin-bottom: 20px;
}

.product-item .btn {
    width: fit-content; /* Make button only as wide as its content */
    margin-top: 15px; /* Space between description and button */
}

/* Footer Styling */
.main-footer {
    background: #1a1a1a;
    color: #b0b0b0; /* Lighter gray for footer text */
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
    border-top: 3px solid #6699cc; /* Matching accent border */
}

.main-footer p {
    margin: 5px 0;
}

.main-footer .social-links a {
    color: #b0b0b0;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.main-footer .social-links a:hover {
    color: #6699cc;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Contact Page Specific Styles */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid for contact items */
    gap: 30px;
    margin-top: 40px;
    text-align: center; /* Center content within contact items */
}

.contact-item {
    background: #333333; /* Darker gray for contact cards */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push content to top/bottom */
}

.contact-item h3 {
    color: #6699cc; /* Accent color for sub-headings */
    font-size: 1.6em;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(102, 153, 204, 0.3); /* Subtle underline */
    padding-bottom: 10px;
}

.contact-item p {
    color: #d0d0d0;
    margin-bottom: 10px;
    flex-grow: 1; /* Allow paragraphs to take up space */
}

.contact-item .contact-detail {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px; /* Space before buttons/next section */
}

.contact-item .contact-detail a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item .contact-detail a:hover {
    color: #6699cc;
}

.social-links-contact {
    margin-top: 20px;
    display: flex; /* Arrange buttons horizontally */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: center;
    gap: 15px; /* Space between social buttons */
}

/* Ensure buttons within contact items have correct styling */
.contact-item .btn {
    margin-top: 15px; /* Space below content */
    width: auto; /* Allow button to size itself */
    min-width: 150px; /* Minimum width for buttons */
}

/* Media Page Specific Styles (for YouTube Videos) */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid for videos */
    gap: 30px;
    margin-top: 40px;
}

.video-item {
    background: #333333; /* Darker gray for video cards */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-item h3 {
    color: #6699cc; /* Accent color for video titles */
    font-size: 1.4em;
    margin-top: 15px;
    margin-bottom: 10px;
}

.video-item p {
    color: #d0d0d0;
    font-size: 0.95em;
    margin-bottom: 15px;
    flex-grow: 1; /* Allow description to take available space */
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (height / width = 9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000; /* Black background for video loading */
    border-radius: 5px; /* Match item border-radius */
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

.video-item .btn {
    align-self: center; /* Center the button in the video item */
    margin-top: 15px;
    width: fit-content;
    min-width: 120px;
}

/* Wiki Page Specific Styles */
.wiki-section-overview {
    background: #333333;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.wiki-section-overview h3 {
    color: #6699cc;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(102, 153, 204, 0.4);
    padding-bottom: 10px;
    text-align: center; /* Center the "Table of Contents" title */
}

.wiki-toc {
    list-style: none; /* Remove default bullet points */
    padding: 0;
    columns: 2; /* Two columns for table of contents */
    column-gap: 30px;
}

.wiki-toc li {
    margin-bottom: 12px; /* Increased vertical spacing between items */
}

.wiki-toc li a {
    color: #ffffff; /* Brighter white for better contrast */
    text-decoration: none; /* Remove default underline */
    font-weight: normal; /* Keep normal weight, can change to bold if preferred */
    font-size: 1.1em; /* Slightly larger font size */
    display: inline-block; /* Allows padding and margin on links */
    padding: 5px 0; /* Add some vertical padding */
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.wiki-toc li a:hover {
    color: #6699cc; /* Accent color on hover */
    text-decoration: underline; /* Add underline on hover for clear indication */
}

.wiki-product-section {
    background: #2a2a2a; /* Slightly darker background for individual product sections */
    padding: 40px;
    margin-bottom: 50px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(102, 153, 204, 0.2); /* Subtle border */
}

.wiki-product-section h3 {
    color: #e0e0e0;
    font-size: 2.2em;
    margin-bottom: 25px;
    border-bottom: 3px solid #6699cc;
    padding-bottom: 15px;
    text-align: center;
}

.wiki-product-section h4 {
    color: #6699cc;
    font-size: 1.6em;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(102, 153, 204, 0.3);
    padding-bottom: 5px;
}

.wiki-product-section p {
    color: #c0c0c0;
    line-height: 1.6;
    margin-bottom: 15px;
}

.wiki-product-section ul,
.wiki-product-section ol {
    color: #c0c0c0;
    margin-left: 20px;
    margin-bottom: 15px;
}

.wiki-product-section ul li,
.wiki-product-section ol li {
    margin-bottom: 8px;
}

.wiki-product-image {
    max-width: 300px; /* Limit image size */
    height: auto;
    border-radius: 8px;
    display: block; /* Center image */
    margin: 0 auto 30px auto; /* Center and add space below */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.wiki-product-section .btn {
    display: block;
    width: fit-content;
    margin: 30px auto 0 auto; /* Center button */
}

/* Responsive adjustments for Wiki TOC */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        margin-top: 15px;
    }

    .main-nav li {
        margin: 0 10px;
    }

    .hero-section h2 {
        font-size: 2.2em;
    }

    .hero-section p {
        font-size: 1em;
    }

    .content-section h2 {
        font-size: 1.8em;
    }

    .product-grid {
        grid-template-columns: 1fr; /* Stack products on small screens */
    }

    .wiki-toc {
        columns: 1; /* Single column on smaller screens */
    }
}

@media (max-width: 480px) {
    .main-header .logo {
        font-size: 1.5em;
    }
    .main-nav li {
        margin: 0 8px;
    }
    .main-nav a {
        font-size: 0.85em;
    }
    .hero-section {
        padding: 60px 0;
    }
    .hero-section h2 {
        font-size: 1.8em;
    }
}
