/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --red-accent: #d9463f;
    --font-main: 'Poppins', sans-serif;
    --gradient-angle: 90deg;
}

html { scroll-behavior: smooth; }
body { background-color: var(--bg-color); color: var(--text-color); font-family: var(--font-main); margin: 0; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 100px 0; }
h2 { font-size: clamp(2rem, 5vw, 2.8rem); text-align: center; margin-bottom: 60px; color: var(--text-color); font-weight: 700; }
h2 span { color: var(--red-accent); }

/* HEADER & NAVIGATION */
.main-header { 
    position: fixed; top: 0; left: 0; width: 100%; 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 20px 5%; z-index: 1002;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}
.main-header.scrolled { 
    background-color: rgba(18, 18, 18, 0.85); 
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.logo { 
    font-weight: 700; 
    font-size: 1.5rem; 
    color: #fff; 
    text-decoration: none; 
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo img {
    height: 40px; 
    width: auto;
    display: block;
}
.logo-text {
    font-family: 'Great Vibes', cursive;
    font-size: 2.2rem;
    font-weight: normal;
    color: #fff;
    line-height: 1;
}

/* Desktop Navigation */
.main-nav { display: flex; gap: 30px; }
.main-nav a { color: #fff; text-decoration: none; font-weight: 600; position: relative; padding-bottom: 5px; }
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--red-accent);
    transition: width 0.3s ease;
}
.main-nav a:hover::after { width: 100%; }

/* Mobile Navigation (Hamburger) */
.hamburger { display: none; cursor: pointer; z-index: 1001; padding: 10px; margin: -10px; }
.hamburger div { width: 25px; height: 3px; background-color: white; margin: 5px 0; transition: all 0.3s ease; }

.mobile-nav {
    position: fixed; top: 0; right: -100%;
    width: 70%; max-width: 300px; height: 100vh;
    background-color: var(--card-bg);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}
.mobile-nav.open { right: 0; }
.mobile-nav a { color: #fff; text-decoration: none; font-size: 1.5rem; margin: 20px 0; }

/* Hamburger to X Animation */
.hamburger.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.hamburger.toggle .line2 { opacity: 0; }
.hamburger.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

/* HERO SECTION */
.hero-section { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 5%; overflow: hidden; }
.hero-video-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-video-wrapper iframe {
    width: 100vw; height: 56.25vw; /* 16:9 aspect ratio */
    min-width: 177.77vh; /* fallback for portrait */
    min-height: 100vh;
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    pointer-events: none;
}
.hero-section::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 2; }
.hero-content { position: relative; z-index: 3; }

/* Scramble Headline Styles */
#scramble-headline {
    font-weight: 700; 
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin: 0; 
    line-height: 1.1; 
    color: #fff;
    min-height: 1.1em; /* Prevent layout shift */
}
#scramble-headline .char {
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
}
#scramble-headline .char.red {
    color: var(--red-accent);
}
#scramble-headline .dud {
    color: #666;
    font-family: monospace;
}

.dynamic-subheadline {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: #ccc;
    margin: 20px auto 40px auto;
    max-width: 800px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.dynamic-subheadline span {
    position: absolute;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.dynamic-subheadline span.active {
    opacity: 1;
    transform: translateY(0);
}
.dynamic-subheadline span.exiting {
    transform: translateY(-100%);
}

/* MAGIC BUTTON */
@property --gradient-angle { syntax: "<angle>"; initial-value: 90deg; inherits: false; }
@keyframes gradient-spin { to { --gradient-angle: 450deg; } }
@keyframes rainbow-bg { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.magic-button {
    font-size: 1rem; font-weight: 600; padding: 15px 30px; border-radius: 8px; cursor: pointer;
    position: relative; border: 3px solid transparent; background-color: var(--red-accent);
    color: white !important; background-clip: padding-box; display: inline-block; text-decoration: none;
}
.magic-button::before {
    content: ""; position: absolute; top: -3px; left: -3px; right: -3px; bottom: -3px;
    background: conic-gradient(from var(--gradient-angle), #007bff, #198754, #ffc107, #dc3545, #007bff);
    border-radius: inherit; z-index: -1; animation: gradient-spin 4s linear infinite;
}
.magic-button:hover { background-color: transparent; }
.magic-button:hover::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-size: 400% 400%; border-radius: 5px; z-index: -1; animation: rainbow-bg 3s linear infinite;
}

/* INTRO SECTION */
.intro-section .intro-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.intro-text h3 { font-size: clamp(1.8rem, 4vw, 2.2rem); margin-top: 0; font-weight: 700; }
.intro-text p { color: var(--text-color); opacity: 0.7; line-height: 1.8; }
.avatar-box {
    position: relative; 
    border: 2px solid var(--red-accent);
    background-color: #fff;
    padding: 20px;
    border-radius: 12px; 
    display: flex; 
    flex-direction: column;
    align-items: center;
    overflow: hidden; 
}
.avatar-content-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}
.avatar-image-wrapper { 
    position: relative; 
    width: 75%;
    max-width: 400px; 
    aspect-ratio: 1/1; 
    margin-left: auto;
    margin-right: 0;
}
.avatar-image {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: contain;
    display: block; border-radius: 8px; transition: opacity 0.5s ease-in-out;
}
#avatar-2, #avatar-3, #avatar-4 { opacity: 0; }

.speech-bubble {
    position: absolute;
    top: 60px;
    left: 15px;
    width: 140px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: .4em;
    padding: 15px;
    font-style: italic;
    font-size: 0.85rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s 0.4s;
}
.speech-bubble.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s;
}
.speech-bubble:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-width: 10px;
    border-style: solid;
    border-color: transparent transparent transparent var(--card-bg);
}
#static-question-bubble {
    color: var(--red-accent);
    font-weight: 600;
}

.logo-animation-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}
.animated-logo {
    position: absolute;
    height: 36px;
    width: auto;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

/* CREATIONS SECTION */
.creations-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.creation-card { background-color: var(--card-bg); border: 1px solid var(--border-color); text-decoration: none; color: var(--text-color); transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; border-radius: 8px; }
.creation-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.creation-card .image-wrapper { height: 220px; background-size: cover; background-position: center; cursor: pointer; }
.creation-card .card-content { padding: 20px; }
.section-cta { text-align: center; margin-top: 60px; }

/* BLOG SECTION */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.blog-card { background-color: var(--card-bg); border: 1px solid var(--border-color); padding: 25px; border-radius: 8px; display: flex; flex-direction: column; }
.blog-card h4 { font-size: 1.4rem; font-weight: 600; margin: 0 0 5px 0; }
.blog-card .meta { font-size: 0.8rem; opacity: 0.6; margin-bottom: 15px; }
.blog-card p { opacity: 0.8; margin-bottom: 20px; flex-grow: 1; }
.read-more { color: var(--red-accent); text-decoration: none; font-weight: 700; align-self: flex-start; }
.read-more:hover { text-decoration: underline; }

/* FOOTER */
.main-footer { background-color: #0a0a0a; color: #a0a0a0; padding: 80px 5%; border-top: 1px solid var(--border-color); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.footer-col h4 { color: #ffffff; font-weight: 600; margin-bottom: 20px; }
.footer-col p { line-height: 1.7; margin-bottom: 20px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #a0a0a0; text-decoration: none; transition: color 0.2s ease; }
.footer-col ul li a:hover { color: var(--red-accent); }
.footer-logo {
    height: 90px;
    width: auto;
    margin-bottom: 20px;
}
.social-icons-container {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.social-icons-container img {
    height: 24px;
    width: 24px;
    transition: opacity 0.2s ease;
}
.social-icons-container a:hover img {
    opacity: 0.7;
}
.footer-legal {
    text-align: center;
    padding-top: 40px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.footer-legal a {
    color: #a0a0a0;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s ease;
}
.footer-legal a:hover {
    color: var(--red-accent);
}
.footer-legal span {
    color: #555;
}
.copyright { 
    text-align: center; 
    padding-top: 20px; 
    font-size: 0.9rem; 
}

/* --- SINGLE CREATION PAGE STYLES --- */
.creation-detail-page .creation-header {
    height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.creation-detail-page .creation-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.creation-detail-page .creation-header h1 {
    color: #fff;
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    font-weight: 700;
}
.creation-detail-page .creation-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
}
.creation-detail-page .creation-content h1,
.creation-detail-page .creation-content h2,
.creation-detail-page .creation-content h3 {
    color: #fff;
}
.creation-detail-page .creation-content p {
    margin-bottom: 1.5em;
}
.creation-detail-page .creation-content a {
    color: var(--red-accent);
}
.creation-detail-page .creation-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

/* --- NEWS, LEARN, STATIC & CONTACT PAGE STYLES --- */
.page-header {
    padding: 100px 5% 60px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 0 0 10px 0;
}
.page-header p {
    font-size: 1.2rem;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
}

.news-grid-full {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
.news-card-full {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card-full:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.news-card-image {
    width: 300px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}
.news-card-content {
    padding: 30px;
}
.news-card-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.article-detail-page, .static-page, .contact-page {
    padding-top: 100px;
}
.article-detail-page .article-header {
    height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-detail-page .article-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.article-detail-page .article-header h1 {
    color: #fff;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 0;
}
.article-detail-page .article-header .meta {
    color: #ccc;
    margin-top: 10px;
}
.article-detail-page .article-content, .page-content, .contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
}
.article-detail-page .article-content .no-image-title {
    margin-top: 0;
}
.article-detail-page .article-content .no-image-meta {
    margin-bottom: 40px;
}
.article-detail-page .article-breadcrumb {
    max-width: 800px;
    margin: 0 auto 40px;
    color: #a0a0a0;
}
.article-detail-page .article-breadcrumb a {
    color: #fff;
    text-decoration: none;
}
.article-detail-page .article-breadcrumb a:hover {
    text-decoration: underline;
}

.learn-category-section {
    margin-bottom: 60px;
}
.learn-category-section .category-title {
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
}
.learn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.learn-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.learn-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.learn-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}
.learn-card p {
    opacity: 0.8;
    flex-grow: 1;
    margin-bottom: 20px;
}

.creations-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.creations-grid-full .creation-card p {
    color: var(--text-color);
    opacity: 0.7;
    line-height: 1.6;
}

.form-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 1rem;
}
.form-message.success {
    background-color: rgba(40, 167, 69, 0.2);
    color: #81d895;
    border: 1px solid #28a745;
}
.form-message.error {
    background-color: rgba(217, 70, 63, 0.2);
    color: #f0a6a2;
    border: 1px solid var(--red-accent);
}

.contact-form-container .content-form {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.contact-form-container .form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}
.contact-form-container .form-group input,
.contact-form-container .form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    box-sizing: border-box;
    font-family: var(--font-main);
    margin-bottom: 20px;
}
.contact-form-container .form-actions button.magic-button {
    width: 100%;
}


/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .intro-section .intro-grid { grid-template-columns: 1fr; text-align: center; }
    .intro-text { text-align: center; }
    .avatar-box { margin-top: 60px; }
}
@media (max-width: 768px) {
    .main-nav { display: none; }
    .hamburger { display: block; }
    .footer-grid { text-align: center; }
    .social-icons-container { justify-content: center; }
    .news-card-full { flex-direction: column; }
    .news-card-image { width: 100%; height: 200px; }
}

/* --- FINAL HERO VIDEO CONTAINMENT --- */

/* 1. Prevent unwanted horizontal scrollbars on the entire site */
html, body {
    overflow-x: hidden;
}

/* 2. Define the hero section as a full-screen container that hides overflow */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden; /* This is the key: it clips any content that is too large */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. Position the video wrapper to fill the hero section */
.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 4. Make the video cover the entire wrapper without distortion */
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 5. Ensure the text and button content appears on top of the video */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* --- HERO CONTENT & RESPONSIVE TEXT FIX --- */

.hero-content {
    /* These two lines add a protective space on the left and right */
    padding-left: 20px;
    padding-right: 20px;

    /* This ensures the padding is calculated correctly */
    box-sizing: border-box; 
    width: 100%;
}

.hero-content h1 {
    /* This command makes the font size flexible */
    /* It will be 8% of the viewport width, but won't go smaller than 2.5rem or larger than 5rem */
    font-size: clamp(2.5rem, 8vw, 5rem);

    /* This helps very long words to wrap if needed */
    word-wrap: break-word;
}