/* Defaultni vrednosti za ubavo pravenje na responzinen sajt */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* constanti za primenuvanje na
 heksadecimalni boi koi ke gi 
 primenuvame vo ramkite na ovoj proek */
:root { 
    --primary-color: #fc5d66;
    --secondary-color: #ffc05a;
    --light-color: #f9fafb;
    --dark-color: #272d35;
}
/* Vo html i body-to imame daden speficen font od font awsome, dolzina i scroll */
html,
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;  

}
/* Vo nepodredenata lista stavame kompanda na stil vo koja ke nema * */

li {
    list-style-type: none;
}
/* Brisenje vo a linkot underline */
a {
    text-decoration: none; 
}
.btn {
    display: inline-block;
    padding: 1.3rem 2.3rem;
    border: 1px solid var(--secondary-color);
    border-radius: 32px;
    background: var(--secondary-color);
    color: var(--dark-color);
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: #fff;
}
.section {
    margin: 4rem 0;
}
/* Text Classes */
.text-primary {
    color: var(--primary-color);
}
.text-secoundary {
    color: var(--secondary-color);
}
.section-header{
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}
.section-header p {
    font-size: 1.3rem;
    color: var(--dark-color);
}
.heading-border {
    width: 64px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto 2rem;
}
/* Learn Topics */
.topics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
.topic img {
    width: 170px;
}
.topic img {
    transition: transform 0.5s;
  }
  
.topic img:hover {
    transform: scale(1.1);
}

/* Dodavanje na maksimalna sirina od 1200px centrirana i razmaci gore dole 0 i levo resno 32px */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
/* druga klasa za primenuvanje na container dokolku ni e potrebna so druga vrednost */
.container-sm {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    
}
/* navbar dodavame privremena boja crna
boja na tekst bela 
paddint gore dole 
pozicija fiksna gore 0 levo 0 desno 0 
, z-index 1000 koj ke bide
 nad site elementi i isto taka 
  */
  /* Cards */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.75rem;
    background: #fff;
    box-shadow: 0 12px 12px 0 rgba(0, 0, 0, 0.3);    
}
.navbar {
    background: transparent; 
    color: white;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.4s ease-in-out;
}
.navbar.navbar-scroll {
    background-color: rgba(235, 77, 85, 0.7);
    backdrop-filter: blur(10px);
}
.navbar-flex {
    display: flex;
    justify-content: space-between;   
    align-items: center;
}

.navbar img {
    width: 81px;
    height: 32px;
}
.navbar .main-menu-list {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-weight: 600;
}
.navbar a {
    color: #fff;

}
.navbar a:hover {
    color: var(--secondary-color);
}
.navbar i {
    font-size: 1.4rem;
}
/* Mobile menu stiliranje bela boja i kursor na mobile nav*/
.navbar .mobile-menu-toggle {
    color: #fff;
    cursor: pointer;
}
/* Ovde napravivme dizajn za site items
so absolutna pozicija  */
.navbar .mobile-menu-items {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(38, 38, 39, 0.8);
    opacity: 0.95;
    padding: 3rem 2rem;   
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s ease;
}
.navbar .mobile-menu-items.active {
    transform: translateX(0);
    
}
/* sega gi zemame listite i gi transformirame
vo flex i vo koloni kako defaultnata i razmak od 2rem */
.navbar .mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-size: 1.2rem;
} 
.mobile-menu {
    display: none;
}
/* Hero */
.hero {
    background: #000 url('../images/header-background.jpg') center center/cover no-repeat;
    padding: 11.5rem 2rem 8rem;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}
.hero .hero-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6rem;
    padding-bottom: 8rem;
}
.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-weight: 400;
}
.hero img {
    width: 100%;
    margin-right: -100px;  
}
.hero .frame-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}
.topic h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0.5rem 0;

}
/* Chapter Cards */
.chapter-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1rem 0 4rem;
}
.chapter-cards img {
    width: 130px;
    margin-top: 1rem;
}
.chapter-cards h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1rem 0;
}
/* Summary */
.summary {
    background: var(--light-color);
    color: var(--dark-color);
    padding: 4rem 5rem 9rem;
}
.summary .section-lists {
    background: #fff;
    padding: 2rem;
    box-shadow: 12px 12px 12px 0 rgba(0, 0,0, 0.2);
}
.summary .list-header {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1rem 0;
}
.summary .list-item {
    padding: 1.4rem 0;
    border-bottom: 1px solid #f1f4f6;
}
.summary .list-item:last-child {
    border-bottom: none;
}
/* Info section */
.info-container {
    background: url('../images/audience.jpg') top center/cover no-repeat;
    display: flex;

}
.info-content {
    background-color: var(--primary-color);
    color: #fff;
    flex: 1;
    padding: 4rem;
}
.info-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.info-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}
.info-content ul li {
    font-size: 1.2rem;
    line-height: 2;
}
.info-content i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}
.info-left {
    width: 50%;
}
/* Takeaways */
.takeaways-cards {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 2rem;
    padding: 1.5rem 0;   
}
.takeaways-cards .card {
    flex-direction: row;
}
.takeaways-cards .card i {
    margin-right: 1rem;
}
/* Details */
.details-flex {
    display: flex;
    gap: 4rem;
    align-items: center;
    justify-content: center;
}
.details img {
    width: 100%;
    max-width: 400px;
}
.details .heading-border {
    margin: 0;
}
.details p {
    margin: 1rem 0 3rem;
}

/* Author */
.details + .details .details-flex {
    flex-direction: row-reverse;
}
.details ul {
    margin-bottom: 2rem;
}
.details ul li {
    line-height: 2;
}
.details i {
    margin-right: 0.5rem;
}
/* Stats */
.stats {
    background: #000 url('../images/stats-background.jpg') center center/cover no-repeat;
    color: #fff;
}
.stats-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4rem 2rem;
}
.stats img {
    width: 100%;
    max-width: 500px;
}
.stats-content {
    max-width: 500px;
}
.stats .stats-numbers {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    text-align: center;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.stats .stats-numbers h3 {
    font-size: 2.45rem;
    font-weight: 700;
}
.stats .stats-numbers p {
    font-size: 0.8rem;
}
.stats .stats-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-align: center;
}
.stats .btn {
    display: block;
    margin: 0 auto;
    text-align: center;
    width: 200px;
}

.fa-x-twitter {
    color: black;
}
.social-icons {

    gap: 1.2rem;
}

.social-icons a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
  }

.social-icons a:hover {
    color: #0073e6; 
}
  
.x-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: black; 
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    border-radius: 50%; 
}

/* Newsletter */
.newsletter {
    text-align: center;
    margin: 0 2rem;
}
.newsletter-flex {
    display: flex;
    gap: 1rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--light-color);
    border: 1px solid #eee;
    padding: 4rem 2rem;
}
.newsletter h2 {
    font-size: 2rem;
    font-weight: 700;
}
.newsletter p {
    max-width: 600px;
}
.newsletter input[type='email'] {
    padding: 1rem 2rem;
    border: 1px solid #ccc;
    width: 100%;
    border-radius: 32px;
    max-width: 400px;
    margin: 1rem 0;
}
/* Social */
.social {
    background: var(--dark-color);
    color: white;
    padding: 7rem 2rem;
    text-align: center;
    font-size: 1.7rem;
    margin-bottom: 0;
}
.social a {
    color: #fff;
}
.social p {
    margin-bottom: 2rem;
}
.social .social-icons {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    margin-top: 2rem;
}
/* Footer */
.footer {
    background: var(--dark-color);
    color: #fff;
    border-top: 1px solid #384653;
    padding: 0.5rem 2rem;
}
.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer a, footer a {
    color: #fff;
}

.footer ul {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}
/* Inner header */
.inner-header {
    background: var(--primary-color);
    color: #fff;
    height: 250px;
    padding-top: 8rem;
}
.inner-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-links a:hover {
    color:  var(--secondary-color);
}
/* Contact Form */
.contact-form p {
    margin-bottom: 3rem;
}
.contact-form input,
.contact-form textarea {
    display: block;
    font-family: inherit;
    font-size: medium;
    width: 100%;
    margin: 1.5rem 0;
    border: 1px solid #ccc;
    padding: 1.2rem 1rem;
}
.contact-form textarea {
    height: 200px;
}
.contact-form .btn {
    display: block;
    width: 100%;
    font-size: inherit;
    font-family: inherit;
    margin: 0 auto;
}

/* Location */
.location h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.location p {
    margin-bottom: 2rem;
}
.location .map {
    overflow: hidden;
    position: relative;
    height: 0;
    margin-bottom: 3rem;
    padding-bottom: 50%;
    border-radius: 0.25rem;
}
.location .map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Media query  */
@media (max-width: 1200px) {
    .hero .hero-flex {
        gap: 2rem;
    }
    .hero img {
        max-width: 500px;
        margin-right: 0;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .topics {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .hero {
        text-align: center;
    }
    .hero .hero-flex {
        flex-direction: column;
        padding-bottom: 4rem;
    }
    .hero img {
        max-width: 600px;
        margin-top: 2rem;
    }
    .topics {
        grid-template-columns: repeat(2, 1fr);
        place-self: center;
    }
    .chapter-cards,
     .takeaways-cards {
        grid-template-columns: 1fr;
    }
    .details-flex,
    .details + .details .details-flex,
    .stats .stats-flex {
      flex-direction: column;
      gap: 2rem;
    }
   

}
/* Add media query for devices with width less than 247px */
@media (max-width: 247px) {
  /* Allow the body to scroll horizontally */
  body {
    min-width: 100vw;  /* Make sure the body spans the entire width */
    overflow-x: auto;  /* Enable horizontal scrolling */
    white-space: nowrap;  /* Prevent content from wrapping */
  }

  /* Make sure the navigation bar and other large elements are horizontally scrollable */
  .navbar, .hero, .learn, .chapters, .summary, .info {
    min-width: 100vw;  /* Ensure the sections fill the screen width */
    white-space: nowrap;
  }

  /* Adjust the navbar items layout for smaller screens */
  .navbar-flex {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  /* Ensure mobile menu is also adjusted for smaller screens */
  .mobile-menu-toggle {
    display: block;
  }

  /* Make the main menu items scrollable horizontally */
  .main-menu-list, .mobile-menu-list {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .main-menu-list li, .mobile-menu-list li {
    margin: 0 10px;
  }

  /* Prevent text or images from getting cut off */
  img, h1, h2, h3, p {
    max-width: 100%;  /* Make sure elements resize properly */
    box-sizing: border-box;
  }

  /* Adjust the layout of other sections, such as hero, learn, and chapters */
  .hero-content, .topics, .chapter-cards {
    width: 100%;
    box-sizing: border-box;
  }

  .topic, .card {
    display: inline-block;
    margin-right: 10px;
    width: 90vw;  /* Ensure items are properly sized for smaller screens */
    white-space: normal;  /* Allow text to wrap */
  }

  /* Ensure content is scrollable horizontally when needed */
  .learn, .chapters, .summary, .info {
    overflow-x: auto;
    white-space: nowrap;
  }
}
/* Add this at the end of your CSS or within the relevant media query */

/* For screens with a width of 355px or less, make the whole page scrollable */
@media screen and (max-width: 355px) {
    html, body {
        overflow: auto; 
        width: 100%; 
        height: 100%; 
        overflow-x: auto; 
        overflow-y: auto; 
    }

    
    .container, .container-sm {
        width: 100%;
        padding: 0 2rem; 
    }

    
    .navbar, .hero, .info-container {
        overflow: auto;
    }
}

@media (max-width: 768px) {
    .main-menu-items,
    .info-left {
        display: none;
    }
    .mobile-menu-list {
        padding: 40px;
    }
    .navbar .mobile-menu {
        display: block;

    }
    .info-container {
        flex-direction: column;
    }
    .info-content {
        padding: 2rem;
    }
    .info-content h2 {
        font-size: 1.5rem;
    }
    .info-content p {
        font-size: 1rem;
    }
    .footer-flex {
        display: flex;
        justify-content: center;
        flex-direction: column;
        padding-bottom: 2rem;
    }
    .social .social-icons {
        flex-wrap: wrap;
    }
    .footer {
        padding: 0.5rem 1.2rem;
    }
    .social p {
        font-size: 1.2rem;
    }
    .social i {
        font-size: 2rem;
    }
    
}
@media (max-width: 576px) {
    .hero h1 {
        font-size: 2.5;
    }
    .hero img {
        max-width: 350px;
    }
    .hero {
        padding-right: 0.2rem;
        padding-left: 0.2rem;
    }
    .topics {
        grid-template-columns: 1fr;
        place-self: center;
    }
    .summary .container {
        padding: 0;
    }
    .stats .stats-numbers {
        flex-direction: column;
    }
    .newsletter h2 {
        font-size: 1.5rem;
    }
    .newsletter p {
        display: none;
    }
    .footer-flex {
        display: flex;
        justify-content: center;
        flex-direction: column;
        padding-bottom: 2rem;
    }
    .social .social-icons {
        flex-wrap: wrap;
    }
    
}
