/* =====================================================
   NCETickets Global Stylesheet
   ===================================================== */

/* ===== CSS Variables ===== */
:root {
    --nce-purple: #6B46C1;
    --nce-purple-dark: #553C9A;
    --nce-purple-light: #9333EA;
    --nce-purple-ultralight: #EDE9FE;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --white: #FFFFFF;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --border: #E5E7EB;
    
    /* Layout Variables */
    --max-width: 1200px;
    --header-height: 70px;
    --sidebar-width: 250px;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

/* ===== Typography ===== */
h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

p {
    margin-bottom: 15px;
    line-height: 1.8;
}

a {
    color: var(--nce-purple);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--nce-purple-dark);
}

/* ===== Layout Components ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header & Navigation ===== */
header {
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--nce-purple);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: var(--nce-purple);
}

.logo svg {
    width: 32px;
    height: 32px;
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: var(--nce-purple);
}

.nav-menu a.active {
    color: var(--nce-purple);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--nce-purple);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* ===== Page Headers ===== */
.page-header {
    background: linear-gradient(135deg, var(--nce-purple) 0%, var(--nce-purple-dark) 100%);
    padding: 60px 20px;
    text-align: center;
    color: white;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 20px;
    opacity: 0.9;
}

/* ===== Buttons ===== */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--nce-purple);
    color: white;
}

.btn-primary:hover {
    background: var(--nce-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--nce-purple);
    border: 2px solid var(--nce-purple);
}

.btn-secondary:hover {
    background: var(--nce-purple);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 15px 35px;
    font-size: 18px;
}

.cta-button {
    background: var(--nce-purple);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s;
}

.cta-button:hover {
    background: var(--nce-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

/* ===== Cards ===== */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

/* ===== Sections ===== */
.section {
    padding: 80px 20px;
}

.section-alt {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== Grid Layouts ===== */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===== Alert Boxes ===== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-warning {
    background: #FEF3C7;
    border-left: 4px solid var(--warning);
    color: #92400E;
}

.alert-info {
    background: #DBEAFE;
    border-left: 4px solid var(--info);
    color: #1E40AF;
}

.alert-success {
    background: #D1FAE5;
    border-left: 4px solid var(--success);
    color: #065F46;
}

.alert-danger {
    background: #FEE2E2;
    border-left: 4px solid var(--danger);
    color: #991B1B;
}

/* ===== Code Blocks ===== */
.code-block {
    background: var(--text-dark);
    color: #E5E7EB;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-inline {
    background: var(--bg-light);
    color: var(--nce-purple);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th {
    background: var(--bg-light);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

/* ===== Footer ===== */
footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 20px 20px;
    text-align: center;
    margin-top: 100px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* ===== Documentation Specific ===== */
.docs-layout {
    display: flex;
    gap: 40px;
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.docs-sidebar {
    flex: 0 0 var(--sidebar-width);
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: fit-content;
}

.docs-content {
    flex: 1;
    min-width: 0; /* Prevents overflow */
}

.docs-nav {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
}

.docs-nav h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.docs-nav ul {
    list-style: none;
    margin-bottom: 20px;
}

.docs-nav li {
    margin-bottom: 4px;
}

.docs-nav a {
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
}

.docs-nav a:hover {
    background: white;
    color: var(--nce-purple);
    padding-left: 14px;
}

.docs-nav a.active {
    background: var(--nce-purple);
    color: white;
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 10px; }
.pt-2 { padding-top: 20px; }
.pt-3 { padding-top: 30px; }
.pt-4 { padding-top: 40px; }
.pt-5 { padding-top: 50px; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 10px; }
.pb-2 { padding-bottom: 20px; }
.pb-3 { padding-bottom: 30px; }
.pb-4 { padding-bottom: 40px; }
.pb-5 { padding-bottom: 50px; }

/* Demo */
.cta-demo {
  display: inline-block;
  background: #6b46c1;          /* match NCE purple */
  color: white;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  margin-top: 20px;
  transition: all 0.3s;
}

.cta-demo:hover {
  background: #5a3aa3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease;
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .docs-layout {
        flex-direction: column;
    }
    
    .docs-sidebar {
        position: static;
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        gap: 15px;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: flex;
    }

    /* Typography */
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 20px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    /* Grids */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Sections */
    .section {
        padding: 60px 20px;
    }

    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    .page-header {
        padding: 40px 20px;
    }

    .section {
        padding: 40px 20px;
    }
}