/* CSS Variables for easy theme management */
:root {
    --bg-color: #1a1d24;
    --surface-color: #242832;
    --primary-text: #e2e8f0;
    --secondary-text: #94a3b8;
    --accent-gradient: linear-gradient(90deg, #00f2fe, #4facfe);
    --accent-color-start: #00f2fe;
    --font-family: 'Poppins', sans-serif;
}

/* General Body & Reset Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    background-color: var(--bg-color);
    color: var(--primary-text);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 600;
}

p {
    color: var(--secondary-text);
}

a {
    text-decoration: none;
    color: var(--accent-color-start);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-text);
}

/* Header Styles */
#main-header {
    background: rgba(26, 29, 36, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--surface-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

#main-header.scrolled {
    background: var(--surface-color);
    padding: 0.5rem 0;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-text);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--secondary-text);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.search-container {
    position: relative;
}

#search-icon {
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--secondary-text);
}

#search-bar {
    background: var(--bg-color);
    border: 1px solid var(--surface-color);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--primary-text);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

#search-bar.active {
    width: 250px;
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    padding: 12rem 0 6rem;
    text-align: center;
    background: var(--bg-color);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: auto;
}

/* Content & Card Styles */
.content-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--surface-color);
    border: 1px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color-start);
}

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

.card.large-card img {
    height: 250px;
}

.card-content {
    padding: 1.5rem;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-gradient);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bg-color);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 500;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Footer */
footer {
    background: var(--surface-color);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.social-icons a {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--bg-color);
    color: var(--secondary-text);
}


/* Scroll to Top Button */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background: var(--accent-gradient);
    color: var(--bg-color);
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    line-height: 1;
}

/* Reveal on Scroll Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media(max-width: 992px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {
    nav ul {
        display: none; /* Simple hiding for demo; can be replaced with a mobile menu */
    }
    .hero h1 {
        font-size: 2.5rem;
    }
}
