/* Base & Variables */
:root {
    --primary-color: #000000;
    --text-main: #1a1a1a;
    --text-light: #4a4a4a;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --gradient-text: linear-gradient(45deg, #000000, #434343, #000000);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background: url('bg.png') no-repeat center center fixed;
    background-size: cover;
    background-color: #f5f5f7; /* Fallback */
    overflow-x: hidden;
    padding-bottom: 80px; /* Space for bottom nav */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Glassmorphism Utility */
.glass-box {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 24px;
}

/* Header */
.main-header {
    background: #fdfdfd;
    color: #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-container {
    height: 40px;
    display: flex;
    align-items: center;
}

.logo {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.header-title {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.1;
}

.title-unlocking {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--text-light);
    margin-bottom: -2px;
}

.title-chemmystery {
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(45deg, #4f46e5, #7c3aed, #3b82f6, #4f46e5);
    background-size: 90% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    color: #000000;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.action-btn:hover {
    transform: scale(1.1);
}

.call-btn i {
    transform: scaleX(-1);
    display: inline-block;
}

/* Main Content Area */
.content-area {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 40px; /* Very less gap from header */
}

/* Tabs System */
.tab-section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography & Headings */
.gradient-heading {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    margin-bottom: 5px;
    line-height: 1.2;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.sub-heading {
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.brand-heading {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin: 20px 0;
    color: var(--primary-color);
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
    color: var(--primary-color);
}

/* Slider */
.slider-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    position: relative;
    cursor: pointer;
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slider-item {
    min-width: 100%;
    flex: 0 0 100%;
    height: 100%;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Founder Section */
.founder-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}

.founder-box {
    width: 200px;
    height: auto;
    border-radius: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.founder-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.founder-title {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-light);
}

.founder-name {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* Features */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
}

.feature-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-content h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.feature-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Teachers Section */
.teachers-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.teacher-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
}

@media (min-width: 768px) {
    .teacher-card {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }
}

.teacher-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.teacher-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.teacher-qualifications p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.teacher-qualifications .sub-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 12px;
}

.teacher-contact-wrapper {
    margin-top: 15px;
}

.contact-btn {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(58, 123, 213, 0.3);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 123, 213, 0.4);
}

/* Courses Section */
.courses-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.course-card {
    width: 100%;
    max-width: 800px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.course-content-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.course-title {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
}

.enquire-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    width: fit-content;
}

.enquire-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* Gallery Section */
.gallery-grid {
    column-count: 4;
    column-gap: 15px;
}

.gallery-item {
    width: 100%;
    break-inside: avoid;
    margin-bottom: 15px;
    display: inline-block; /* Helps with break-inside rendering */
    border-radius: 12px;
    overflow: hidden;
    background: var(--glass-bg);
    padding: 8px;
    box-shadow: var(--glass-shadow);
}

@media (max-width: 900px) {
    .gallery-grid { column-count: 3; }
}
@media (max-width: 600px) {
    .gallery-grid { column-count: 2; }
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* Branch Section */
.branch-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 10px;
}

.branch-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.branch-card:hover {
    transform: translateY(-5px);
}

.branch-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.branch-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.branch-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
}

.branch-address {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.5;
}
.branch-address h1, .branch-address h2, .branch-address h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    margin-top: 10px;
}

/* About Us Section */
.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.about-text {
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.social-btn.whatsapp { background: #25D366; }
.social-btn.facebook { background: #1877F2; }
.social-btn.youtube { background: #FF0000; }
.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* PW Style Footer */
.pw-footer {
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 50px;
    padding: 40px 20px 20px;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.02);
}

.pw-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.pw-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
}

.pw-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pw-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.pw-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
}

.pw-brand-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a4a4a;
}

.pw-social-section p {
    font-weight: 600;
    margin-bottom: 15px;
    color: #000;
}

.pw-social-icons {
    display: flex;
    gap: 12px;
}

.pw-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.pw-social-btn:hover {
    transform: translateY(-3px);
}

.pw-social-btn.fb { background: #1877F2; }
.pw-social-btn.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.pw-social-btn.yt { background: #FF0000; }
.pw-social-btn.wa { background: #25D366; }

.pw-footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .pw-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.pw-copyright {
    font-size: 0.9rem;
    color: #666;
}

.pw-credit {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.pw-credit:hover {
    color: #4a4a4a;
}

.pw-credits-small {
    font-size: 0.6rem;
    color: #888;
    text-align: center;
    letter-spacing: 0.5px;
}
@media (min-width: 768px) {
    .pw-credits-small {
        text-align: right;
    }
}

/* Bottom Liquid Glass Navigation */
.bottom-nav {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px;
}

.nav-scroller {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    cursor: grab;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.nav-scroller:active {
    cursor: grabbing;
    scroll-behavior: auto; /* Disable smooth scrolling while dragging */
}

.nav-scroller::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.nav-tabs {
    display: flex;
    list-style: none;
    gap: 15px;
    padding: 0 10px;
    white-space: nowrap;
}

.nav-item {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item.active {
    background: #000;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.nav-item:hover:not(.active) {
    background: rgba(0,0,0,0.05);
}

.nav-link-external {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Loader */
.loader {
    text-align: center;
    padding: 40px;
    font-style: italic;
    color: var(--text-light);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .gradient-heading { 
        font-size: 1.15rem; 
        white-space: nowrap; 
    }
    .brand-heading { font-size: 1.4rem; }
    .founder-name { font-size: 1.4rem; }
    .title-unlocking { font-size: 0.55rem; letter-spacing: 3px; }
    .title-chemmystery { font-size: 1.15rem; }
    .teacher-img { width: 120px; height: 120px; }
    .gallery-grid { column-count: 2; }
}
