/* Import Google Fonts - Dancing Script */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Global box-sizing + responsive images */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Smooth Scrolling for Internal Links */
html {
    scroll-behavior: smooth;
}

/* Basic Styles for the Body */
body {
    font-family: 'Poppins', serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f0f0f0;
    background-image: url('/Site_Material/Pictures/logo1.png'); /* Keep the logo as the background */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 0;
}

/* Header Styles */
header {
    background-color: rgba(51, 51, 51, 0.5); /* Make the header more transparent */
    color: #FFFDD0;
    width: 100%;
    padding: 10px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.logo {
    height: 50px;
    width: auto;
    margin-right: 10px;
}

/* Navigation Styles */
nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex; /* Makes the <ul> a flex container */
    justify-content: center; /* Centers the nav items */
    align-items: center;
}

nav ul li {
    display: inline;
    margin-right: 15px;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ffcc00; /* Change this to your desired hover color */
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(120, 118, 118, 0.7);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #555;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Main Content Styles */
main {
    width: 100%;
    max-width: 1200px;     /* limits width on big screens */
    margin: 0 auto;        /* centers on desktop */
    padding: 0 20px;       /* space from screen edge */
    text-align: center;
    flex: 1;
    z-index: 1;
}

/* Section Styles. The .section is for the green block sections*/ 
.section {
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    background-color: rgba(51, 51, 51, 0.5);
    color: #fff;
    text-align: left;       /* better for long text */
    box-sizing: border-box; /* keeps padding inside width */
}

.section h2, .section h3, .section h4 {
    color: #fff;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-content {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    width: 100%;
}

.left-side, .right-side {
    flex: 1;
    padding: 10px;
}

.left-side {
    background-color: rgba(189, 184, 167, 0.645);
    border-radius: 8px;
    margin-right: 10px;
    max-width: 300px; /* controls image box size */
}

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

.right-side {
    background-color: rgba(17, 48, 31, 0.692);
    border-radius: 8px;
    margin-left: 10px;
}

.right-side ul {
    list-style-type: disc;
    padding-left: 20px;
}

/* Responsive, consistent video box */
.video-container {
    margin-top: 20px;
    margin-bottom: 10px;
    max-width: 100%;
}

.video-container iframe {
    width: 100%;          /* always fill container width */
    aspect-ratio: 16 / 9; /* keep same proportion for all videos */
    height: auto;
    border: 0;
    display: block;
}

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

.section ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.download-btn {
    padding: 10px 20px;
    background-color: #333; /* Same color as the dropdown menu */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.download-btn:hover {
    background-color: #555; /* Same hover effect as the dropdown menu */
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 60%; /* desktop width */
    padding: 5px; /* reduced padding */
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9em;
}

/* Footer Styles */
footer {
    background-color: rgba(51, 51, 51, 0.8);
    color: white;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Background scrolling fix on mobile */
    body {
        background-attachment: scroll;
    }

    /* Main content full width with a bit of padding */
    main {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }

    /* Header and nav */
    header {
        text-align: center;
    }

    .logo-container {
        flex-direction: column;
        gap: 5px;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }

    nav ul li {
        margin-right: 0;
    }

    /* Hero section stacks vertically */
    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-image {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .hero-text {
        text-align: center;
    }

    /* Content columns stack */
    .section-content {
        flex-direction: column;
    }

    .left-side {
        margin-right: 0;
        margin-bottom: 20px;
        max-width: 100%;
    }

    .right-side {
        margin-left: 0;
    }

    /* Forms: full width on mobile */
    .form-group input,
    .form-group textarea {
        width: 100%;
    }

    /* Cards/thumbnails: take full width on small screens */
    .post-card,
    .thumbnail-card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Grids: single column on small devices */
    .grid-container {
        grid-template-columns: 1fr;
        padding: 10px;
    }
}

/* Grid Layout for Applications and Interpretation Section */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.grid-item {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.grid-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.grid-item p {
    margin: 0;
    padding: 10px;
    background-color: #e0e0e0;
    color: #333;
    font-size: 1.2em;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px; /* space between image & text */
    background-color: rgba(66, 66, 66, 0.5);
    padding: 20px;
    box-sizing: border-box;
    flex-wrap: wrap; /* nicer on smaller screens */
}

/* Image container (left side) */
.hero-image {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: auto;          /* use natural width */
    max-width: 280px;     /* control maximum size on big screens */
    height: auto;         /* keep proportions */
    border-radius: 5px;
    object-fit: contain;  /* just in case */
}

/* Text container (right side) */
.hero-text {
    flex: 1;               
    color: #fff;
    text-align: left;
}

/* Apply Dancing Script Font to the Name */
.hero-text h2:nth-child(-n+5) {
    font-family: 'Dancing Script', cursive !important; /* Elegant Handwritten Font */
    font-size: 2.7em;
    font-weight: 700;
    letter-spacing: 1px;
}

/* News Posts Section */
.new-posts {
    text-align: center;
    padding: 20px;
    background-color: rgba(51, 51, 51, 0.5); /* Keep theme consistent */
    border-radius: 8px;
    margin: 20px 0;
    color: white;
}

/* Thumbnails and posts containers */
.posts-container,
.thumbnails-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Post Cards (News + Educational) */
.post-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: black;
    transition: transform 0.3s, box-shadow 0.3s;

    /* responsive sizing */
    flex: 1 1 220px;
    max-width: 280px;
    width: 100%;

    /* 🔽 this stops equal-height stretching */
    align-self: flex-start;
}

.post-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-bottom: 1px solid #ccc;
}

.post-card p {
    margin: 0;
    padding: 10px;
    font-weight: bold;
}

/* Thumbnail Cards (books) */
.thumbnail-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: black;
    transition: transform 0.3s, box-shadow 0.3s;

    /* responsive sizing */
    flex: 1 1 180px;
    max-width: 240px;
    width: 100%;

    /* 🔽 same here */
    align-self: flex-start;
}

.thumbnail-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-bottom: 1px solid #ccc;
}

.thumbnail-card p {
    margin: 0;
    padding: 10px;
    font-weight: bold;
}

.thumbnail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* NEW EDUCATIONAL POSTS */
.educational-posts {
    text-align: center;
    padding: 20px;
    background-color: rgba(51, 51, 51, 0.5); /* Matches theme */
    border-radius: 8px;
    margin: 20px 0;
    color: white;
}

.left-side ul li {
    color: white;
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 10px;
}

.left-side ul li a {
    color: black; /* Makes links stand out */
    text-decoration: underline; /* Ensures links are visible */
}

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

.custom-list li {
    position: relative;
    padding-left: 25px; /* Adjust spacing */
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Arrow Placement */
.custom-list li::before {
    content: "➤";
    position: absolute;
    left: 0;
    top: 2px;
    color: white;
    font-size: 1.2em;
}

/* Style for Main Text */
.main-text {
    font-weight: bold;
    display: block; /* Ensures the main text stays on top */
}

/* Style for Sub Text (Brackets) */
.sub-text {
    display: block; /* Moves brackets below */
    font-size: 0.9em; /* Makes it slightly smaller */
    margin-top: 5px; /* Space between main text and brackets */
}

.sub-text a {
    color: rgb(203, 21, 21); /* Link color */
    text-decoration: underline; /* Ensures visibility */
}

a {
    margin: 0;
    padding: 0;
    display: inline;
}

/* --------Aquaponics section-------------------------------------------------------------*/

.aquaponics-section h2 {
    color: #333; /* Dark grey for better readability */
    font-size: 1.8em; /* Optional: Adjust font size if needed */
    margin-bottom: 15px; /* Optional: Space under the heading */
}

.aquaponics-section {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.aquaponics-section .aquaponics-item {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
}

.aquaponics-section .aquaponics-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.aquaponics-section .aquaponics-item p {
    margin: 0;
    padding: 15px;
    font-size: 1em;
    line-height: 1.6;
    color: #333;
}

.aquaponics-section .aquaponics-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;   /* adjust if your images are taller/wider */
    object-fit: cover;
    border-bottom: 1px solid #ccc;
    border-radius: 8px 8px 0 0;
}

/* Scoped image-text layout for aquaponics */
.aquaponics-section .aquaponics-image-text {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-align: left;
    padding: 15px;
}

.aquaponics-section .aquaponics-image-text img {
    width: 40%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    object-fit: cover;
}

.aquaponics-section .aquaponics-image-text div {
    width: 60%;
}

@media (max-width: 768px) {
    .aquaponics-section .aquaponics-image-text {
        flex-direction: column;
    }

    .aquaponics-section .aquaponics-image-text img,
    .aquaponics-section .aquaponics-image-text div {
        width: 100%;
    }
}

/*----------------------------------------------Kyrgyz post----------------------------*/

.kyrgyz-section {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.kyrgyz-section .kyrgyz-item {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
}

.kyrgyz-section .kyrgyz-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.kyrgyz-section .kyrgyz-item p {
    margin: 0;
    padding: 15px;
    font-size: 1em;
    line-height: 1.6;
    color: #333;
}

.kyrgyz-section .kyrgyz-item img {
    width: 100%;
    max-width: 600px; /* Limit the image size */
    aspect-ratio: 4 / 3;   /* or 3 / 2 depending on the photo */
    height: auto;
    object-fit: contain;
    border-bottom: 1px solid #ccc;
    border-radius: 8px;
    margin: 0 auto; /* Center the image */
}

.kyrgyz-section h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
}

/*----------------------------------------------Tajikistan post----------------------------*/

.tajikistan-section {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.tajikistan-section .tajikistan-item {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
}

.tajikistan-section .tajikistan-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tajikistan-section .tajikistan-item p {
    margin: 0;
    padding: 15px;
    font-size: 1em;
    line-height: 1.6;
    color: #333;
}

.tajikistan-section .tajikistan-item img {
    width: 100%;
    max-width: 600px; /* Limit the image size */
    aspect-ratio: 4 / 3;   /* or 3 / 2 depending on the photo */
    height: auto;
    object-fit: cover;
    border-bottom: 1px solid #ccc;
    border-radius: 8px;
    margin: 0 auto; /* Center the image */
    display: block;
}

.tajikistan-section h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
}
