/* ISOCODE.CV - Unified Styles */

:root {
    /* Primary Brand Colors */
    --primary: #cc9933;
    --primary-hover: #e6ac3d;
    --gold: #cc9933;
    --gold-hover: #e6ac3d;
    --gold-light: rgba(204, 153, 51, 0.1);
    --gold-lighter: rgba(204, 153, 51, 0.05);
    
    /* Secondary Colors */
    --secondary: #b8860b;
    --accent: #10b981;
    --success: #4ade80;
    --danger: #ef4444;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Dark Theme Backgrounds */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #1a1a1a;
    --bg-card: #111111;
    --bg-input: #1a1a1a;
    --bg-dark: #000000;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-tertiary: #999999;
    --text-muted: #666666;
    --text-black: #000000;
    --text-white: #ffffff;
    
    /* Borders & Shadows */
    --border-color: #333333;
    --border-color-light: #444444;
    --border-light: #222222;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.25);
    --shadow-gold: 0 0 20px rgba(204, 153, 51, 0.3);
    
    /* Spacing & Sizes */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 1rem;
    --max-width: 1280px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Main content link styles */
main a {
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
}

main a:hover {
    color: var(--gold-hover);
    text-decoration: underline;
}

/* Utility Classes */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.text-center {
    text-align: center;
}

.visually-hidden,
.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;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--gold);
    color: var(--bg-primary);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 600;
    z-index: 100;
    transition: var(--transition);
}

.skip-link:focus {
    top: 0;
}

/* Header */
.main-header,
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(10, 10, 10, 0.9);
}

.nav-wrapper,
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary);
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px var(--gold-light));
}

.logo img {
    height: 50px;
    width: auto;
}

.main-nav,
.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-nav a,
.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.main-nav a:hover,
.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--primary) !important;
    color: var(--text-black) !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
}

.nav-cta:hover {
    background: var(--primary-hover) !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--bg-secondary);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Mobile Navigation Overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 2rem;
}

.mobile-nav-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.mobile-nav-close:hover {
    background: var(--bg-secondary);
}

.mobile-nav-close svg {
    width: 24px;
    height: 24px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    margin-top: 3rem;
}

.mobile-nav-links a {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
}

.mobile-nav-links a:hover {
    color: var(--primary);
}

.mobile-nav-links .nav-cta {
    margin-top: 1rem;
    background: var(--primary);
    color: var(--text-black) !important;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(204, 153, 51, 0.3);
}

.hero-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Search Container */
.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(204, 153, 51, 0.2);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--text-black);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Quick Filters */
.quick-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    color: var(--text-black);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--text-black);
}

.filter-btn.active {
    background: var(--primary-hover);
    color: var(--text-black);
    border-color: var(--primary-hover);
}

/* Search Results */
.search-results {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.result-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.result-codes {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.result-code {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

/* Search Result Detail */
.search-result-detail {
    display: none;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease-out;
}

.search-result-detail.active {
    display: block;
}

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

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.detail-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.detail-content {
    padding: 2rem;
}

.detail-info {
    margin-bottom: 2rem;
}

.detail-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.detail-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.detail-codes {
    margin-bottom: 2rem;
}

.detail-codes h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.code-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.code-item.copyable {
    cursor: pointer;
    user-select: none;
}

.code-item.copyable:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

/* Copy functionality styles */
.copyable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.copyable .copy-icon {
    opacity: 0;
    transition: var(--transition);
    margin-left: 0.5rem;
    color: var(--text-secondary);
}

.copyable:hover .copy-icon {
    opacity: 1;
}

.copyable.copied {
    background: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
}

.copyable.copied .copy-icon {
    opacity: 1;
    color: white;
}

.result-code.copyable {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    transition: var(--transition);
}

.result-code.copyable:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.result-code.copyable strong {
    font-weight: 600;
}

/* Usage examples */
.result-usage {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.usage-example {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.usage-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-black);
    background: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.usage-example code {
    background: var(--bg-tertiary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 200px;
}

/* Toast notification styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--text-black);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    background: var(--accent);
    color: white;
}

.toast.error {
    background: var(--danger);
    color: white;
}

.toast::before {
    content: '✓';
    font-weight: bold;
    margin-right: 0.25rem;
}

.toast.error::before {
    content: '✗';
}

/* Responsive adjustments - Enhanced breakpoints */
@media (max-width: 1023px) {
    .toast {
        max-width: 400px;
    }
}

@media (max-width: 767px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
        max-width: none;
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .result-codes {
        flex-direction: column;
        align-items: stretch;
    }
    
    .result-code.copyable {
        margin: 0.25rem 0;
        text-align: center;
    }
    
    .usage-example {
        flex-direction: column;
        align-items: stretch;
    }
    
    .usage-example code {
        min-width: auto;
        text-align: center;
    }
}

@media (max-width: 479px) {
    .toast {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .result-code.copyable {
        font-size: 0.875rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Converter output styles */
.converter-output .copyable {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.converter-output .copyable:hover {
    background: var(--primary);
    color: var(--text-black);
    border-color: var(--primary);
}

.code-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.code-value {
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: var(--primary);
}

.detail-metadata {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metadata-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.metadata-value {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Responsive - Detail modal breakpoints */
@media (max-width: 767px) {
    .detail-header {
        padding: 1rem 1.5rem;
    }
    
    .detail-content {
        padding: 1.5rem;
    }
    
    .codes-grid {
        grid-template-columns: 1fr;
    }
    
    .metadata-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 479px) {
    .detail-header {
        padding: 0.875rem 1rem;
    }
    
    .detail-content {
        padding: 1rem;
    }
    
    .detail-title {
        font-size: 1.25rem;
    }
    
    .codes-grid {
        gap: 0.75rem;
    }
    
    .code-label {
        font-size: 0.75rem;
    }
    
    .code-value {
        font-size: 1rem;
    }
}

/* Standards Grid */
.standards-grid {
    padding: 5rem 0;
}

.standards-grid h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.standard-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    display: block;
}

.standard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.standard-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.standard-card p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.card-detail {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-family: 'Courier New', monospace;
}

/* Converter Section */
.converter-section {
    background: var(--bg-secondary);
    padding: 5rem 0;
}

.converter-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.converter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.converter-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.converter-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.converter-card input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.converter-card input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.converter-output {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem;
}

.output-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.output-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.output-row span:first-child {
    font-weight: 500;
    color: var(--text-secondary);
}

.output-row span:last-child {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

/* Features Section */
.features {
    padding: 5rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.75rem;
}

.feature p {
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-white);
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--text-white);
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
}

.btn-secondary:hover {
    background: var(--text-white);
    color: var(--primary);
}

/* Footer */
.main-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.footer-section a {
    display: block;
    color: var(--text-light);
    padding: 0.25rem 0;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--text-white);
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-tertiary);
    margin-bottom: 0;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--accent);
}

.toast.error {
    background: var(--danger);
}

/* Standard Pages Styles */
.hero-secondary {
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.hero-secondary h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 800px;
}

/* Content Layout */
.standard-content {
    padding: 4rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

.content-sidebar {
    position: sticky;
    top: 5rem;
}

.sidebar-nav {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-nav h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.75rem;
}

.sidebar-nav a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: block;
    padding: 0.25rem 0;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.quick-facts {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.quick-facts h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.quick-facts dl {
    font-size: 0.875rem;
}

.quick-facts dt {
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.quick-facts dd {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Article Content */
.content-main {
    max-width: 800px;
}

.content-main section {
    margin-bottom: 3rem;
}

.content-main h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-top: 1rem;
}

.content-main h3 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.content-main p {
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.content-main ul, .content-main ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content-main li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Info Cards */
.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Code Examples */
.code-example {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.code-example h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Data Tables */
.data-table, .example-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table th, .example-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
}

.data-table td, .example-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:last-child td, .example-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover, .example-table tr:hover {
    background: var(--bg-secondary);
}

/* Usage Grid */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.usage-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.usage-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.usage-card ul {
    list-style: none;
    padding: 0;
}

.usage-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

/* Alert Box */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.alert-info {
    background: rgba(30, 58, 138, 0.1);
    border: 1px solid var(--primary);
}

.alert h4 {
    margin-bottom: 0.75rem;
    color: var(--primary);
}

/* Related Standards */
.related-standards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.standard-link {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.standard-link:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.standard-link h4 {
    margin-bottom: 0.5rem;
}

.standard-link h4 a {
    color: var(--text-primary);
    text-decoration: none;
}

.standard-link h4 a:hover {
    color: var(--primary);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tool-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tool-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* External Resources */
.external-resources {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
}

.external-resources h3 {
    margin-bottom: 1rem;
}

.external-resources ul {
    list-style: none;
    padding: 0;
}

.external-resources li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.external-resources li:last-child {
    border-bottom: none;
}

.external-resources a {
    color: var(--primary);
    text-decoration: none;
}

.external-resources a:hover {
    text-decoration: underline;
}

/* Notes */
.note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Usage Examples Section */
.usage-examples-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.usage-examples-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Enhanced Copy Functionality */
.copyable {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copyable:hover {
    background: var(--primary);
    color: var(--text-black);
    border-color: var(--primary);
}

.copyable.copied {
    background: var(--accent) !important;
    color: var(--text-white) !important;
    border-color: var(--accent) !important;
}

.copyable.copied::after {
    content: '✓ Copied!';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    animation: fadeInOut 1s ease;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Copy Icon Animation */
.copy-icon {
    margin-left: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.copyable:hover .copy-icon {
    opacity: 1;
}

.copyable.copied .copy-icon {
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
    z-index: 10000;
    border: 1px solid var(--border-color);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.toast.success::before {
    content: '✓';
    margin-right: 0.5rem;
    font-weight: bold;
}

.toast.error {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.toast.error::before {
    content: '✗';
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Mobile Responsive - Enhanced Breakpoints */

/* Extra Large Screens - Desktop (1280px and up) */
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
    
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .converter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Screens - Small Desktop (1024px to 1279px) */
@media (max-width: 1279px) {
    .container {
        max-width: 1024px;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
}

/* Medium Screens - Tablets (768px to 1023px) */
@media (max-width: 1023px) {
    .container {
        max-width: 768px;
        padding: 0 1.5rem;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .converter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Small Tablets and Large Phones (640px to 767px) */
@media (max-width: 767px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-wrapper {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .converter-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .hero-secondary h1 {
        font-size: 1.75rem;
    }
    
    .usage-grid {
        grid-template-columns: 1fr;
    }
    
    .related-standards {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Medium Phones (480px to 639px) */
@media (max-width: 639px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .standard-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
    
    .feature {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .converter-card {
        padding: 1.5rem;
    }
    
    .quick-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
    }
}

/* Small Phones (320px to 479px) */
@media (max-width: 479px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }
    
    .search-input {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
    
    .search-btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    h2 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    .standard-card {
        padding: 1.25rem;
    }
    
    .card-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .feature {
        padding: 1rem;
    }
    
    .feature-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .converter-card {
        padding: 1.25rem;
    }
    
    .converter-card h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .converter-card input {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        flex: 1 1 100%;
    }
    
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-section a {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1.25rem;
    }
    
    .cta-section {
        padding: 3rem 0;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
    }
    
    .cta-section p {
        font-size: 1rem;
    }
    
    /* Tables on small screens */
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    /* Modal adjustments */
    .detail-header {
        padding: 1rem;
    }
    
    .detail-content {
        padding: 1rem;
    }
    
    .detail-title {
        font-size: 1.25rem;
    }
}

/* Extra Small Phones (below 320px) */
@media (max-width: 319px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero h1 {
        font-size: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
    }
    
    .search-input {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    h2 {
        font-size: 1.125rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    .standard-card {
        padding: 1rem;
    }
    
    .card-icon {
        font-size: 1.75rem;
    }
}

/* Landscape Orientation Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .section {
        padding: 2rem 0;
    }
}