/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

html, body {
    scroll-behavior: auto;
    scroll-padding-top: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #E5E7EB;
    background-color: #1F2937;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #1F2937;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #4B5563;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4B5563;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: #1F2937;
    color: #FFFFFF;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
    text-align: left;
    min-height: 60vh;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.1;
    white-space: nowrap;
}

.highlight {
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-logo-img {
    height: 240px;
    width: auto;
    opacity: 1;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    flex-shrink: 0;
}

.hero-logo-img:hover {
    transform: scale(1.05);
}

.hero-content {
    text-align: left;
    max-width: 1400px;
    margin: 0;
    width: 100%;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: #4B5563;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(75, 85, 99, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 85, 99, 0.4);
    background: #374151;
}

.btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
}

.btn-secondary:hover {
    background: #FFFFFF;
    color: #1F2937;
    transform: translateY(-2px);
}

/* Logout buttons in tool interfaces (bright theme) */
.stdf-interface .btn-secondary,
.wafer-interface .btn-secondary {
    background: transparent;
    color: #1F2937;
    border: 2px solid #1F2937;
}

.stdf-interface .btn-secondary:hover,
.wafer-interface .btn-secondary:hover {
    background: #1F2937;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Section Styles */
section {
    padding: 80px 0;
}

/* Reduce padding for STDF and Wafer sections */
.stdf-parser {
    padding-top: 80px;
    padding-bottom: 20px;
}

.wafer-classification {
    padding-top: 20px;
    padding-bottom: 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header[style*="display: none"] {
    margin-bottom: 0;
    height: 0;
    overflow: hidden;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #D1D5DB;
    max-width: 600px;
    margin: 0 auto;
}

/* Keep STDF parser subtitle on one line */
#stdf-parser .section-subtitle {
    white-space: nowrap;
    max-width: none;
}

/* About Section */
.about {
    background-color: #1F2937;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #E5E7EB;
    line-height: 1.8;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.expertise-item {
    background: #374151;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s ease;
}

.expertise-item:hover {
    transform: translateY(-5px);
}

.expertise-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 15px;
}

.expertise-item p {
    color: #D1D5DB;
    line-height: 1.6;
}

/* Services Section */
.services {
    background: #1F2937;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1600px;
    margin: 0 auto;
}

.service-card {
    background: #374151;
    border: 1px solid #4B5563;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: #6B7280;
}

.service-card.featured {
    border: 2px solid #6B7280;
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
}

.service-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: 20px;
    right: -30px;
    background: #4B5563;
    color: #FFFFFF;
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(45deg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-icon i {
    color: #4B5563;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.service-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #059669;
    margin-bottom: 20px;
}

.service-card p {
    color: #D1D5DB;
    margin-bottom: 25px;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
    flex-grow: 1;
}

.service-features li {
    padding: 8px 0;
    color: #E5E7EB;
    position: relative;
    padding-left: 25px;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: bold;
}

/* Align buttons at bottom of service cards */
.service-card .btn {
    margin-top: auto;
}

/* STDF Parser Section */
.stdf-parser {
    background: #1F2937;
    min-height: 80vh;
}

.stdf-parser #stdf-section-header[style*="display: none"] ~ .stdf-content {
    margin-top: 0;
    padding-top: 0;
}

.stdf-parser #stdf-section-header[style*="display: none"] {
    margin-bottom: 0;
    padding: 0;
    height: 0;
    overflow: hidden;
}

.stdf-content {
    max-width: 1400px;
    margin: 0 auto;
}

.stdf-access-control {
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 40px;
}

.access-prompt h3 {
    font-size: 1.8rem;
    color: #1F2937;
    margin-bottom: 15px;
}

.access-prompt p {
    color: #4B5563;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.email-input-group {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto 30px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.email-input-group input {
    flex: 2;
    min-width: 350px;
    padding: 18px 24px;
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
    height: 56px;
    background: white;
    color: #1F2937;
}

.email-input-group input:focus {
    outline: none;
    border-color: #4B5563;
    background: white;
}

.email-input-group input::placeholder {
    color: #9CA3AF;
}

.email-input-group .btn {
    flex: 1;
    min-width: 150px;
    padding: 18px 24px;
    height: 56px;
    font-size: 1rem;
}

.access-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.access-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.access-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.access-status.loading {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Progress indicator styles */
.progress-container {
    margin-top: 20px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4B5563, #6B7280);
    border-radius: 3px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.progress-fill.loading {
    animation: progress-animation 3s ease-out forwards;
}

@keyframes progress-animation {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

.progress-text {
    color: #4B5563;
    font-size: 0.9rem;
    font-weight: 500;
}

.stdf-interface {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.stdf-header {
    background: #F9FAFB;
    color: #1F2937;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid #E5E7EB;
}

.stdf-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info span {
    color: #1F2937;
    font-weight: 500;
}

.stdf-upload-container {
    padding: 30px;
    background: #F9FAFB;
    border-radius: 0 0 16px 16px;
    margin-bottom: 0;
}

.stdf-interface {
    margin-bottom: 0;
}

.wafer-upload-container {
    margin-bottom: 0;
}

.wafer-interface {
    margin-bottom: 0;
}

.stdf-processing-progress {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E7EB;
}

.processing-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.processing-progress-header h4 {
    margin: 0;
    color: #1F2937;
    font-size: 1.25rem;
}

.processing-progress-header span {
    color: #4B5563;
    font-weight: 600;
    font-size: 1.1rem;
}

.processing-progress-bar {
    width: 100%;
    height: 30px;
    background: #E5E7EB;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.processing-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4B5563, #6B7280, #9CA3AF);
    border-radius: 15px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.processing-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.processing-progress-text {
    text-align: center;
    color: #4B5563;
    font-size: 0.95rem;
    font-weight: 500;
}

.stdf-upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.upload-area {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    border: 2px dashed #D1D5DB;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #4B5563;
    background: #F9FAFB;
}

.upload-icon {
    font-size: 3rem;
    color: #9CA3AF;
    margin-bottom: 20px;
}

.upload-area h4 {
    margin: 0 0 10px 0;
    color: #1F2937;
    font-size: 1.25rem;
}

.upload-area p {
    margin: 0 0 20px 0;
    color: #4B5563;
    font-size: 0.9rem;
}

.file-limit-note {
    margin: 5px 0 15px 0;
    color: #6B7280;
    font-size: 0.85rem;
    font-style: italic;
}

.selected-files-list {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.selected-files-header {
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.selected-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #E5E7EB;
    font-size: 0.85rem;
}

.selected-file-item:last-child {
    border-bottom: none;
}

.file-number {
    color: #6B7280;
    font-weight: 500;
    min-width: 20px;
}

.file-name {
    flex: 1;
    color: #1F2937;
    word-break: break-word;
}

.file-size {
    color: #6B7280;
    font-weight: 500;
    white-space: nowrap;
}

.selected-files-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #E5E7EB;
    font-weight: 600;
    color: #1F2937;
    font-size: 0.9rem;
}

.processing-options {
    background: white;
    border-radius: 12px;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    visibility: visible;
    min-height: 200px;
    border: 1px solid #E5E7EB;
}

.processing-options-left,
.processing-options-right {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .processing-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.processing-options .form-group {
    margin-bottom: 20px;
    display: block;
    visibility: visible;
}

.processing-options label {
    display: block;
    margin-bottom: 8px;
    color: #1F2937;
    font-weight: 500;
    font-size: 0.9rem;
    visibility: visible;
}

.processing-options .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1F2937;
    background: white;
    transition: border-color 0.3s ease;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 40px !important;
    appearance: menulist !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    cursor: pointer;
}

.processing-options select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234B5563' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 40px !important;
    min-height: 40px !important;
    width: 100% !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.processing-options select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1F2937;
    background: white;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4B5563;
    box-shadow: 0 0 0 3px rgba(75, 85, 99, 0.1);
}

.stdf-results-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    border: 1px solid #E5E7EB;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E5E7EB;
}

.results-header h4 {
    margin: 0;
    color: #1F2937;
    font-size: 1.25rem;
}

.results-content {
    margin-bottom: 20px;
}

/* Download individual files section - ensure text is visible */
.results-content strong {
    color: #1F2937;
}

.results-content div[style*="background: #F9FAFB"] {
    color: #1F2937 !important;
}

.results-content div[style*="background: #F9FAFB"] strong {
    color: #1F2937 !important;
}

.results-content div[style*="background: #F9FAFB"] p {
    color: #4B5563 !important;
}

.results-content div[style*="background: #F9FAFB"] button {
    color: #FFFFFF !important;
}

/* Override grey text colors during processing - make them visible */
.stdf-interface p[style*="color: #6B7280"],
.stdf-interface span[style*="color: #6B7280"],
.stdf-interface p[style*="color: #9CA3AF"],
.stdf-interface span[style*="color: #9CA3AF"] {
    color: #4B5563 !important;
}

.stdf-results-section p[style*="color: #6B7280"],
.stdf-results-section span[style*="color: #6B7280"],
.stdf-results-section p[style*="color: #9CA3AF"],
.stdf-results-section span[style*="color: #9CA3AF"] {
    color: #4B5563 !important;
}

.stdf-processing-progress p[style*="color: #6B7280"],
.stdf-processing-progress span[style*="color: #6B7280"],
.stdf-processing-progress p[style*="color: #9CA3AF"],
.stdf-processing-progress span[style*="color: #9CA3AF"] {
    color: #4B5563 !important;
}

/* Processing output divs - ensure text is visible */
#stdf-processing-output,
.stdf-interface div[style*="background: #F9FAFB"] {
    color: #1F2937 !important;
}

.stdf-interface div[style*="background: #F9FAFB"] p,
.stdf-interface div[style*="background: #F9FAFB"] span {
    color: #4B5563 !important;
}

.stdf-interface div[style*="background: #F9FAFB"] span[style*="color: #9CA3AF"] {
    color: #6B7280 !important;
}

/* Result info divs during processing */
.result-info {
    text-align: center;
    padding: 20px;
    color: #1F2937;
}

.result-info p {
    color: #1F2937 !important;
    margin: 10px 0;
}

.result-info i {
    color: #4B5563;
}

/* Processing log output */
#stdf-log-output {
    color: #1F2937 !important;
}

#stdf-log-output div {
    color: #1F2937 !important;
}

#stdf-log-output h6 {
    color: #1F2937 !important;
}

/* Ensure all h6 elements in processing sections are visible */
.stdf-interface h6,
.stdf-results-section h6 {
    color: #1F2937 !important;
}

/* Wafer classification results - ensure text is visible */
#wafer-results-content div[style*="background: #F9FAFB"] {
    color: #1F2937 !important;
}

#wafer-results-content div[style*="background: #F9FAFB"] strong {
    color: #1F2937 !important;
}

#wafer-results-content div[style*="background: #F9FAFB"] p {
    color: #4B5563 !important;
}

#wafer-results-content h5 {
    color: #1F2937;
    margin-top: 0;
    margin-bottom: 15px;
}

#wafer-results-content p[style*="color: #6B7280"] {
    color: #4B5563 !important;
}

/* Wafer results section */
.wafer-results-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    border: 1px solid #E5E7EB;
}

/* Wafer results content with scrollable area */
#wafer-results-content {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    margin-bottom: 20px;
    color: #1F2937;
}

/* Custom scrollbar for wafer results */
#wafer-results-content::-webkit-scrollbar {
    width: 8px;
}

#wafer-results-content::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 4px;
}

#wafer-results-content::-webkit-scrollbar-thumb {
    background: #9CA3AF;
    border-radius: 4px;
}

#wafer-results-content::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

.result-success {
    text-align: center;
    padding: 30px;
    background: #F0FDF4;
    border-radius: 8px;
    border: 2px solid #86EFAC;
}

.result-success i {
    font-size: 3rem;
    color: #22C55E;
    margin-bottom: 15px;
}

.result-success p {
    margin: 10px 0;
    color: #1F2937;
    font-size: 1rem;
}

.json-result {
    background: #1F2937;
    color: #F9FAFB;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.processing-status {
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.processing-status p {
    margin: 8px 0;
    color: #4B5563;
    font-size: 0.9rem;
}

.processing-status strong {
    color: #1F2937;
}

@media (max-width: 768px) {
    .stdf-upload-section {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Wafer Pattern Classification Section */
.wafer-classification {
    background: #1F2937;
    min-height: 80vh;
}

.wafer-classification #wafer-section-header[style*="display: none"] ~ .wafer-content {
    margin-top: 0;
    padding-top: 0;
}

.wafer-classification #wafer-section-header[style*="display: none"] {
    margin-bottom: 0;
    padding: 0;
    height: 0;
    overflow: hidden;
}

.wafer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.wafer-access-control {
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 40px;
}

.wafer-interface {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wafer-header {
    background: #F9FAFB;
    color: #1F2937;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid #E5E7EB;
}

.wafer-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.wafer-iframe-container {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 700px;
    margin: 0;
    padding: 0;
}

.wafer-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #F9FAFB;
    border-radius: 0 0 16px 16px;
}

/* Contact Section */
.contact {
    background: #1F2937;
    color: #FFFFFF;
}

.contact .section-title,
.contact .section-subtitle {
    color: #FFFFFF;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #FFFFFF;
}

.contact-item {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #E5E7EB;
}

.contact-item strong {
    color: #FFFFFF;
}

.contact-form {
    background: #374151;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #FFFFFF;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #FFFFFF;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #4B5563;
    border-radius: 8px;
    background: #1F2937;
    color: #FFFFFF;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9CA3AF;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6B7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.2);
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo-img {
    height: 30px;
    width: auto;
    border-radius: 6px;
}

.footer-logo-text {
    font-size: 20px;
    font-weight: 700;
}

.footer-tagline {
    font-size: 1.1rem;
    color: #4B5563;
    margin-bottom: 15px;
}

.footer-copyright {
    color: #6B7280;
    font-size: 0.9rem;
}

.footer-disclaimer {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid #3B82F6;
}

.footer-disclaimer p {
    color: #E5E7EB;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

.footer-disclaimer strong {
    color: #FFFFFF;
}

/* Data Disclaimer Styles */
.data-disclaimer {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3B82F6;
}

.data-disclaimer i {
    color: #3B82F6;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.disclaimer-content {
    flex: 1;
    color: #1E40AF;
    font-size: 0.9rem;
    line-height: 1.6;
}

.disclaimer-content strong {
    color: #1E3A8A;
    display: block;
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .stdf-access-control {
        padding: 30px 20px;
    }
    
    .email-input-group {
        flex-direction: column;
        align-items: center;
        max-width: 400px;
    }
    
    .email-input-group input {
        min-width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .email-input-group .btn {
        min-width: 100%;
        max-width: 100%;
    }
    
    .stdf-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stdf-iframe-container {
        height: 65vh;
        min-height: 600px;
    }
    
    .wafer-access-control {
        padding: 30px 20px;
    }
    
    .wafer-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .wafer-iframe-container {
        height: 65vh;
        min-height: 600px;
    }
    
    .data-disclaimer {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .data-disclaimer i {
        font-size: 1.25rem;
    }
    
    .disclaimer-content {
        font-size: 0.85rem;
    }
    
    .footer-disclaimer {
        padding: 12px 15px;
        margin: 15px auto;
    }
    
    .footer-disclaimer p {
        font-size: 0.8rem;
    }
}
