/* ========================================================= */
/* === 1. GENERAL STYLES & TYPOGRAPHY === */
/* ========================================================= */
:root {
    /* -- LIGHT MODE COLORS -- */
    --primary-color: #007BFF;
    --secondary-color: #f8f9fa;
    --bg-color: #f8f9fa;
    --text-color: #1a1a1a;
    --card-bg: #ffffff;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

    /* Other global variables */
    --container-width: 1200px;
    
    /* Smooth transition for theme change */
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* -- DARK MODE COLORS (Overrides for .dark-mode class) -- */
body.dark-mode {
    --primary-color: #007BFF;
    --secondary-color: #1a1a1a;
    --bg-color: #121212;
    --text-color: #E0E0E0;
    --card-bg: #222;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }

/* Global Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}
.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}
.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: 2px solid var(--secondary-color);
}
.btn-secondary:hover {
    background-color: transparent;
    color: var(--text-color);
}


/*----------------------------------------------------------
 2-   Preloader
------------------------------------------------------------*/
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cube-container {
    width: 50px;
    height: 50px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.cube {
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    animation: cube-spin 1.2s infinite ease-in-out;
}

.cube-1 { animation-delay: 0s; }
.cube-2 { animation-delay: 0.2s; }
.cube-3 { animation-delay: 0.4s; }
.cube-4 { animation-delay: 0.6s; }

@keyframes cube-spin {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.5); }
}
/* ========================================================= */
/* === 3. HEADER & NAVIGATION === */
/* ========================================================= */
.header {
    background-color: transparent;
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s, box-shadow 0.3s;
}
.header.scrolled {
    background-color: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* New: Solid white header for light mode */
body.light-mode .header {
    background-color: #ffffff; /* Solid white background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* A subtle shadow for depth */
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: -1px;
}
.logo-apex { color: var(--primary-color); }
.logo-template { color: #fff; }

/* New: Change the color of the logo and links in light mode when not scrolled */
body.light-mode .logo-template,
body.light-mode .main-nav ul li a {
    color: var(--text-color);
}
body.light-mode .main-nav ul li a:hover {
    color: var(--primary-color);
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.main-nav ul li a {
    display: block;
    padding: 0.5rem 1rem;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.header.scrolled .main-nav ul li a { color: var(--text-color); }
.main-nav ul li a:hover {
    color: var(--primary-color);
}

/* Mega Menu */
.has-mega-menu {
    position: relative;
}
.mega-menu {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 800px;
    top: 100%;
    padding: 2rem 0;
    background-color: var(--card-bg);
    box-shadow: var(--box-shadow);
    z-index: 999;
    transition: opacity 0.3s ease;
}
.has-mega-menu:hover .mega-menu {
    display: block;
}
.mega-menu-content {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 0 15px;
}
.mega-menu-content h3 {
    font-size: 1.1rem;
    margin-top: 0;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}
.mega-menu-content a {
    display: block;
    color: var(--text-color);
    padding: 0.5rem 0;
    white-space: nowrap;
    transition: color 0.3s;
}
.mega-menu-content a:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 1001;
    margin-right: 15px; /* Adjust spacing from edge */
}
.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}
.header.scrolled .menu-toggle span { background-color: var(--text-color); }
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* ========================================================= */
/* === 4. HERO SECTION STYLES (UPDATED) === */
/* ========================================================= */
.hero {
    position: relative;
    color: var(--text-color);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    /* Added overflow hidden to hide the moving parts */
    overflow: hidden;
}

/* New: Hero Background using pseudo-elements */
.hero-background {
    position: relative;
}

.hero-background::before,
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-bg.webp'); /* Use only one image */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0; /* Initial state before animation */
    transition: opacity 0.5s ease-in;
}

/* Pseudo-element for the top half (starts from above) */
.hero-background::before {
    background-position: center 0;
    transform: translateY(-50%);
}

/* Pseudo-element for the bottom half (starts from below) */
.hero-background::after {
    background-position: center 100%;
    transform: translateY(50%);
}

/* Overlay for text readability */
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}


/* New: Animation Classes to trigger the movement and fade-in */
.hero-background.animate-active::before,
.hero-background.animate-active::after {
    opacity: 1;
    transform: translateY(0);
    transition: transform 2s ease-out, opacity 1s ease;
}


.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 100px;
}
.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color); /* Title color changed to blue */
}
.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: #fff;
}

/* ========================================================= */
/* === 5. New: Marquee Section Styles === */
/* ========================================================= */

.marquee-section {
    width: 100%;
    overflow: hidden; /* Hides content outside the container */
    background-color: var(--secondary-color);
    padding: 10px 0;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.marquee-content {
    display: inline-block;
    animation: marquee-scroll 30s linear infinite;
    padding-left: 100%; /* Starts the text off-screen to the right */
}

.marquee-item {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    padding-right: 50px; /* Spacing between items */
    display: inline-block;
}

/* Defines the animation keyframes */
@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Pause the animation on hover for accessibility */
.marquee-section:hover .marquee-content {
    animation-play-state: paused;
}

/* ========================================================= */
/* === 6-Demos Grid & Card Styles === */
/* ========================================================= */

.section-title .typing-text-effect {
    color: var(--primary-color);
    font-size: 1.8rem; 
    font-weight: 500;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 15px;
}

.demo-item {
    background: var(--card-bg); 
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    overflow: hidden;
    position: relative;
}

.demo-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.demo-image-container {
    
    overflow: hidden;
    position: relative;
}

.demo-image-container img {
    width: 100%;
  
    height: auto; 
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease-in-out;
}

.demo-item:hover .demo-image-container img {
    transform: scale(1.05);
}

.demo-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    background-color: var(--primary-color);
    color: var(--text-color);
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2;
    text-align: center;
}

.demo-item:hover .demo-view-btn {
    opacity: 1;
    visibility: visible;
}

.demo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.4s ease;
    z-index: 1;
}

.demo-item:hover::before {
    background-color: rgba(0, 0, 0, 0.6);
}

.demo-info {
    padding: 20px;
    text-align: center;
}

.demo-info h5 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.coming-soon-demo {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(100%);
}
.coming-soon-demo:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.coming-soon-demo .demo-view-btn.disabled {
    cursor: not-allowed;
    background-color: #555;
}
.coming-soon-demo .demo-view-btn.disabled:hover {
    background-color: #555;
}
.coming-soon-demo:hover::before {
    background-color: rgba(0, 0, 0, 0);
}
/* ========================================================= */
/* === 7-Pages Grid & Card Styles === */
/* ========================================================= */

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 15px;
}

.page-type-group {
    margin-bottom: 60px;
}

.page-item {
    background: var(--card-bg); 
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    overflow: hidden;
    position: relative;
}

.page-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.page-image-container {
  
    overflow: hidden;
    position: relative;
}

.page-image-container img {
    width: 100%;
  
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease-in-out;
}

.page-item:hover .page-image-container img {
    transform: scale(1.05);
}

.page-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2;
    text-align: center;
}

.page-item:hover .page-view-btn {
    opacity: 1;
    visibility: visible;
}

.page-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.4s ease;
    z-index: 1;
}

.page-item:hover::before {
    background-color: rgba(0, 0, 0, 0.6);
}

.page-info {
    padding: 20px;
    text-align: center;
}

.page-info h5 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}
/* ========================================================= */
/* === 8. FEATURES SLIDER SECTION === */
/* ========================================================= */
.features {
    padding: 80px 0;
    background-color: var(--bg-color);
}
.features .section-title, .features .section-subtitle {
    color: var(--text-color);
}
.feature-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    text-align: center;
}
.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 10px;
}
.feature-card p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
}
/* Swiper styles */
.swiper-container {
    width: 100%;
    height: 100%;
}
.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
}
.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color) !important;
}
.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
}

/* ========================================================= */
/* === 9. FOOTER === */
/* ========================================================= */
.main-footer {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 80px 0 20px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
}
.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}
.footer-col p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    line-height: 1.8;
}
.footer-col ul li a:hover {
    color: var(--primary-color);
}
.social-icons {
    display: flex;
    gap: 15px;
}
.social-icons a {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: color 0.3s;
}
.social-icons a:hover {
    color: var(--primary-color);
}
.newsletter form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.newsletter input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: transparent;
    color: var(--text-color);
}
.newsletter input[type="email"], 
.newsletter input {
    box-sizing: border-box; 
    
    border: 1px solid #007bff; 
    
    color: #007bff;
    
    width: 100%; 
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 10px;
}


.newsletter input::placeholder {
    
    color: #007bff; 
}

.newsletter button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    
    background-color: var(--primary-color);
    
    color: #333; 
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}


.newsletter button:hover {
    
    background-color: var(--text-color);
    color: var(--primary-color); 
}
.copyright {
    text-align: center;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.5);
}
body.light-mode .copyright {
    text-align: center;
    margin-top: 2rem;
    color: rgb(0, 0, 0);
}

/* ========================================================= */
/* === 10. BACK TO TOP BUTTON (New Water Fill Effect) === */
/* ========================================================= */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 1.5rem;
    text-decoration: none;
    z-index: 999;
    overflow: hidden;
    /* Changes: Use opacity and visibility instead of display */
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top span {
    position: relative;
    z-index: 2;
    color: #fff;
    transition: color 0.5s ease;
}

/* Pseudo-element for the "water fill" effect */
.back-to-top::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(0, 123, 255, 0.8);
    transition: height 0.5s ease-out;
    z-index: 1;
}

/* When the "scrolled-down" class is active, fill the button */
.back-to-top.scrolled-down::before {
    height: 100%;
}


/* ========================================================= */
/* === 11. ANIMATION KEYFRAMES & UTILITIES (UPDATED) === */
/* ========================================================= */
/* Updated fade-up animation duration */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation-fill-mode: forwards;
}
.animate-fade-in {
    opacity: 0;
    animation-fill-mode: forwards;
}

/* New: Hero specific animations */
@keyframes hero-split-down {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-split-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================= */
/* === 12. RESPONSIVE STYLES (Media Queries) === */
/* ========================================================= */
@media (max-width: 992px) {
    .main-nav { 
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(18, 18, 18, 0.95);
        z-index: 998;
        padding-top: 100px;
        overflow-y: auto;
    }
    
    /* New: White background for the mobile menu in light mode */
    body.light-mode .main-nav {
        background-color: rgba(255, 255, 255, 0.95); 
    }
    
    .main-nav.active {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }
    .main-nav ul { flex-direction: column; }
    .main-nav ul li a { 
        color: var(--text-color); 
        font-size: 1.2rem; 
        padding: 15px 0;
        position: relative; /* Needed for the pseudo-element */
    }

    .menu-toggle {
        display: flex;
    }

    .mega-menu {
        max-width: 100%;
        position: static;
        transform: none;
        box-shadow: none;
    }
    .mega-menu-content { flex-direction: column; gap: 1.5rem; }

    /* Target ONLY the direct link in the list item */
    .has-mega-menu > a::after {
        content: '+';
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--primary-color);
        margin-left: 10px;
        transition: transform 0.3s;
    }
    .main-nav.active .has-mega-menu > a::after {
        transform: rotate(45deg);
    }
    
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1rem; }
    
    .demo-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    .demo-grid > :nth-child(1), .demo-grid > :nth-child(2), .demo-grid > :nth-child(3), .demo-grid > :nth-child(4), .demo-grid > :nth-child(5) {
        grid-column: span 1;
    }

    .footer-grid {
        gap: 2rem;
    }

    .back-to-top {
        right: 15px;
    }
}
@media (max-width: 768px) {
    .demo-grid {
        grid-template-columns: 1fr;
    }
    .hero-title { font-size: 2rem; }
    /* Fix for Swiper slides not being full width */
    .swiper-slide {
        width: 100% !important;
        flex-shrink: 0;
    }
    
    /* New: Adjust hero background for smaller screens */
    .hero-background::before,
    .hero-background::after {
        background-size: auto 100%;
    }

    /* New: Smaller Back-to-Top Button for smaller screens */
    .back-to-top {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 1.2rem;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 576px) {
    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .hero-buttons .btn {
        width: 80%;
    }
}
/*----------------------------------------------------------
  13-  Snowfall effect
------------------------------------------------------------*/
#snowfall-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; 
    overflow: hidden; 
    z-index: 10;
}

.snowflake {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 5px #fff, 0 0 10px #fff;
    animation: snowfall linear infinite;
}

@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0vw);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(5vw);
        opacity: 0;
    }
}
/*----------------------------------------------------------
   14- Snowfall Toggle Button (Gear Shape)
------------------------------------------------------------*/
.snowfall-toggle-btn {
    position: fixed;
    bottom: 85px; /* Adjusts the position above the back-to-top button */
    right: 25px;
    width: 50px; /* Smaller size */
    height: 50px; /* Smaller size */
    background-color: var(--primary-color); /* Blue background */
    border: none;
    color: #fff; /* White icon color */
    border-radius: 50%; /* Make it round */
    text-align: center;
    font-size: 1.6rem; /* Good icon size */
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow */
}

.snowfall-toggle-btn:hover {
    background-color: #0056b3; /* Darker blue on hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4); /* More prominent shadow on hover */
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* Optional: Add a spinning animation to the gear icon when active */
.snowfall-toggle-btn.active i {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
    .snowfall-toggle-btn {
        bottom: 65px;
        right: 15px;
        width: 45px; /* Even smaller on mobile */
        height: 45px;
        font-size: 1.3rem;
    }
}
/* General Centering for Sections & Page Groups */
.section-title,
.section-subtitle,
.page-group-title {
    text-align: center;
}

/* Media Query for Mobile Responsiveness */
@media (max-width: 576px) {
    .demo-grid,
    .page-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .demo-image-container,
    .page-image-container {
        height: 250px;
    }

    .demo-view-btn,
    .page-view-btn {
        font-size: 0.8rem; /* Corrected size */
        padding: 7px 14px; /* Corrected padding */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .demo-view-btn i,
    .page-view-btn i {
        margin-left: 5px;
        font-size: 0.9em;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .page-group-title {
        font-size: 1.5rem;
    }
}


/*----------------------------------------------------------
   15- Theme Toggle Button
------------------------------------------------------------*/
.theme-toggle-container {
    display: flex;
    align-items: center;
}

.theme-toggle-btn {
    width: 25px;
    height: 25px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-left: 10px;
}

.theme-toggle-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}
