:root {
    --bg: #ffffff;
    --text: #000;
    --card-bg: #fff;
}

body.dark {
    --bg: #121212;
    --text: #fff;
    --card-bg: #1e1e1e;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: sans-serif;
    margin: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;

    background: linear-gradient(135deg, rgba(102,126,234,0.8), rgba(118,75,162,0.8));
    backdrop-filter: blur(10px);
    color: white;
}

/* Navbar layout */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;

    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Logo */
.logo {
    font-size: 1.5rem;
}

/* Links */
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    opacity: 0.7;
}

body.dark .navbar {
    background: linear-gradient(135deg, #141e30, #243b55);
}


#toggle {
    background: var(--card-bg);
    border: none;
    border-radius: 50%;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
}

#toggle:hover {
    transform: scale(1.1);
}
#toggle:focus {
    outline: none;
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url("images/hero.png") center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* Button */
.hero-btn {
    padding: 10px 20px;
    background: white;
    color: black;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: 0.3s;
}

.hero-btn:hover {
    background: #ddd;
}


/* Container */
.container {
    padding: 20px;
}

.heading {
    text-align: center;
}

/* Grid Layout */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Cards */
.card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}


.card img {
    width: 100%;
    height: 100%;
    transition: transform 0.4s, filter 0.4s;
}

.card:hover img {
    transform: scale(1.1);
    filter: brightness(70%);
}

.card figcaption {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    color: white;
    opacity: 0;
    transition: 0.4s;
}

.card:hover figcaption {
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal img {
    max-width: 80%;
    max-height: 80%;
}

#close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Toggle Switch */
.switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: 0.4s;
}

/* Circle */
.slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

/* ON state */
input:checked + .slider {
    background-color: #333;
}

input:checked + .slider::before {
    transform: translateX(24px);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle span {
    font-size: 14px;
    font-weight: 500;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding: 40px 20px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Layout */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: auto;
}

/* Sections */
.footer-section h3,
.footer-section h4 {
    margin-bottom: 10px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
}

/* Links */
.footer-section a {
    display: block;
    text-decoration: none;
    color: white;
    margin: 5px 0;
    transition: 0.3s;
}

.footer-section a:hover {
    opacity: 0.7;
}

/* Bottom */
.footer-bottom {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    opacity: 0.8;
}
/* footer ko dark karne ke liye */
body.dark .footer {
    background: linear-gradient(135deg, #141e30, #243b55);
}

/* Caption styling */
.card figcaption {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    color: white;
    opacity: 0;
    transition: 0.4s;
}

/* Show on hover */
.card:hover figcaption {
    opacity: 1;
}

/* Read button */
.read-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: white;
    color: black;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: 0.3s;
}

.read-btn:hover {
    background: #ddd;
}

html {
    scroll-behavior: smooth;
}

/* some modification */

.container {
    margin-top: 60px;
}

.popular-section {
    background: linear-gradient(135deg, #e0e7ff, #f8f9ff);
    padding: 60px 20px;
    margin-top: 40px;
    border-radius: 20px;
}   

.popular-section {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

body.dark .popular-section {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.card {
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card figcaption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    text-align: left;
    font-weight: 500;
}

.card small {
    display: block;
    font-size: 12px;
    opacity: 0.8;
}

.read-btn {
    margin-top: 5px;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 20px;
}

.card:hover .read-btn {
    transform: translateY(-2px);
}

/* Body text */
body {
    font-family: 'Open Sans', sans-serif;
}


/*-------------- text - styling---------- */
/* Headings */
h1, h2, h3, .logo {
    font-family: 'Poppins', sans-serif;
}

h1 {
    font-weight: 700;
    letter-spacing: 1px;
}

h2 {
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.2rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.card figcaption {
    font-family: 'Poppins', sans-serif;
}

.card small {
    font-family: 'Open Sans', sans-serif;
}

.heading {
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    margin-bottom: 40px;
}

/* underline */
.heading::after {
    content: "";
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

.subheading {
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
    margin-top: -20px;
    margin-bottom: 30px;
}