* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: hidden;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    height: 100vh;
    overflow-y: auto;
}

body::-webkit-scrollbar {
    display: none;
}

.hero-section {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    transition: height 0.3s ease;
}

.hero-section:hover {
    height: 80vh;
}

.hero-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(112, 112, 120, 0.6);
    transition: background-color 0.3s ease;
}

.hero-section:hover .hero-overlay {
    background-color: rgba(112, 112, 120, 0);
}

.hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 3rem;
    text-align: center;
    z-index: 10;
    transition: top 0.3s ease, left 0.3s ease, transform 0.3s ease, font-size 0.3s ease;
}

.hero-section:hover .hero-title {
    top: 20px;
    left: 20px;
    transform: translate(0, 0);
    font-size: 2rem;
    text-align: left;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav a:hover {
    background: rgb(72, 70, 70);
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(217, 255, 0, 0.3);
}

main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.home-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.home-icon img {
    width: 50px;
    height: 50px;
}

.home-text h2 {
    margin-bottom: 0.5rem;
}

.section-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.section-link section {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.section-link:hover section {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.section-link section h2 {
    margin-bottom: 1rem;
    color: #333;
}

.section-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.section-image {
    flex: 0 0 300px;
}

.section-image img {
    width: 100%;
    border-radius: 5px;
    object-fit: cover;
}

.section-text {
    flex: 1;
}

.section-text h2 {
    margin-bottom: 1rem;
    color: #333;
}

/* grid section styles */
.grid-section {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.grid-section h2 {
    margin-bottom: 2rem;
    color: #333;
    text-align: left; /* same as About */
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.grid-item {
    text-decoration: none;
    color: inherit;
    background-color: #f9f9f9;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.grid-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-content {
    padding: 1.5rem;
}

.grid-content h3 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.2rem;
}

.grid-date {
    color: #999;
    font-size: 0.9rem;
}

/* responsive adjustments */
@media (max-width: 600px) {
    .section-content {
        flex-direction: column;
        gap: 0;
    }
    .section-text h2 {
        margin-top: 0;
        text-align: left;
    }
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}
.search-section {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.search-button {
    padding: 0.75rem 2rem;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-button:hover {
    background-color: #555;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

nav a.active {
    background-color: #FFD700;
    color: #333;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
}

/*button*/
.more-button-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.more-button {
    padding: 1rem 3rem;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.more-button:hover {
    background-color: #0056b3;
    transform: scale(1.08);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.more-button:active {
    transform: scale(0.98);
}
/* post‑page additions */
.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0 1rem;
}

.post-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.post-text {
    margin: 1rem 0;
    line-height: 1.6;
}

.advertisement {
    background-color: #fafafa;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 5px;
}

.advertisement h2 {
    margin-bottom: 0.5rem;
}

.advertisement p {
    margin-bottom: 0.75rem;
}


.resource-links {
    list-style: none;
    padding-left: 0;
}


.resource-links li + li {
    margin-top: 0.5rem;
}


.resource-links a {
    color: #007BFF;
    text-decoration: none;
}

.resource-links a:hover {
    text-decoration: underline;
}

/* comments area */
.comments-section {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comments-section h2 {
    margin: 0;
    font-size: 1.5rem;
}

/* textarea instead of plain input */
.comment-input {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.comment-input:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.comment-name {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.comment-name:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* .search-button already defined; expects no changes */

/* ...existing code... */

.ad-card {
    background-color: #fafafa;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid #ddd;}

.ad-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* small image icon */
.ad-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex: 0 0 40px;
}

/*user comment*/
.ad-row {
    display: flex;
    align-items: flex-end; /* align title + date with bottom of image */
    gap: 0.6rem;
    margin-bottom: 0.5rem;
   
   
}

.ad-icon {
    width: 25px;           /* smaller icon size */
    height: 25px;
    object-fit: cover;
    border-radius: 4px;
    flex: 0 0 36px;
}

.ad-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1;        /* prevents extra vertical spacing */
}

.ad-datetime {
    margin: 0 0 0 0.6rem;
    color: #777;
    font-size: 0.85rem;
    line-height: 1;
}