/* ============================================
   DEDE'S UNIVERSE - Main Stylesheet
   Real Space Background + Responsive Design
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fredoka', 'Poppins', sans-serif;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    background: #000;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

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

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

/* --- Space Background Container --- */
.space-container {
    min-height: 100vh;
    width: 100%;
    background-image: url('../img/space-bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.space-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1;
    pointer-events: none;
}

/* --- Floating Stars --- */
.stars-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    opacity: 0.6;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.7);
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f0c040, #e88030);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.navbar-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

.navbar-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f0c040, #e88030);
    transition: width 0.3s ease;
}

.navbar-links a:hover,
.navbar-links a.active {
    color: #f0c040;
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
    width: 100%;
}

/* --- Navbar Right (links + lang switcher) --- */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --- Language Switcher --- */
.lang-switcher {
    position: relative;
    z-index: 1001;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.lang-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(10, 10, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    padding: 8px;
}

.lang-switcher.open .lang-dropdown {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.lang-option.active {
    background: rgba(240, 192, 64, 0.15);
    color: #f0c040;
}

.lang-flag-img {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
}

.lang-code {
    font-weight: 600;
    min-width: 24px;
}

.lang-name {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.lang-option.active .lang-name {
    color: rgba(240, 192, 64, 0.7);
}

/* --- RTL Support --- */
html[dir="rtl"] .hero-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-tagline,
html[dir="rtl"] .hero-tagline.brand-page {
    text-align: right;
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    display: block;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Main Content Wrapper --- */
.content-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Hero Section --- */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 40px;
    position: relative;
}

.hero-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    animation: slideDown 0.8s ease-out;
}

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

.hero-logo {
    animation: bounce 3s infinite;
    filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.5));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-logo img {
    width: 200px;
    height: 200px;
    display: block;
    object-fit: contain;
}

.hero-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    text-align: left;
    max-width: 400px;
}

.hero-tagline.brand-page {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.8;
    max-width: 450px;
}

.hero-description {
    max-width: 650px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 1rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* --- Sub-brand Logos Row --- */
.brands-section {
    padding: 0 20px 60px;
}

.brands-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.brand-logo-link {
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.brand-logo-link img {
    width: 180px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.brand-logo-link:hover {
    transform: scale(1.15);
}

.brand-logo-link:hover img {
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.6)) brightness(1.1);
}

/* --- Brand Detail Page (Logo left, text right) --- */
.brand-detail-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.brand-detail-row .hero-logo img {
    width: 250px;
    height: 250px;
}

.brand-detail-text {
    flex: 1;
    max-width: 550px;
}

.brand-detail-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 25px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-5px);
}

/* --- About Page --- */
.about-section {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.about-content {
    font-size: 1.1rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* --- Contact Page --- */
.contact-section {
    flex: 1;
    padding: 120px 20px 80px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.contact-container {
    max-width: 600px;
    width: 100%;
}

.contact-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.contact-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
    font-size: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.contact-form {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.form-group label .required {
    color: #ff6060;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
    background: rgba(255, 255, 255, 0.12);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #f0c040, #e88030);
    border: none;
    border-radius: 12px;
    color: #1a0a30;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(240, 192, 64, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 200, 100, 0.2);
    border: 1px solid rgba(40, 200, 100, 0.4);
    color: #60e890;
}

.alert-error {
    background: rgba(230, 60, 60, 0.2);
    border: 1px solid rgba(230, 60, 60, 0.4);
    color: #ff7070;
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
}

.footer a {
    color: #f0c040;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #e88030;
}

/* --- Scroll to top --- */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

/* --- Logo Placeholder (when no image uploaded) --- */
.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (min-width: 768px) {
    .hero-logo img {
        width: 280px;
        height: 280px;
    }

    .hero-tagline {
        font-size: 1.8rem;
    }

    .brand-logo-link img {
        width: 220px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .hero-logo img {
        width: 350px;
        height: 350px;
    }

    .hero-tagline {
        font-size: 2.2rem;
        max-width: 500px;
    }

    .brand-logo-link img {
        width: 280px;
    }

    .brands-row {
        gap: 4rem;
        max-width: 1200px;
    }

    .brand-detail-row .hero-logo img {
        width: 320px;
        height: 320px;
    }

    .brand-detail-text p {
        font-size: 1.3rem;
    }

    .hero-tagline.brand-page {
        font-size: 1.3rem;
        max-width: 550px;
    }
}

/* Ultra-wide / 4K */
@media (min-width: 1600px) {
    .hero-logo img {
        width: 420px;
        height: 420px;
    }

    .hero-tagline {
        font-size: 2.6rem;
        max-width: 600px;
    }

    .brand-logo-link img {
        width: 340px;
    }

    .brands-row {
        gap: 5rem;
        max-width: 1500px;
    }

    .brand-detail-row .hero-logo img {
        width: 400px;
        height: 400px;
    }

    .brand-detail-text p {
        font-size: 1.5rem;
    }

    .hero-tagline.brand-page {
        font-size: 1.5rem;
        max-width: 650px;
    }
}

/* Large Desktop 1440px+ */
@media (min-width: 1440px) {
    .hero {
        padding: 120px 40px 60px;
    }

    .hero-logo img {
        width: 320px;
        height: 320px;
    }

    .hero-tagline {
        font-size: 2rem;
        max-width: 550px;
    }

    .brands-section {
        padding: 0 40px 80px;
    }

    .brands-row {
        gap: 4rem;
        max-width: 1200px;
    }

    .brand-logo-link img {
        width: 280px;
    }

    .about-section {
        max-width: 900px;
    }

    .about-content {
        padding: 50px;
        font-size: 1.2rem;
    }

    .contact-section {
        padding: 140px 40px 100px;
    }

    .contact-container {
        max-width: 700px;
    }

    .contact-title {
        font-size: 2.4rem;
    }

    .contact-form {
        padding: 50px;
    }
}

/* Ultra-wide 1920px+ */
@media (min-width: 1920px) {
    .hero {
        padding: 140px 60px 80px;
    }

    .hero-logo img {
        width: 380px;
        height: 380px;
    }

    .hero-tagline {
        font-size: 2.4rem;
        max-width: 650px;
    }

    .hero-header {
        gap: 3rem;
    }

    .brands-section {
        padding: 0 60px 100px;
    }

    .brands-row {
        gap: 5rem;
        max-width: 1400px;
    }

    .brand-logo-link img {
        width: 320px;
    }

    .about-section {
        max-width: 1000px;
    }

    .about-content {
        padding: 60px;
        font-size: 1.25rem;
        line-height: 2.2;
    }

    .contact-section {
        padding: 160px 60px 120px;
    }

    .contact-container {
        max-width: 800px;
    }

    .contact-title {
        font-size: 2.8rem;
    }

    .contact-form {
        padding: 60px;
    }

    .form-group {
        margin-bottom: 28px;
    }

    .form-control {
        padding: 16px 22px;
        font-size: 1.05rem;
    }

    textarea.form-control {
        min-height: 180px;
    }

    .btn-submit {
        padding: 18px;
        font-size: 1.1rem;
    }
}

/* Super Ultra-wide 2560px+ */
@media (min-width: 2560px) {
    .hero-logo img {
        width: 440px;
        height: 440px;
    }

    .hero-tagline {
        font-size: 2.8rem;
        max-width: 700px;
    }

    .brands-row {
        gap: 6rem;
        max-width: 1600px;
    }

    .brand-logo-link img {
        width: 380px;
    }

    .about-section {
        max-width: 1100px;
    }

    .about-content {
        padding: 70px;
        font-size: 1.3rem;
    }
}

/* Mobile Landscape / Small Tablet */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }

    .navbar-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 80px 30px 30px;
        gap: 20px;
        transition: right 0.35s ease;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-links.open {
        right: 0;
    }

    .navbar-right {
        gap: 10px;
    }

    .menu-toggle {
        display: flex;
        order: 2;
    }

    .lang-switcher {
        order: 1;
    }

    .lang-name {
        display: none;
    }

    .brand-detail-title {
        font-size: 1.6rem;
    }

    .brand-detail-desc {
        padding: 25px;
        font-size: 1rem;
    }

    .contact-form {
        padding: 25px;
    }

    .contact-title {
        font-size: 1.6rem;
    }
}

/* Mobile Portrait */
@media (max-width: 640px) {
    .hero {
        padding: 90px 15px 30px;
    }

    .hero-header {
        flex-direction: column;
        margin-bottom: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
        text-align: center;
    }

    .hero-tagline.brand-page {
        font-size: 0.9rem;
        text-align: center;
        max-width: 100%;
    }

    .brand-detail-row {
        flex-direction: column;
        text-align: center;
    }

    .brand-detail-row .hero-logo img {
        width: 180px;
        height: 180px;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .brands-section {
        padding: 10px 10px 40px;
    }

    .brands-row {
        gap: 1.5rem;
    }

    .brand-logo-link img {
        width: 120px;
    }

    .brand-detail {
        padding: 100px 15px 60px;
    }

    .contact-section {
        padding: 100px 15px 60px;
    }

    .contact-form {
        padding: 20px;
    }

    .form-control {
        padding: 12px 14px;
    }

    .footer {
        padding: 20px 15px;
        font-size: 0.8rem;
    }
}
