/* RUKESH.CSS - REPLACE ALL YOUR OLD CODE WITH THIS */

/* --- General Styling --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    color: #333;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Preloader Styling --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.preloader-content { display: flex; }
.letter {
    font-size: 80px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: flicker 2s infinite;
}
.letter.t { animation-delay: 0s; color: #42a5f5; }
.letter.l { animation-delay: 0.5s; color: #66bb6a; }
@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1); text-shadow: 0 0 15px #fff; }
    50% { opacity: 0.6; transform: scale(1.1); text-shadow: 0 0 25px #42a5f5; }
}

/* --- Sticky Header Styling --- */
.site-header {
    background-color: #ffffff;
    position: sticky; /* The magic property */
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease; /* Transition for the shadow effect */
}

/* This is the container for your logo and nav buttons */
.header-content {
    display: flex;
    justify-content: space-between; /* Pushes logo and nav apart */
    align-items: center; /* Vertically aligns them */
    
    /* This ensures content is centered and doesn't get squished */
    max-width: 1320px; /* A bit wider for better spacing */
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    
    padding: 15px 40px; /* Default padding */
    box-sizing: border-box; /* Important for layout */
    transition: padding 0.3s ease; /* Transition for shrink effect */
}

/* --- Logo Styling --- */
.logo-title {
    font-size: 26px;
    color: #0056b3;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: font-size 0.3s ease; /* Transition for shrink effect */
}

/* --- Navigation Styling --- */
.site-header nav {
    display: flex;
    gap: 15px;
}

.nav-button {
    background-color: #007bff;
    color: #fff;
    padding: 10px 18px; /* Slightly bigger buttons */
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap; /* Prevents text from wrapping */
    transition: background-color 0.3s, transform 0.3s;
}

.nav-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* --- The Styles for WHEN the header is STICKY --- */
.site-header.sticky-active {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.site-header.sticky-active .header-content {
    padding-top: 10px;
    padding-bottom: 10px; /* Reduced padding for shrink effect */
}

.site-header.sticky-active .logo-title {
    font-size: 22px; /* Reduced font size for shrink effect */
}


/* --- Responsive adjustments for mobile --- */
@media (max-width: 600px) {
    .header-content {
        padding: 10px 15px;
    }
    .logo-title {
        font-size: 18px; /* Adjusted for smaller screens */
    }
    .nav-button {
        padding: 8px 12px;
        font-size: 12px;
    }
}
/* --- Main Content & Cards --- */
main {
    padding: 20px 40px;
}
.main-title {
    color: #ffffff;
    border-left: 5px solid #ffffff;
    padding-left: 15px;
    margin-bottom: 30px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.card img {
    width: 100%;
    height: auto;
    /*aspect-ratio: 16/9;*/
    /*object-fit: cover;*/
}
.card-content {
    padding: 15px;
    flex-grow: 1;
}
.card-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0056b3;
}
.card-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    margin: 15px;
    border-radius: 5px;
}
.card-button span { font-size: 20px; }
.btn-purple { background-color: #6f42c1; }
.btn-orange { background-color: #fd7e14; }
.btn-blue { background-color: #007bff; }
.btn-green { background-color: #28a745; }

/* --- Footer Styling --- */
.site-footer {
    background-color: #1c2331;
    color: #f0f2f5;
    padding-top: 40px;
    font-size: 15px;
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-footer h4 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
}
.site-footer h4::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    background-color: #42a5f5;
    height: 2px;
    width: 50px;
}
.site-footer p { color: #cfd8dc; line-height: 1.7; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer ul li { margin-bottom: 12px; }
.site-footer a { color: #cfd8dc; text-decoration: none; transition: color 0.3s ease; }
.site-footer a:hover { color: #42a5f5; }
.footer-contact ul li, .footer-links ul li { display: flex; align-items: center; }
.footer-contact i { color: #42a5f5; margin-right: 12px; font-size: 16px; width: 20px; }
.social-icons { display: flex; gap: 15px; margin-bottom: 25px; }
.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    transition: background-color 0.3s, transform 0.3s;
}
.social-icon:hover { background-color: #42a5f5; transform: translateY(-3px); color: #fff; }
.newsletter-form { display: flex; margin-top: 10px; }
.newsletter-form input { flex-grow: 1; padding: 10px; border: none; border-radius: 5px 0 0 5px; outline: none; }
.newsletter-form button {
    padding: 10px 15px;
    border: none;
    background-color: #42a5f5;
    color: #fff;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    font-weight: bold;
    transition: background-color 0.3s;
}
.newsletter-form button:hover { background-color: #1e88e5; }
.footer-bottom {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: none;
    width: 45px;
    height: 45px;
    background-color: #42a5f5;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 20px;
    line-height: 45px;
    z-index: 1000;
    transition: background-color 0.3s, transform 0.3s;
}
#back-to-top:hover { background-color: #1e88e5; transform: translateY(-5px); }

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .header-content { padding: 10px 20px; }
    main { padding: 20px; }
}

@media (max-width: 600px) {
    .card-grid { grid-template-columns: 1fr; }
    .header-content { padding: 10px 15px; }
    .logo-title { font-size: 20px; }
    .nav-button { padding: 6px 10px; font-size: 12px; }
}