/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/*===== VARIABLES CSS =====*/
:root {
  --header-height: 4.5rem;

  /*========== Modern Tech Colors ==========*/
  --first-color: #2563eb; /* Modern Blue */
  --first-color-alt: #1d4ed8;
  --title-color: #1e293b;
  --text-color: #64748b;
  --text-color-light: #94a3b8;
  --body-color: #f8fafc;
  --container-color: #ffffff;
  
  /* Gradints & Shadows */
  --gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /*========== Font typography ==========*/
  --body-font: 'Poppins', sans-serif;
  --biggest-font-size: 2.25rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;

  /*========== Margins ==========*/
  --mb-1: .5rem; --mb-2: 1rem; --mb-3: 1.5rem;
  --mb-4: 2rem; --mb-5: 2.5rem; --mb-6: 3rem;
}

@media screen and (min-width: 768px){
  :root{
    --biggest-font-size: 3.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
  }
}

/*========== BASE ==========*/
*,::before,::after{
  box-sizing: border-box;
}

html{
  scroll-behavior: smooth;
}

/*========== Variables Dark theme ==========*/
body.dark-theme{
  --title-color: #f1f5f9;
  --text-color: #94a3b8;
  --body-color: #0f172a;
  --container-color: #1e293b;
}

body{
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: .3s; /* For dark mode smooth transition */
}

h1,h2,h3,p,ul{ margin: 0; }
ul{ padding: 0; list-style: none; }
a{ text-decoration: none; }
img{ max-width: 100%; height: auto; display: block; }

/*========== REUSABLE CLASSES ==========*/
.section{ padding: 6rem 0 2rem; }
.section-title{
  font-size: var(--h1-font-size);
  color: var(--title-color);
  text-align: center;
  margin-bottom: var(--mb-3);
}
.section-subtitle{
  display: block;
  text-align: center;
  color: var(--first-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--mb-1);
}

.bd-container{
  max-width: 1024px;
  width: calc(100% - 2rem);
  margin-left: auto;
  margin-right: auto;
}

.bd-grid{
  display: grid;
  gap: 1.5rem;
}

/*========== HEADER & NAV ==========*/
.l-header{
  width: 100%;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  background-color: var(--body-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav{
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo{
  font-weight: 700;
  color: var(--title-color);
  font-size: 1.3rem;
}
.nav__logo span{ color: var(--first-color); }

@media screen and (max-width: 768px){
  .nav__menu{
    position: fixed;
    top: -100%; left: 0;
    width: 100%;
    padding: 2rem 0;
    background-color: var(--container-color);
    transition: .4s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 0 0 1.5rem 1.5rem;
    text-align: center;
  }
}

.nav__item{ margin-bottom: var(--mb-3); }
.nav__link{
  color: var(--text-color);
  font-weight: 500;
  transition: .3s;
}
.nav__link:hover, .active-link{ color: var(--first-color); }

.nav__toggle, .change-theme{
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--title-color);
}

.show-menu{ top: var(--header-height); }

/*========== HOME ==========*/
.home__container{
  row-gap: 2rem;
  padding: 2rem 0;
}

.home__title{
  font-size: var(--biggest-font-size);
  color: var(--title-color);
  line-height: 1.2;
  margin-bottom: var(--mb-2);
}
.home__title span{
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home__description{ margin-bottom: var(--mb-4); }

.home__img{
  width: 280px;
  justify-self: center;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.1));
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/*========== BUTTONS ==========*/
.button{
  display: inline-block;
  background: var(--gradient);
  color: #FFF;
  padding: 1rem 1.75rem;
  border-radius: .75rem;
  font-weight: 600;
  transition: .3s;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.button:hover{
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.button--ghost{
  background: transparent;
  color: var(--first-color);
  border: 2px solid var(--first-color);
  box-shadow: none;
  margin-left: 1rem;
}

/*========== GALLERY (PRODUCT CARDS) ==========*/
.product__container{
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.product__card{
  background-color: var(--container-color);
  padding: 1rem;
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  transition: .3s;
}

.product__card:hover{
  transform: translateY(-10px);
}

.product__img{
  border-radius: 1rem;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/*========== COURSES (COLLAPSIBLE) ==========*/
.courses__list{
  max-width: 700px;
  margin: 0 auto;
}

.collapsible {
  background-color: var(--container-color);
  color: var(--title-color);
  cursor: pointer;
  padding: 1.25rem;
  width: 100%;
  border: 1px solid rgba(0,0,0,0.05);
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  border-radius: .75rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: .3s;
}

.collapsible:after {
  content: '\ea4e'; /* Remix Icon Arrow down */
  font-family: 'remixicon';
  transition: .3s;
}

.collapsible.active:after { transform: rotate(180deg); }

.collapsible:hover, .collapsible.active {
  background-color: var(--first-color);
  color: #FFF;
}

.content {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  background-color: transparent;
}

/*========== FOOTER ==========*/
.footer__container{
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  row-gap: 2rem;
}

.footer__logo{
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--first-color);
}

.footer__socials{ margin-top: 1rem; }
.footer__social{
  font-size: 1.5rem;
  color: var(--text-color);
  margin-right: 1.5rem;
  transition: .3s;
}
.footer__social:hover{ color: var(--first-color); }

.footer__copy{
  text-align: center;
  font-size: var(--small-font-size);
  margin-top: 4rem;
  color: var(--text-color-light);
}

/*========== MEDIA QUERIES ==========*/
@media screen and (min-width: 768px){
  .home__container{
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    column-gap: 4rem;
  }
  .home__img{ width: 450px; }
  .home__data{ text-align: left; }
  
  .nav__list{ display: flex; column-gap: 2rem; }
  .nav__item{ margin-bottom: 0; }
  .nav__toggle{ display: none; }
  
  .section{ padding: 8rem 0 4rem; }
}

/*========== REGISTRATION FORM STYLES ==========*/
.registration__form {
    background-color: var(--container-color); /* පසුබිම් පාට */
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow); /* Shadow එක */
    max-width: 500px; /* Form එකේ උපරිම පළල */
    margin: 0 auto; /* මැදට ගන්න */
    text-align: center;
}

.registration__inputs {
    display: flex; /* Flexbox පාවිච්චි කරන්න */
    flex-direction: column; /* Input fields එක යට එක එන විදිහට හදන්න */
    gap: 1.5rem; /* Input අතර පරතරය */
    margin-bottom: 2rem;
}

.registration__input {
    width: 100%; /* සම්පූර්ණ පළල ගන්න */
    padding: 1rem;
    background-color: var(--body-color);
    color: var(--text-color);
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: .5rem;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    outline: none;
    transition: .3s;
}

/* Input එකක් select කළාම පාට වෙනස් වෙන්න */
.registration__input:focus {
    border-color: var(--first-color); 
    background-color: var(--container-color);
}

/*========== MODERN CONTACT SECTION STYLES (FIXED) ==========*/

/* 1. Phone & Default View (හැම තිරයකටම පොදු) */
.contact__container {
    display: grid; /* Grid එකක් බව තහවුරු කිරීම */
    gap: 2rem;
}

.contact__content .section-title,
.contact__content .section-subtitle,
.contact__content .contact__description {
    text-align: left;
}

.contact__info-wrapper {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.contact__info-item {
    display: flex;
    align-items: center;
    column-gap: 1rem;
}

.contact__icon {
    font-size: 1.8rem;
    color: var(--first-color);
    background-color: var(--container-color);
    padding: 0.5rem;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.contact__info-title {
    font-size: 1rem; /* font size eka hariyatama dunna */
    font-weight: 600;
    color: var(--title-color);
}

.contact__info-text {
    font-size: 0.875rem;
    color: var(--text-color);
}

/* Map Styles */
.contact__map iframe {
    width: 100%;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    filter: grayscale(20%) invert(92%) contrast(83%);
    transition: .3s;
}

.contact__map iframe:hover {
     filter: none;
}

/* 2. PC / Laptop View (තිරය ලොකු නම් විතරක් දෙපැත්තට බෙදන්න) */
@media screen and (min-width: 768px) {
    .contact__container {
        grid-template-columns: repeat(2, 1fr) !important; /* Force 2 columns */
        align-items: center; /* මැදට කෙළින් කරන්න */
        column-gap: 4rem;
    }
    
    .contact__map iframe {
        height: 450px; /* PC එකේදී Map එකේ උස */
    }

    .contact__content {
        text-align: left;
    }
}