*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #fc5d66;
    --secondary-color: rgb(253, 195, 95);
    --light-color: #f9fafb;
    --dark-color: #272d35;
}

html,
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Ensure all iframes are responsive */
iframe {
    max-width: 100%;
    height: auto;
    width: 100%;
    display: block;
}

/* Additional video responsiveness */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
    max-width: 100%;
    max-height: 100%;
}

/* Universal video responsiveness */
.video-container,
.video-container iframe,
.responsive-iframe {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

/* Ensure videos scale properly on all devices */
@media screen and (max-width: 100vw) {
    .video-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .video-container iframe {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
    }
}

/* Override Materialize CSS grid conflicts */
.video-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    margin-top: 3rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    justify-items: center !important;
}

.video-grid .video-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 0 !important;
    overflow: hidden !important;
    padding-top: 56.25% !important;
    position: relative !important;
    margin: 0 auto !important;
}

.video-grid .video-container iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 8px !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Override Materialize row/col classes when used with video-grid */
.video-grid .row,
.video-grid .col {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    display: block !important;
}

/* Override all Materialize CSS grid classes that might interfere */
.video-grid .row,
.video-grid .col,
.video-grid .s1, .video-grid .s2, .video-grid .s3, .video-grid .s4, .video-grid .s5, .video-grid .s6,
.video-grid .s7, .video-grid .s8, .video-grid .s9, .video-grid .s10, .video-grid .s11, .video-grid .s12,
.video-grid .m1, .video-grid .m2, .video-grid .m3, .video-grid .m4, .video-grid .m5, .video-grid .m6,
.video-grid .m7, .video-grid .m8, .video-grid .m9, .video-grid .m10, .video-grid .m11, .video-grid .m12,
.video-grid .l1, .video-grid .l2, .video-grid .l3, .video-grid .l4, .video-grid .l5, .video-grid .l6,
.video-grid .l7, .video-grid .l8, .video-grid .l9, .video-grid .l10, .video-grid .l11, .video-grid .l12 {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    display: block !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-sm {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 0;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    background: #000;
}

.responsive-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    object-fit: cover;
    background: #000;
}

/* Video Section */
.video-section {
    background: var(--light-color);
    padding: 6rem 0;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    justify-items: center;
}

/* Ensure videos never overflow */
.video-grid .video-container {
    overflow: hidden;
    position: relative;
}

.video-grid .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    overflow: hidden;
}

.video-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.video-info {
    padding: 2rem;
}

.video-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.video-info p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

.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;
}

/* Text Classes */
.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.section {
  margin: 4rem 0;
}

/* Section Header */
.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;
}

/* Card */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.75rem;
  background: #fff;
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.3);
}

/* Navbar */
.navbar {
  background: transparent;
  color: white;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  transition: background-color 0.5s ease-in-out;
}

.navbar.navbar-scroll {
  background-color: rgba(235, 77, 85, 0.8);
  backdrop-filter: blur(10px);
}

.navbar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar img {
  width: 200px;
  height: 150px;
}

.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.5rem;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
}

.navbar .mobile-menu-toggle {
  color: #fff;
  cursor: pointer;
}

.navbar .mobile-menu-items {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 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.3s ease;
}

.navbar .mobile-menu-items.active {
  transform: translateX(0);
}

.navbar .mobile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-size: 1.2rem;
}

/* Hero */
.hero {
  background: #000 url('../images/canada/canada-background-min.png') 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%;
  height: 100px;
}

/* Learn Topics */
.topics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.topic img {
  transition: transform 0.3s;
}

.topic img:hover {
  transform: scale(1.1);
}

.topic h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

/* 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%;
}

/* Details */
.details .details-flex {
  display: flex;
  gap: 4rem;
  align-items: center;
  justify-content: center;
}

.details img {
  width: 100%;
  max-width: 500px;
}

.details h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.details .heading-border {
  margin: 0;
}

.details p {
  margin: 1rem 0 2rem;
}

/* 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;
}

/* Social */
.social {
  background: var(--dark-color);
  color: #fff;
  padding: 6rem 2rem;
  text-align: center;
  font-size: 1.7rem;
  margin-bottom: 0;
}

.social a,
.footer a {
  color: #fff;
}

.social a:hover,
.footer a:hover {
  color: var(--secondary-color);
}

.social p {
  margin-bottom: 2rem;
}

.social .social-icons {
  display: flex;
  justify-content: center;
  gap: 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 ul {
  display: flex;
  flex-wrap: wrap;
  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;
}

/* 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 Queries */
@media (max-width: 2000px) {
  .hero .hero-flex {
    gap: .5rem;
  }

  .hero img {
    max-width: 500px;
    margin-right: 0;
  }

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

  .topics {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-flex {
    flex-direction: column;
    text-align: center;
  }
}
/* Extra small devices (phones, 320px and up) */
@media (min-width: 320px) {
    .video-container {
        margin-bottom: 1rem;
        padding-top: 56.25%; /* Maintain 16:9 aspect ratio */
        width: 100%;
        max-width: 100%;
    }
    
    .video-grid {
        gap: 1rem;
        width: 100%;
    }
    
    .responsive-iframe {
        width: 100%;
        height: 100%;
        max-width: 100%;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .video-container {
        margin-bottom: 1.5rem;
    }
    
    .video-grid {
        gap: 1.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .video-container {
        margin-bottom: 2rem !important;
    }
    
    /* Override Materialize responsive classes */
    .video-grid .col.s12,
    .video-grid .col.m6,
    .video-grid .col.l6 {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        display: block !important;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .video-grid {
        gap: 3rem;
    }
    
    .video-container {
        margin-bottom: 2.5rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .video-grid {
        gap: 3.5rem;
    }
    
    .video-container {
        margin-bottom: 3rem;
    }
}

/* Ultra large devices (very large desktops, 1400px and up) */
@media (min-width: 1400px) {
    .video-container {}
}

@media (max-width: 1200px) {
    .hero .hero-flex {
        gap: .5rem;
    }

    .hero img {
        max-width: 500px;
        margin-right: 0;
    }

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

    .topics {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-flex {
        flex-direction: column;
        text-align: center;
    }
}

@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);
    }


    .chapter-cards,
    .takeaways-cards {
        grid-template-columns: 1fr;
    }

    .details-flex,
    .details + .details .details-flex,
    .stats .stats-flex {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-flex {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
  .main-menu-items,
  .info-left {
    display: none;
  }

  .navbar .mobile-menu {
    display: block;
  }

  .navbar .mobile-menu-toggle {
    display: block;
    padding: 10px;
  }

  .info-container {
    flex-direction: column;
  }

  .info-content {
    padding: 2rem;
  }

  .info-content h2 {
    font-size: 1.5rem;
  }

  .info-content p {
    font-size: 1rem;
  }

  .social .social-icons {
    flex-wrap: wrap;
  }

  .social p {
    font-size: 1.2rem;
  }

  .social i {
    font-size: 2rem;
  }

  .footer {
    padding: 0.5rem 1rem;
  }

  .footer-flex {
    flex-direction: column;
    text-align: center;
  }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding-right: 0.2rem;
        padding-left: 0.2rem;
    }

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

    .hero img {
        max-width: 350px;
    }

    .topics {
        grid-template-columns: 1fr;
    }

    .video-section {
        padding: 3rem 0;
    }

    .video-grid {
        gap: 1rem;
        margin-top: 2rem;
        width: 100%;
        padding: 0 0.5rem;
    }

    .video-container {
        margin-bottom: 0.5rem;
        border-radius: 6px;
        width: 100%;
        max-width: 100%;
        padding-top: 56.25%;
        overflow: hidden;
    }

    .video-container iframe {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border: 0;
    }

    .video-info {
        padding: 1rem;
    }

    .video-info h3 {
        font-size: 1.1rem;
    }

    .summary .container {
        padding: 0;
    }

    .stats .stats-numbers {
        flex-direction: column;
    }

    .newsletter h2 {
        font-size: 1.5rem;
    }

    .newsletter p {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero {
        padding-right: 0.2rem;
        padding-left: 0.2rem;
    }

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

    .hero img {
        max-width: 350px;
    }

    .topics {
        grid-template-columns: 1fr;
    }

    .video-section {
        padding: 4rem 0;
    }

    .video-grid {
        gap: 1.5rem;
    }

    .video-info {
        padding: 1.5rem;
    }

    .video-info h3 {
        font-size: 1.25rem;
    }

    .summary .container {
        padding: 0;
    }

    .stats .stats-numbers {
        flex-direction: column;
    }

    .newsletter h2 {
        font-size: 1.5rem;
    }

    .newsletter p {
        display: none;
    }
}
