/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables (වර්ණ මෙතැනින් වෙනස් කරන්න) --- */
:root {
    --primary-color: #005A9C;  /* AITS Logo Blue */
    --secondary-color: #D4AF37; /* AITS Logo Gold */
    --dark-color: #1a1a1a;
    --text-color: #555;
    --light-color: #f8f9fa;
    --white-color: #ffffff;
    --border-color: #eaeaea;
    --border-radius: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    --transition: all 0.3s ease;
}

/* --- Global Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white-color);
    overflow-x: hidden; /* Prevents horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.1rem; }

p {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 300;
}
p:last-child {
    margin-bottom: 0;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}
a:hover {
    color: var(--secondary-color);
}
ul { list-style: none; }
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--light-color); }
.text-center { text-align: center; }

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.section-title .subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}
.section-title h2 {
    color: var(--primary-color);
}
.section-title p {
    font-size: 1.1rem;
    font-weight: 300;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    border: 2px solid transparent;
}
.btn-lg {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}
.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), #007bff);
    color: var(--white-color);
    box-shadow: 0 5px 15px rgba(0, 90, 156, 0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 90, 156, 0.5);
    color: var(--white-color);
}
.btn-secondary {
    background-color: var(--white-color);
    color: var(--primary-color);
    border-color: var(--white-color);
}
.btn-secondary:hover {
    background-color: transparent;
    color: var(--white-color);
    transform: translateY(-3px);
}
.btn-secondary-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-secondary-outline:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* --- Header & Navigation --- */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}
.header.sticky {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: var(--white-color);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.logo img {
    height: 45px;
}
.logo span {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
}
.nav-menu-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}
.nav-menu {
    display: flex;
    gap: 2.5rem;
}
.nav-link {
    font-weight: 600;
    color: var(--dark-color);
    position: relative;
    padding: 0.5rem 0;
    font-size: 1rem;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 50%;
}
.nav-link.active {
    color: var(--primary-color);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.hamburger {
    display: none;
    cursor: pointer;
}
.bar {
    display: block;
    width: 28px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/hero-bg.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    color: var(--white-color);
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 90, 156, 0.85), rgba(0, 50, 80, 0.75));
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
}
.hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    color: var(--white-color);
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.3rem;
    margin: 1.5rem 0 2.5rem 0;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* --- Stats Section --- */
.stat-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-10px);
}
.stat-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}
.stat-card p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

/* --- Featured Courses Section --- */
.course-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}
.course-image-wrapper {
    position: relative;
}
.course-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.course-duration {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--secondary-color);
    color: var(--dark-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}
.course-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.course-content h3 {
    color: var(--primary-color);
}
.course-content p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* --- Why Choose Us Section --- */
.why-choose-us-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.features-list {
    margin-top: 2rem;
}
.features-list li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.features-list i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-top: 5px;
}
.features-list h4 {
    font-size: 1.2rem;
    color: var(--dark-color);
}

/* --- Testimonials Section --- */
.testimonial-card {
    background-color: var(--white-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border-top: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
    position: relative;
}
.testimonial-card::before {
    content: '\f10d'; /* Font Awesome quote-left */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--secondary-color);
    font-size: 3rem;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    opacity: 0.1;
}
.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}
.testimonial-author h4 {
    margin-bottom: 0;
    color: var(--dark-color);
}
.testimonial-author span {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* --- CTA Section --- */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    padding: 80px 0;
}
.cta h2 {
    color: var(--white-color);
    font-size: 2.5rem;
}
.cta p {
    font-size: 1.2rem;
    margin: 1rem 0 2rem 0;
    color: rgba(255, 255, 255, 0.9);
}
.cta .btn-primary {
    background: var(--white-color);
    color: var(--primary-color);
    box-shadow: none;
}
.cta .btn-primary:hover {
    background: var(--light-color);
    color: var(--primary-color);
    transform: translateY(-3px) scale(1.05);
}

/* --- Footer --- */
.footer {
    background-color: var(--dark-color);
    color: #ccc;
    padding: 80px 0 0 0;
}
.footer .logo img {
    height: 45px;
    margin-bottom: 1rem;
}
.footer p {
    font-size: 0.95rem;
    color: #ccc;
    font-weight: 300;
}
.footer-col h4 {
    color: var(--white-color);
    margin-bottom: 1.5rem;
    position: relative;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}
.footer-col ul li {
    margin-bottom: 0.75rem;
}
.footer-col ul li a {
    color: #ccc;
    font-size: 0.95rem;
    font-weight: 300;
    display: flex;
    align-items: center;
}
.footer-col ul li a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}
.footer-col ul li i {
    margin-right: 10px;
    font-size: 0.8rem;
    color: var(--secondary-color);
}
.footer-col ul li i.fa-map-marker-alt, 
.footer-col ul li i.fa-envelope, 
.footer-col ul li i.fa-phone, 
.footer-col ul li i.fa-whatsapp {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.social-links a {
    display: flex;
    width: 45px;
    height: 45px;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    font-size: 1.1rem;
    transition: var(--transition);
}
.social-links a:hover {
    background-color: var(--primary-color);
    transform: scale(1.1) rotate(360deg);
}
.footer-bottom {
    border-top: 1px solid #444;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.9rem;
    font-weight: 300;
}

/* ============================================ */
/* SUB-PAGES (About, Courses, Contact) */
/* ============================================ */

/* --- Page Header --- */
.page-header {
    background: linear-gradient(135deg, rgba(0, 90, 156, 0.9), rgba(0, 50, 80, 0.85)), url('../images/page-header-bg.jpg') no-repeat center center/cover;
    color: var(--white-color);
    padding: 100px 0;
    text-align: center;
    margin-top: 80px; /* Offset for sticky header */
}
.page-header h1 {
    color: var(--white-color);
    font-size: 3.2rem;
}
.page-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 1rem auto 0;
    font-weight: 300;
}

/* --- About Page --- */
.about-story-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.about-story-content h3 {
    color: var(--primary-color);
    margin-top: 2rem;
}
.faculty-card {
    background-color: var(--white-color);
    padding: 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.faculty-card:hover {
    transform: translateY(-10px);
}
.faculty-card img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 5px solid var(--primary-color);
}
.faculty-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}
.faculty-card span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 1rem;
}

/* --- Courses Page --- */
.course-list-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    background-color: var(--white-color);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    overflow: hidden;
    transition: var(--transition);
}
.course-list-item:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.course-list-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 350px;
}
.course-list-content {
    padding: 2.5rem;
}
.course-list-content h2 {
    color: var(--primary-color);
}
.course-meta {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}
.course-meta span {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1rem;
}
.course-meta span i {
    margin-right: 8px;
    color: var(--secondary-color);
}
.course-list-content h4 {
    margin-top: 1.5rem;
    color: var(--dark-color);
}
.course-learn-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
    margin: 1rem 0 2rem 0;
}
.course-learn-list li {
    display: flex;
    align-items: center;
    font-weight: 300;
}
.course-learn-list li i {
    color: var(--secondary-color);
    margin-right: 10px;
}

/* --- Contact Page --- */
.grid-2-contact {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}
.contact-details-list {
    list-style: none;
}
.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.contact-detail-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-top: 5px;
    width: 40px;
    text-align: center;
}
.contact-detail-item h4 {
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}
.contact-detail-item a {
    font-weight: 600;
    font-size: 1.1rem;
}
.contact-detail-item p {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}
.contact-form-container {
    background-color: var(--white-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 90, 156, 0.1);
}
.contact-form button {
    width: 100%;
    font-size: 1.1rem;
}
.map-section {
    padding: 0;
    margin: 0;
    line-height: 0;
}

/* ============================================ */
/* ANIMATIONS */
/* ============================================ */

/* --- Hero Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }

/* --- Scroll Animations --- */
.animate-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.animate-scroll.delay-1 { transition-delay: 0.2s; }
.animate-scroll.delay-2 { transition-delay: 0.4s; }
.animate-scroll.delay-3 { transition-delay: 0.6s; }

/* ============================================ */
/* RESPONSIVE (Mobile & Tablet) */
/* ============================================ */

@media(max-width: 992px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-2, .grid-2-contact, .course-list-item {
        grid-template-columns: 1fr;
    }
    .course-list-image {
        height: 300px;
    }
    .nav-menu-wrapper {
        justify-content: flex-end;
    }
    .nav-menu {
        display: none; /* Hide on tablet/mobile by default */
    }
    .nav-cta {
        display: none; /* Hide CTA button on tablet/mobile */
    }
    .hamburger {
        display: block; /* Show hamburger */
    }
    .nav-menu-wrapper.active {
        display: block;
        position: fixed;
        left: 0;
        top: 80px; /* Below header */
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 2rem;
    }
    .nav-menu-wrapper.active .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    .nav-menu-wrapper.active .nav-link {
        font-size: 1.5rem;
    }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .hero-title { font-size: 3rem; }
    .footer { text-align: center; }
    .footer-col { margin-bottom: 2rem; }
    .footer-col h4::after { left: 50%; transform: translateX(-50%); }
    .social-links { justify-content: center; }
}

@media(max-width: 576px) {
    h1, .hero-title, .page-header h1 { font-size: 2.5rem; }
    h2, .cta h2 { font-size: 1.8rem; }
    
    .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    .stat-card {
        padding: 1.5rem;
    }
    .course-learn-list {
        grid-template-columns: 1fr;
    }
    .contact-form-container {
        padding: 1.5rem;
    }
}