/* WiseHub Styles - Modern e-learning marketing website */

/* Reset and Base Styles */
:root {
    --primary: #ffffff;
    --secondary: #7c7c7c;
    --highlight: #c2c2c2;
    --dark: #222;
    --light: #fff;
    --gray: #f5f5f5;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--dark);
    color: var(--light);
    border-radius: 50px;
    transition: var(--transition);
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--dark);
}

.btn:hover {
    background-color: transparent;
    color: var(--dark);
}

.enroll-btn {
    margin-top: 30px;
    background-color: var(--dark);
    color: var(--light);
    font-size: 1.1rem;
}

.enroll-btn:hover {
    background-color: transparent;
    color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 4px;
    background-color: var(--secondary);
    margin: 15px auto 0;
}

/* Course page specific header styles */
.course-header {
    background-color: var(--light);
}

.course-header .nav-link {
    color: var(--dark);
}

.course-header .logo-white {
    opacity: 0;
}

.course-header .logo-dark {
    opacity: 1;
}

.course-header .bar {
    background-color: var(--dark);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled {
    background-color: var(--light);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header.scrolled .logo {
    transform: scale(0.8);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 50px;
    transition: var(--transition);
}

.logo-container {
    position: relative;
}

.logo {
    height: 50px;
    transition: var(--transition);
}

.logo-white {
    opacity: 1;
    transition: var(--transition);
}

.logo-dark {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: var(--transition);
}
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 30px;
    position: relative;
}

.nav-link {
    /*font-weight: 600;*/
    color: var(--light);
    transition: var(--transition);
}

/* Change logo on scroll */
.header.scrolled .logo-white {
    opacity: 0;
}

.header.scrolled .logo-dark {
    opacity: 1;
}

.scrolled .nav-link {
    color: var(--dark);
}

.nav-link:hover {
    color: var(--highlight);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--light);
    transition: var(--transition);
}

.scrolled .bar {
    background-color: var(--dark);
}

/* Hero Section */
/*.hero {
    height: 100vh;
    background: url('assets/panoramic2.jpg') no-repeat center center/cover;
    position: relative;
    color: var(--light);
    display: flex;
    align-items: center;
    text-align: center;
}*/

.hero {
    height: 100vh;
    position: relative;
    color: var(--light);
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden;
    width: 100%;
}

.hero-video {
    position: fixed; /* Change to fixed to cover entire viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    z-index: -1;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/*.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
}*/

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.logo-large {
    width: 300px;
    margin-bottom: 30px;
    animation: float 3s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.carousel-container {
    height: 180px;
    overflow: hidden;
    margin-bottom: 40px;
    position: relative;
}

.carousel-track {
    position: relative;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.5s ease, transform 3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.carousel-slide.prev {
    transform: translateX(-100%);
}

.carousel-heading {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.carousel-text {
    font-size: 1.1rem;
    max-width: 80%;
    margin: 0 auto;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 8px;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: var(--light);
    transform: scale(1.3);
}

/* Who We Are Section */
.who-we-are {
    background-color: rgb(0, 0, 0);
    color: white;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    background-color: rgb(0, 0, 0);
    color: rgb(0, 0, 0); /* This ensures text remains visible on black background */
    padding: 2rem;
    border-radius: 8px;    
}

.info-card {
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(99, 99, 99, 0.1);
    transition: var(--transition);
    text-align: center;
}

.info-card:hover {
    transform: translateY(-10px);
}

.icon {
    position: relative;
    width: 100%;
    max-width: 80px; /* Maximum width of the icon */
    margin: 0 auto;
    aspect-ratio: 1; /* Creates a perfect square */
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Maintains aspect ratio of the image */
}

.icon svg {
    width: 100%;
    height: 100%;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .icon {
        max-width: 60px; /* Slightly smaller on mobile devices */
    }
}

@media screen and (max-width: 480px) {
    .icon {
        max-width: 50px; /* Even smaller on very small screens */
    }
}

.info-card-icon {
    color: white;
    font-size: 48px;
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: rgb(0, 0, 0);
}

.info-card svg {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    fill: var(--primary);
}

/* Courses Section */
.courses {
    background-color: var(--light);
    color: black;
}

.courses .section-title h2 {
    color: black;
}
.course-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/*.course-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    background-color: var(--light);
}*/

.course-card:hover {
    transform: translateY(-10px);
}

.course-card {
    position: relative;
    width: 100%;
    height: 400px; /* Adjust height as needed */
    overflow: hidden;
    border-radius: 8px;
}

.course-card .course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.course-card:hover .course-content {
    transform: translateY(0);
}

/*.course-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}*/

.course-content {
    padding: 25px 20px;
}

.course-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.udemy-logo {
    height: 20px;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--dark);
    color: var(--light);
}

.testimonials .section-title::after {
    background-color: var(--highlight);
}

.testimonials .section-title h2 {
    color: var(--light);
}

.testimonials-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark);
    font-size: 2rem;
    font-weight: 600;
}

.testimonial-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 30px;
}

.testimonial-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 25px;
    border: 4px solid var(--secondary);
}

.testimonial-text {
    font-size: 1.1rem;
    max-width: 80%;
    margin: 0 auto 20px;
    font-style: italic;
}

.testimonial-name {
    font-weight: 600;
    font-size: 1.2rem;
}

.testimonial-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--light);
    color: var(--dark);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.arrow:hover {
    background-color: var(--highlight);
}

/* Newsletter Section */
.newsletter {
    background-color: var(--light);
}

.newsletter .section-title h2 {
    color: black;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content p {
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid var(--dark);  /* Changed to solid black border */
    font-size: 1rem;
    width: 100%;
    transition: var(--transition);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--dark);  /* Keep border black when focused */
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);  /* Optional: subtle focus shadow */
}

@media (min-width: 768px) {
    .newsletter-form {
        flex-direction: row;
        gap: 15px;
    }

    .newsletter-input {
        flex: 1;
    }
}

.newsletter-btn {
    padding: 12px 30px;
    background-color: var(--dark);
    color: var(--light);
    border: none;
    border-radius: 50px;  /* Makes the button round */
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.newsletter-btn:hover {
    background-color: var(--highlight);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 15px;
    height: 40px;
}

.footer-social {
    display: flex;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 15px;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--secondary);
    transform: translateY(-5px);
}

.footer-links h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-links h4::after {
    content: "";
    display: block;
    width: 50%;
    height: 3px;
    background-color: var(--secondary);
    margin-top: 10px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animation for Fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Course Testimonials Specific Styles */
.course-testimonials-section {
    margin-top: 4rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.course-testimonials-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark);
    font-size: 2rem;
    font-weight: 600;
}

.course-testimonial-slider {
    position: relative;
    overflow: visible; /* Change from hidden to visible */
    padding: 0 40px;
    margin-top: 2rem;
}

.course-testimonial-track {
    overflow: hidden; /* Add overflow hidden to track instead */
    display: flex;
    transition: transform 0.5s ease;
}

.course-testimonial-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 30px;
}

.course-testimonial-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 25px;
    border: 4px solid var(--secondary);
}

.course-testimonial-text {
    font-size: 1.1rem;
    max-width: 80%;
    margin: 0 auto 20px;
    font-style: italic;
    color: var(--dark);
}

.course-testimonial-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--dark);
}

.course-testimonial-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% + 40px); /* Increase width to show full arrows */
    left: -20px; /* Offset to align with slider */
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.course-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--dark);
    color: var(--light);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    margin: 0 10px; /* Add margin for spacing */
}

/* Course Detail Page Styles */
.course-banner {
    height: 400px;
    background-position: center;
    background-size: cover;
    position: relative;
    color: var(--light);
    display: flex;
    align-items: flex-end;
    background-image: url('assets/panoramic2.jpg'); /* Add default background */
}

.course-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
}

.course-banner-content {
    position: relative;
    z-index: 1;
    padding-bottom: 50px;
}

.course-banner-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.course-details {
    padding: 80px 0;
}

/*.course-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.course-overview h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.course-video {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}*/

.course-details-grid {
    display: grid;
    grid-template-columns: 1fr;  /* Changed from 1fr 1fr to just 1fr */
    gap: 30px;  /* Reduced gap since elements are now stacked */
}

/* Ensure proper video sizing */
.course-video {
    width: 100%;
    max-width: 800px;  /* Optional: limit maximum width */
    margin: 0 auto 30px;  /* Centers video and adds bottom spacing */
}

/* Adjust course overview spacing */
.course-overview {
    width: 100%;
    max-width: 800px;  /* Optional: limit maximum width */
    margin: 0 auto;  /* Centers content */
}

.course-video iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.enroll-btn {
    margin-top: 30px;
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--dark);  /* Black background */
    color: var(--light);           /* White text */
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
    border: 2px solid var(--dark); /* Add border to ensure visibility */
}

.enroll-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background-color: var(--light); /* White background on hover */
    color: var(--dark);            /* Black text on hover */
    border-color: var(--dark);     /* Keep border on hover */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .section {
        padding: 70px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .nav-menu {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--light);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        opacity: 0;
        z-index: 99;
    }
    
    .nav-menu.active {
        top: 0;
        opacity: 1;
    }
    
    .nav-item {
        margin: 20px 0;
    }
    
    .nav-link {
        color: var(--dark);
        font-size: 1.4rem;
    }
    
    .hamburger {
        display: block;
        z-index: 100;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hamburger.active .bar {
        background-color: var(--dark);
    }
    
    .carousel-heading {
        font-size: 2rem;
    }
    
    .carousel-text {
        font-size: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input {
        border-radius: 50px;
        margin-bottom: 15px;
    }
    
    .newsletter-btn {
        border-radius: 50px;
        width: 100%;
        padding: 15px;
    }
    
    .course-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-content > div {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .course-details-grid {
        grid-template-columns: 1fr;
    }
    
    .course-video {
        margin-top: 30px;
    }
}

/* Form Messages */
.form-message {
    margin-top: 1rem;
    padding: 0.5rem;
    text-align: center;
    border-radius: 4px;
    display: none;
    transition: opacity 0.3s ease;
}

.form-message.success {
    display: block;
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.form-message.error {
    display: block;
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}