/* Cyaxios Website - Main Stylesheet */

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

/* Prevent horizontal scroll and ensure proper mobile rendering */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Ensure all elements respect container boundaries */
*, *::before, *::after {
    max-width: 100%;
}

/* Accessibility Styles */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1001;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fdfdfd;
    overflow-x: hidden; /* Prevent horizontal scroll */
    min-height: 100vh; /* Ensure full viewport height */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Ensure full width on mobile */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Header Styles */
header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 400;
}

.nav-links a:hover,
.nav-links a.active {
    color: #3498db;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hamburger animation */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.cta-button {
    background: #3498db;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 0.9rem;
    display: inline-block;
}

.cta-button:hover {
    background: #2980b9;
}

/* Main Content */
main {
    margin-top: 70px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 3rem 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Section Styles */
.section {
    padding: 3rem 0;
    width: 100%;
    min-height: auto;
    position: relative;
    overflow: visible;
}

.section-white {
    background: white;
}

.section-gray {
    background: #f8f9fa;
}

.section-dark {
    background: #2c3e50;
    color: white;
}

.section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 600;
}

.section-dark h2 {
    color: white;
}

/* Approach Section */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.approach-card {
    padding: 1.5rem;
    border-left: 4px solid #3498db;
    background: #f8f9fa;
}

.approach-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.approach-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Demo Section */
.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.demo-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.demo-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

.demo-interface {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.chat-interface {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    min-height: 250px;
    background: #fafafa;
    font-size: 0.9rem;
}

.message {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
}

.user-message {
    background: #e3f2fd;
    text-align: right;
}

.ai-message {
    background: white;
    border: 1px solid #eee;
}

.input-area {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.input-area input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Method Steps */
.method-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.method-step {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    background: #3498db;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
}

.method-step h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.method-step p {
    color: #666;
    font-size: 0.9rem;
}

/* Applications Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.app-card {
    background: white;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    border: 1px solid #e0e0e0;
}

.app-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.app-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-section {
    background: #2c3e50;
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.contact-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-section p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
/* Video Container Styles */
.video-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-placeholder {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    transition: all 0.3s ease;
}

.video-placeholder:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.tab-button {
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #2980b9 !important;
    transform: translateY(-2px);
}

/* Enhanced Tech Detail Styling */
.tech-detail {
    border-left: 3px solid #3498db;
    transition: all 0.3s ease;
}

.tech-detail:hover {
    background: #e8f4fd !important;
    border-left-color: #2980b9;
}

/* AI Tech Section Enhancements */
.ai-tech-section {
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.ai-tech-section:hover {
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.tech-item h4 {
    transition: color 0.3s ease;
}

.tech-item:hover h4 {
    color: #2980b9 !important;
}

/* Enhanced Chat Interface Accessibility */
.chat-interface {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.chat-interface:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.message {
    transition: background-color 0.3s ease;
}

.message:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* Responsive Design */

/* Mobile Portrait (up to 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .demo-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .approach-grid,
    .app-grid,
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .method-steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .method-step {
        text-align: center;
        padding: 1rem;
    }

    .step-number {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    /* Mobile Navigation */
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(44, 62, 80, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.5s ease forwards;
    }

    .nav-links.active li {
        animation-delay: calc(var(--i) * 0.1s);
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem;
        display: block;
        text-align: center;
    }

    .cta-button {
        position: relative;
        z-index: 1001;
    }

    .video-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab-button {
        width: 100%;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

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

/* Mobile Landscape and Small Tablets (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .section {
        padding: 2.5rem 0;
    }

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

    .demo-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .approach-grid,
    .app-grid,
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .method-steps {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    /* Mobile Navigation for tablets */
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(44, 62, 80, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.4rem;
        padding: 1rem;
        display: block;
        text-align: center;
    }

    .video-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .tab-button {
        flex: 1;
        min-width: 150px;
        max-width: 200px;
    }
}

/* Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .demo-container {
        gap: 2.5rem;
    }

    .approach-grid,
    .app-grid,
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .method-steps {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Landscape Orientation Fixes */
@media (orientation: landscape) and (max-height: 500px) {
    .section {
        padding: 1.5rem 0;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }

    .hero p {
        margin-bottom: 1rem;
    }

    .method-steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .method-step {
        padding: 1rem 0.5rem;
    }

    .step-number {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

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

.color-gray {
    color: #666;
}

.color-dark {
    color: #2c3e50;
}

/* Progress Flow Mobile Responsiveness */
@media (max-width: 768px) {
    .progress-flow .progress-steps {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .progress-flow .progress-line {
        display: none; /* Hide horizontal line on mobile */
    }

    .progress-flow .step-circle {
        width: 100px !important;
        height: 100px !important;
    }

    .progress-flow .step-circle div {
        font-size: 2.5rem !important;
    }

    .progress-flow .progress-step {
        flex: none;
        max-width: 280px;
        padding: 0 !important;
    }

    .progress-flow .timeline {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .progress-flow .timeline span {
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    .progress-flow .step-circle {
        width: 80px !important;
        height: 80px !important;
    }

    .progress-flow .step-circle div {
        font-size: 2rem !important;
    }

    .progress-flow .progress-step h4 {
        font-size: 1rem !important;
    }

    .progress-flow .progress-step p {
        font-size: 0.8rem !important;
    }

    .progress-flow .step-detail {
        font-size: 0.7rem !important;
        padding: 0.4rem !important;
    }

    .ai-progress-section {
        padding: 1.5rem !important;
    }
}
