:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: black;
    --background-color: #f4f4f4;
    --text-color-in-dark-mode: #f4f4f4;
    --backgroud-color-of-btn: linear-gradient(45deg, var(--primary-color), #0d598b);
    --backgroud-color-of-btn-hover: linear-gradient(45deg, #0d598b, var(--primary-color));
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}


html {
    scroll-behavior: smooth;
  }
  
  @media (max-width: 768px) {
    body {
      --webkit-overflow-scrolling: touch;
      overflow-y: scroll;
    }
  
    .container,
    .featured-topics,
    .popular-guides,
    .topic-grid,
    .guide-list {
      -webkit-overflow-scrolling: touch;
    }
  }

/*Navbar*/

.navbar {
    background-color: var(--secondary-color);
    width: 100%;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
}

.full-logo {
    display: none;
    height: 100px;
}

.short-logo {
    display: block;
    height: 90px; 
}

.navbar {
    display: flex;
    justify-content: space-between;
    justify-content: flex-start;
    align-items: center;
    padding: 1 rem 2rem;
    position: relative;
}


/*Mobile-nav-Content*/

.mobile-nav-content {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100%;
    background-color: #f8f8f8;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
}

.mobile-nav-content.show {
    right: 0;
}

@media screen and (max-width: 768px) {
    .mobile-nav-content {
        display: block;
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background-color: #2c3e50;
        color: #ecf0f1;
        transition: left 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 1000;
        padding: 60px 20px 20px;
    }

    .mobile-nav-content.show {
        left: 0;
    }

}

@media screen and (min-width: 768px) {
    .menu-icon {
        display: none;
    }
}

@media screen and (min-width: 768px) {
    .nav-links {
        display: none;
    }
}

/*Logo*/

@media screen and (min-width: 768px) {
    .logo {
        margin-bottom: 1rem;
    }

    .full-logo {
        display: block;
        height: 90px; 
    }

    .short-logo {
        display: none;
        height: 80px;
    }
    .logo {
        margin-right: auto;
    }
}

/*Navbar Nav-links*/

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    float: inline-start;
    margin: 10px 10px;
}


.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-links a:hover {
    color: var(--primary-color);
}

@media screen and (min-width: 769px) {
    .nav-links-container {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .nav-links {
        justify-content: center;
    }

}

@media screen and (max-width: 768px) {
    .navbar {
        justify-content: space-between;
    }

    .nav-links-container {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--secondary-color);
        transition: 0.3s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
        padding-top: 60px;
    }

    .nav-links-container.active {
        left: 0;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .nav-links a {
        padding: 15px 20px;
        font-weight: 500;
        color: white;
        text-decoration: none;
        cursor: pointer;
        width: 80%;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .nav-links a:hover, .nav-links a:active {
        background-color: var(--primary-color);
        color: #ffffff;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a::before {
        content: '➤ ';
        margin-right: 10px;
        color: var(--primary-color);
    }

    .back-icon {
        display: block;
        position: absolute;
        top: 20px;
        left: 20px;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }
}


@media screen and (min-width: 769px) {
    .nav-links-container {
        display: block !important;
    }
}

.menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.back-icon {
    display: none;
    font-size: 1.5rem;
    color: white;
    position: absolute;
    top: 1rem;
    left: 1rem;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .menu-icon {
        display: block;
        position: absolute;
        top: 1rem;
        left: 1rem;
        cursor: pointer;
    }
    .back-icon {
        display: block;
        padding: 10px;
        cursor: pointer;
    }
}

/* Search bar*/

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    left: 8rem;
}

.search-bar {
    display: flex;
    margin-bottom: 5px;
}

.search-bar input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
}

.search-bar button {
    padding: 10px 15px;
    background: linear-gradient(45deg, var(--primary-color), #0d598b);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}
.search-bar button:hover {
    background: linear-gradient(45deg, #0d598b, var(--primary-color));
    
}

#searchResults {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

#searchResults h3 {
    margin: 0;
    padding: 10px;
    background: linear-gradient(45deg, var(--primary-color), #0d598b);
    border-bottom: 1px solid #0d598b;
}

#searchResults h3:hover{
    background: linear-gradient(45deg, #0d598b, var(--primary-color));
}

#resultsList {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#resultsList li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

#resultsList li:hover {
    background-color: #f5f5f5;
}

#resultsList a {
    color: #333;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

#resultsList a:hover {
    color: var(--primary-color);
}

@media screen and (max-width: 768px) {
    .search-container {
        width: 100%;
        margin-top: 20px;
        left: 0;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        width: 70%;
    }

    .search-bar button {
        width: 30%;
    }
}

@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
    }
}

.highlight {
    color: var(--primary-color);
    font-weight: bold; 
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        width: 70%;
    }

    .search-bar button {
        width: 30%;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin: 1rem 0;
    }
}

@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/*WelcomeContainer*/

.welcome-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.welcome-image {
    position: relative;
    width: 100%;
    height: auto;
    display: block;
}

.welcome-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.welcome-text {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);

}

@media screen and (max-width: 768px) {
    .welcome-text {
        font-size: 1.5em;
    }
}

.welcome-text h1 {
    font-size: 4em;
    font-weight: 900;
    color: #000;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.5);
}

.welcome-text .animated-text {
    animation: colorChange 15s linear infinite;
}

@keyframes colorChange {
    0% { color: #a59503; }
    25% { color: #0bb876; }
    50% { color: #45b7d1; }
    75% { color: #1757ac; }
    100% { color: #da0404; }
}

@media screen and (max-width: 768px) {
    .welcome-text h1 {
        font-size: 2em;
    }
}

@media screen and (max-width: 768px) {

    .welcome-image {
        position: relative;
        height: 300px;
        overflow: hidden;
    }

    .welcome-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .welcome-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        width: 90%;
        background-color: rgba(255, 255, 255, 0.8);
        padding: 1rem;
        border-radius: 8px;
    }

    .welcome-text h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
}

/* Topic Categories */

.topic-categories {
    background-color: #f8f9fa;
    padding: 4rem 2rem;
    margin: 2rem 0;
}

.topic-categories h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.category-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.category-card .btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.category-card .btn:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/*popular-guides */

.featured-topics,
.popular-guides {
    margin: 4rem auto;
    padding: 0 2rem;
    max-width: 1200px;
}

.topic-grid,
.guide-list {
    padding: 0 1rem;
}

h1 {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 30px;
}

.popular-guides h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-left: 2rem;
}
.guide-list {
    list-style-type: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.guide-list li {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.guide-list li:hover {
    transform: translateY(-5px);
}

.guide-list a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
}


/* Featured topics */

.featured-topics {
    margin: 2rem 0;
}

.featured-topics h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-left: 2rem;
}
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.topic-card {
    background-color: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-5px);
}

.topic-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.topic-card h3 {
    margin: 1rem;
    font-size: 1.2rem;
}

.topic-card p {
    margin: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #666;
}

.btn {
    display: inline-block;
    margin: 0 1rem 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, var(--primary-color), #0d598b);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
    background: linear-gradient(45deg, #0d598b, var(--primary-color));
}



    


/* Quick Tips */

.quick-tips {
    background-color: #f8f9fa;
    position: relative;
    padding: 3rem 1rem; 
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quick-tips h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.tip-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    cursor: grab;
    overflow-x: hidden;
}

.tip-carousel:active {
    cursor: grabbing;
}

.tip-carousel::-webkit-scrollbar {
    display: none;
}

.tip {
    flex: 0 0 auto;
    width: 300px;
    scroll-snap-align: start;
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-right: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tip i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tip p {
    font-style: italic;
    color: #333;
    line-height: 1.6;
}

@media screen and (max-width: 768px) {
    .tip {
        width: 250px;
    }
}

.tip-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.scroll-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.left-btn {
    left: 10px;
}

.right-btn {
    right: 10px;
}

.tip-carousel {
    display: flex;
    transition: transform 0.3s ease;
    padding: 0 50px;
}

@media screen and (max-width: 768px) {
    .scroll-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .left-btn {
        left: 5px;
    }

    .right-btn {
        right: 5px;
    }

    .tip-carousel {
        padding: 0 40px;
    }
}

/* Testimonials */

.testimonials {
    margin: 2rem 5%;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 0 20px;
}

.testimonial {
    background-color: #f8f8f8;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.testimonial cite {
    display: block;
    margin-top: 0.5rem;
    font-weight: bold;
}

/* Newsletter Signup */
.newsletter-signup {
    background: linear-gradient(45deg, var(--primary-color), #0d598b);
    color: white;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    transition: background 2s ease;
}

#newsletter-form {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

#newsletter-form input[type="email"] {
    padding: 0.5rem;
    width: 60%;
    max-width: 300px;
    height: 50px;
    box-sizing: border-box;
}

#newsletter-form input[type="text"] {
    padding: 0.5rem;
    width: 60%;
    max-width: 300px;
    height: 50px;
    box-sizing: border-box;
}

#newsletter-form button {
    height: 50px;
    padding: 0 1rem;
    box-sizing: border-box;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
}

@media screen and (max-width: 768px) {
    #newsletter-form {
        flex-direction: column;
        align-items: center;
    }

    #newsletter-form input[type="email"] {
        width: 100%;
        margin-bottom: 1rem;
    }
}


  /* Footer */

footer {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 300px;
    margin: 0 20px;
    margin-bottom: 20px;
    min-width: 200px;
    margin-right: 10px;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.footer-section p, .footer-section ul {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style-type: none;
    padding: 0;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section .fas {
    margin-right: 10px;
    color: #007bff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1rem 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.footer-bottom li {
    list-style-type: none;
    padding: 0;
}

.footer-bottom a{
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

.contact-section a {
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icon {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--primary-color), #0d598b);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.social-icon i{
    color: var(--text-color-in-dark-mode);
}

.social-icon:hover {
    color: var(--text-color-in-dark-mode);
    background: linear-gradient(45deg, #0d598b, var(--primary-color));
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        flex-basis: 100%;
        text-align: center;
    }
}


@media screen and (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin: 1rem 0;
    }
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin-right: 0;
        margin-bottom: 30px;
    }

    .contact-section {
        align-items: center;
    }

    .social-icons {
        justify-content: center;
    }
}