/* 
 * Starein Training Centre - Main Stylesheet
 * Modern, Responsive, High-Performance
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors extracted from Logo */
    --color-primary: #26bfce;
    /* Cyan/Teal */
    --color-secondary: #fdbe4b;
    /* Yellow/Orange */
    --color-dark: #231f20;
    /* Black */
    --color-grey: #393939;
    /* Dark Grey */
    --color-light: #f8f9fa;
    --color-white: #ffffff;

    /* Functional Colors */
    --text-main: #333333;
    --text-light: #666666;
    --bg-body: #ffffff;
    --bg-light: #f4f6f8;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--color-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Utility Classes */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #1ea0ad;
    /* Darker Cyan */
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-dark);
}

.btn-secondary:hover {
    background-color: #e5ac44;
    /* Darker Yellow */
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    border-bottom: var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
    height: 70px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    height: 50px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--color-dark);
    position: relative;
    font-size: 1rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-dark);
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 100px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 90vh;
}

.hero-bg-shape {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: linear-gradient(135deg, rgba(38, 191, 206, 0.1) 0%, rgba(253, 190, 75, 0.1) 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: -1;
    animation: morph 15s ease-in-out infinite alternate;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }

    100% {
        border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-dark);
}

.hero-text h1 span {
    color: var(--color-primary);
    position: relative;
    z-index: 1;
}

.hero-text h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(253, 190, 75, 0.4);
    /* Secondary color overlay */
    z-index: -1;
    border-radius: 4px;
}

.hero-text p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: var(--radius-xl) 0 var(--radius-xl) var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: 2;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--color-secondary);
    border-radius: var(--radius-xl) 0 var(--radius-xl) var(--radius-xl);
    z-index: 1;
}

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

.feature-card {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(38, 191, 206, 0.1);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Courses Preview */
.course-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.course-image {
    height: 200px;
    background-color: #ddd;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-content {
    padding: 24px;
}

.course-tag {
    background-color: rgba(253, 190, 75, 0.2);
    color: #b38200;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
}

.course-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.cta-section {
    background: linear-gradient(rgba(38, 191, 206, 0.9), rgba(30, 160, 173, 0.95)), url('images/CTA panoramic 1.jpg');
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    padding: 80px 0;
    text-align: center;
    border-radius: 0;
}

.cta-section h2 {
    color: var(--color-white);
    margin-bottom: 20px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.2rem;
}

/* Footer */
.footer {
    background-color: var(--color-dark);
    color: #fff;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-info p {
    color: #aaa;
    margin-top: 20px;
    max-width: 300px;
}

.footer-links h3,
.footer-contact h3 {
    color: var(--color-white);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-secondary);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #aaa;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .container {
        width: 95%;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text p {
        margin: 0 auto 2.5rem;
    }

    .hero-image {
        max-width: 600px;
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    /* Mobile Menu Style */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--color-white);
        padding: 20px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid #eee;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

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

/* Testimonial Carousel */
.testimonial-carousel {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    height: 300px;
    /* Adjust based on content */
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.testimonial-slide.active {
    opacity: 1;
    pointer-events: all;
    z-index: 10;
}

.testimonial-text {
    font-size: 1.25rem;
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.testimonial-author {
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--color-primary);
}

/* UI Performance Rules (Prevent CPU Repaint Spikes) */
.modal-overlay, .overlay {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal, .modal-content, .contact-form-wrapper {
    transform: scale(1) translateZ(0);
    will-change: transform, opacity;
}