/* ==============================================
   Miza Galaxy Custom Styles
   ============================================== */

/* Root Variables */
:root {
    --primary-accent: #00ADD3;
    --text-dark: #111111;
    --background: #FFFFFF;
    --secondary-gray: #F5F5F5;
    --black-contrast: #000000;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
}

/* Global Mobile Overflow Prevention */
@media screen and (max-width: 768px) {
    * {
        max-width: 100% !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    *:before,
    *:after {
        max-width: 100% !important;
    }
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--background);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-4, .display-5 {
    font-weight: 700;
}

.lead {
    font-weight: 400;
    font-size: 1.125rem;
}

/* Utility Classes */
.text-accent {
    color: var(--primary-accent) !important;
}

.bg-accent {
    background-color: var(--primary-accent) !important;
}

.btn-accent {
    background-color: var(--primary-accent);
    border-color: var(--primary-accent);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background-color: #0098b8;
    border-color: #0098b8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 173, 211, 0.3);
}

.brand-accent {
    color: var(--primary-accent);
}

/* Section Dividers */
.section-line {
    width: 60px;
    height: 4px;
    background-color: var(--primary-accent);
    border: none;
    border-radius: 2px;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    z-index: 1050;
    background-color: white !important;
}

/* Mobile navbar padding */
@media (max-width: 767.98px) {
    .navbar {
        padding: 0.5rem 0;
    }
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
}

.navbar-logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Navbar Toggler (Hamburger Menu) */
.navbar-toggler {
    border: none;
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
    outline: none;
}

.navbar-toggler:hover {
    opacity: 0.7;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-accent) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-accent);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--background) 0%, var(--secondary-gray) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 173, 211, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 173, 211, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-image {
    padding: 20px;
}

.hero-product-img {
    max-height: 500px;
    transition: transform 0.3s ease;
}

.hero-product-img:hover {
    transform: scale(1.05);
}

.badges .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
}

.hero-features .feature-item {
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-light);
    transition: transform 0.3s ease;
}

.hero-features .feature-item:hover {
    transform: translateY(-5px);
}

/* Hero Benefits */
.hero-benefits .benefit-item {
    padding: 0.5rem;
    background: rgba(0, 173, 211, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hero-benefits .benefit-item:hover {
    background: rgba(0, 173, 211, 0.15);
    transform: translateX(5px);
}

/* Presentation Section */
.presentation-stats .stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-dark);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--secondary-gray);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px var(--shadow-medium);
}

.feature-icon {
    padding: 1.5rem;
    background: var(--secondary-gray);
    border-radius: 50%;
    display: inline-block;
}

/* Gallery Section */
.gallery-item img {
    transition: transform 0.3s ease;
    border-radius: 10px;
}

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

.gallery-caption h5 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.specifications-card {
    border-left: 4px solid var(--primary-accent);
}

.specifications-card ul li {
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--secondary-gray);
}

.specifications-card ul li:last-child {
    border-bottom: none;
}

/* Contact Section */
.contact-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--secondary-gray);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px var(--shadow-medium);
}

.contact-icon {
    padding: 1.5rem;
    background: var(--secondary-gray);
    border-radius: 50%;
    display: inline-block;
}

.contact-form {
    background: var(--secondary-gray);
    border-radius: 15px;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 0.2rem rgba(0, 173, 211, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--black-contrast) !important;
}

.footer-links a:hover {
    color: var(--primary-accent) !important;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-outline-dark {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

.btn-outline-dark:hover {
    background-color: var(--text-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

.btn-dark:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    /* Prevent horizontal scroll on all screen sizes */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .container {
        max-width: 100% !important;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .hero-section {
        padding: 100px 0 60px;
        overflow-x: hidden;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-features {
        margin-top: 2rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 80px 0 60px;
    }
    
    .display-4 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .display-5 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    /* Mobile-first hero layout - Force image first */
    .hero-section .row {
        display: flex !important;
        flex-direction: column-reverse !important;
    }
    
    .hero-content {
        text-align: center;
        order: 2 !important;
    }
    
    .hero-image {
        order: 1 !important;
        margin-bottom: 2rem;
    }
    
    
    
    .hero-cta .btn {
        width: 100%;
        margin-bottom: 1rem;
        padding: 1rem 2rem;
    }
    
    .hero-features {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    
    .hero-benefits {
        margin-bottom: 2rem;
    }
    
    .hero-benefits .benefit-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .badges {
        margin-bottom: 2rem;
    }
    
    .badges .badge {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
        margin-right: 0;
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        text-align: center;
    }
    
    .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
        padding: 2rem 1.5rem !important;
    }
    
    .contact-card,
    .contact-form {
        margin-bottom: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
        max-width: calc(100vw - 80px);
        overflow: hidden;
    }
    
    .navbar-logo {
        height: 50px;
        max-height: 50px;
    }
    
    .section-line {
        width: 40px;
    }
    
    .presentation-stats {
        margin-top: 3rem;
    }
    
    .gallery-caption h5 {
        font-size: 1.1rem;
        margin-top: 1rem;
    }
    
    .specifications-card {
        margin-top: 2rem;
        padding: 2rem 1.5rem !important;
    }
    
    .py-5 {
        padding: 3rem 0 !important;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 100px 0 50px;
        min-height: auto;
    }
    
    .min-vh-100 {
        min-height: auto !important;
    }
    
    .navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem !important;
        flex: 1;
        max-width: calc(100vw - 100px);
    }
    
    .navbar-logo {
        height: 50px !important;
        margin-right: 0.5rem !important;
    }
    
    .display-4 {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .display-5 {
        font-size: 1.4rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile badges - make them more prominent */
    .badges {
        margin-bottom: 1.5rem;
        margin-top: 1rem;
    }
    
    .badges .badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        margin-bottom: 0.75rem;
        display: block;
        margin-right: 0;
        width: 100%;
        text-align: center;
    }
    
    .hero-benefits .benefit-item {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .hero-features .feature-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .feature-card {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .feature-card h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .feature-icon {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .feature-icon i {
        font-size: 2rem !important;
    }
    
    .contact-icon i {
        font-size: 2.5rem !important;
    }
    
    .contact-card,
    .contact-form {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .form-control {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
    }
    
    .gallery-caption {
        padding: 0 0.5rem;
    }
    
    .gallery-caption h5 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .specifications-card {
        padding: 1.5rem 1rem !important;
        margin-top: 1.5rem;
    }
    
    .specifications-card h4 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .specifications-card ul li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }
    
    .py-5 {
        padding: 2.5rem 0 !important;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .section-line {
        width: 30px;
        height: 3px;
    }
    
    /* Improve text readability on small screens */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        hyphens: auto;
    }
    
    p, .lead {
        word-wrap: break-word;
        line-height: 1.6;
    }
}

/* Smooth Scrolling Enhancement */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Loading States */
.img-fluid {
    transition: opacity 0.3s ease;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .feature-card,
    .contact-card {
        border: 2px solid var(--text-dark);
    }
    
    .btn-accent {
        border: 2px solid var(--primary-accent);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-cta,
    .contact-card,
    .contact-form,
    footer {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
    
    .hero-section {
        background: white;
    }
}

/* Utility Classes for Spacing */
.mt-6 { margin-top: 3.5rem; }
.mb-6 { margin-bottom: 3.5rem; }
.pt-6 { padding-top: 3.5rem; }
.pb-6 { padding-bottom: 3.5rem; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0098b8;
}

/* Mobile-specific Improvements */
@media (max-width: 767.98px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .container, .container-fluid {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        overflow-x: hidden;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .col-12, .col-md-6, .col-lg-6, .col-lg-4, .col-lg-8, .col-lg-10, .col-lg-12 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        max-width: 100%;
    }
    
    /* Fix sections that might overflow */
    section {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Improve touch targets */
    .btn, .nav-link, .navbar-toggler {
        min-height: 48px;
        min-width: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile navbar container improvements */
    
    .navbar-collapse {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: 0 10px 30px var(--shadow-light);
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        margin: 0.5rem 0;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: var(--secondary-gray);
    }
    
    /* Improve form inputs for mobile */
    .form-control, .form-select {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better spacing for mobile content */
    .text-center.mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .row.mb-4 {
        margin-bottom: 2rem !important;
    }
    
    /* Mobile hero image container */
    .hero-section .hero-image {
        margin-bottom: 2.5rem;
        order: 1 !important;
        padding: 20px !important;
    }
    
    /* Force zero padding on hero image column */
    .hero-section .col-lg-6 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .hero-section .hero-product-img {
        width: auto;
        margin: 0 auto;
        display: block;
        border-radius: 16px;
        transition: transform 0.3s ease;
    }
    
    .gallery-item img {
        border-radius: 12px;
    }
    
    /* Mobile-optimized cards */
    .feature-card, .contact-card {
        border-radius: 16px;
        box-shadow: 0 8px 25px var(--shadow-light);
    }
    
    /* Improve readability */
    .text-muted {
        color: #666 !important;
        font-size: 0.95rem;
    }
    
    /* Fix specific elements that cause overflow */
    .hero-cta .btn {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .badges .badge {
        max-width: 100%;
        width: 100%;
        word-wrap: break-word;
        white-space: normal;
        text-align: center;
    }
    
    .navbar {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden;
    }
    
    
    /* Fix images that might overflow */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .hero-product-img {
        max-width: 100% !important;
        width: auto !important;
    }
    
    /* Fix text content overflow */
    h1, h2, h3, h4, h5, h6, p, .lead {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    
    /* Better footer on mobile */
    footer {
        text-align: center !important;
        width: 100%;
        overflow-x: hidden;
    }
    
    .footer-links {
        margin-top: 1rem;
        text-align: center !important;
    }
    
    .footer-links a {
        display: block;
        margin: 0.5rem 0;
        font-size: 0.9rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .display-4 {
        font-size: 1.6rem;
    }
    
    .display-5 {
        font-size: 1.3rem;
    }
    
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .btn-lg {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 1.25rem 0.75rem !important;
    }
    
    .contact-card,
    .contact-form {
        padding: 1.25rem 0.75rem !important;
    }
    
    .specifications-card {
        padding: 1.25rem 0.75rem !important;
    }
}
