/* ============================================
   Proto Chemical Industries - SEO-Optimized Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #1a5f7a;
    --secondary-color: #159895;
    --accent-color: #57c5b6;
    --text-dark: #1a1a2e;
    --text-light: #4a4a6a;
    --text-muted: #6c6c8a;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --font-primary: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    --container-max: 1200px;
    --section-padding: 80px;
    --transition: 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover, a:focus {
    color: var(--secondary-color);
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
    font-weight: 600;
}

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

/* Visually Hidden (for screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

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

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 8px 0;
    position: relative;
}

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

.main-nav a[aria-current="page"] {
    color: var(--primary-color);
    font-weight: 600;
}

.main-nav a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.cta-button {
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
}

.cta-button:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-top: 32px;
}

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

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8f4f8 100%);
    padding: 80px 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Stats Section */
.stats {
    background: var(--primary-color);
    color: white;
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Products Section */
.products {
    padding: var(--section-padding) 0;
    background: var(--bg-white);
}

.products h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 12px;
}

.section-intro {
    text-align: center;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 48px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-card h3 {
    padding: 20px 24px 8px;
    font-size: 1.2rem;
}

.product-card h3 a {
    color: var(--text-dark);
}

.product-card h3 a:hover {
    color: var(--primary-color);
}

.product-card p {
    padding: 0 24px 16px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.product-badges {
    padding: 0 24px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gmp { background: #dcfce7; color: #166534; }
.badge-fda { background: #dbeafe; color: #1e40af; }
.badge-pharma { background: #fce7f3; color: #9d174d; }
.badge-fcc { background: #fef3c7; color: #92400e; }
.badge-healthcare { background: #e0e7ff; color: #3730a3; }
.badge-hospital { background: #fecaca; color: #991b1b; }
.badge-cosmetic { background: #f3e8ff; color: #6b21a8; }
.badge-preservative { background: #ccfbf1; color: #0f766e; }
.badge-surgical { background: #fee2e2; color: #991b1b; }
.badge-oem { background: #e0f2fe; color: #0c4a6e; }
.badge-ar { background: #f1f5f9; color: #475569; }
.badge-acs { background: #e2e8f0; color: #334155; }
.badge-custom { background: #fef9c3; color: #713f12; }
.badge-purity { background: #d1fae5; color: #065f46; }
.badge-polymer { background: #ede9fe; color: #5b21b6; }
.badge-automotive { background: #dbeafe; color: #1e3a8a; }
.badge-reach { background: #cffafe; color: #155e75; }
.badge-coa { background: #f0fdf4; color: #15803d; }
.badge-usp { background: #eff6ff; color: #1e40af; }

/* Industries Section */
.industries {
    padding: var(--section-padding) 0;
    background: var(--bg-light);
}

.industries h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 12px;
}

.industry-list {
    list-style: none;
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.industry-list li {
    background: var(--bg-white);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition), box-shadow var(--transition);
}

.industry-list li:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.industry-list a {
    color: var(--text-dark);
    display: block;
}

.industry-list a:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.industry-list strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

/* Certifications Section */
.certifications {
    padding: var(--section-padding) 0;
    background: var(--bg-white);
}

.certifications h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 12px;
}

.cert-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.cert-item {
    text-align: center;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    transition: transform var(--transition);
}

.cert-item:hover {
    transform: translateY(-4px);
}

.cert-item img {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    object-fit: contain;
}

.cert-item h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.cert-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.4rem;
    margin-bottom: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Product Detail Pages */
.products-detail {
    padding: var(--section-padding) 0;
    background: var(--bg-white);
}

.product-detail-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.product-detail-section:last-child {
    border-bottom: none;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.product-detail-grid.reversed {
    direction: rtl;
}

.product-detail-grid.reversed > * {
    direction: ltr;
}

.product-detail-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.product-detail-content h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.product-detail-content > p {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.7;
}

.product-list {
    list-style: none;
    margin-bottom: 24px;
}

.product-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

.product-list li:last-child {
    border-bottom: none;
}

.product-list strong {
    color: var(--text-dark);
}

/* About Page */
.about-content {
    padding: var(--section-padding) 0;
    background: var(--bg-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.mission-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.mission-card {
    background: var(--bg-light);
    padding: 28px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.mission-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.mission-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Industries Served Grid */
.industries-served {
    padding: var(--section-padding) 0;
    background: var(--bg-light);
}

.industries-served h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 12px;
}

.industry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 40px auto 0;
}

.industry-card {
    background: var(--bg-white);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition), box-shadow var(--transition);
}

.industry-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.industry-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.industry-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Facilities */
.facilities {
    padding: var(--section-padding) 0;
    background: var(--bg-white);
}

.facilities h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
}

.facility-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.facility-card {
    background: var(--bg-light);
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.facility-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.facility-card address {
    font-style: normal;
    color: var(--text-light);
    line-height: 1.7;
}

/* Contact Page */
.contact-content {
    padding: var(--section-padding) 0;
    background: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
}

.contact-info h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.contact-location {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
}

.contact-location:last-of-type {
    border-bottom: none;
}

.contact-location h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.contact-location address {
    font-style: normal;
    color: var(--text-light);
    line-height: 1.7;
}

.contact-methods {
    background: var(--bg-light);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-top: 32px;
}

.contact-methods h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.contact-methods p {
    margin-bottom: 8px;
    color: var(--text-light);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--radius-lg);
}

.contact-form-wrapper h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
}

.form-checkbox label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* FAQ */
.faq {
    padding: var(--section-padding) 0;
    background: var(--bg-light);
}

.faq h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-item summary {
    padding: 20px 24px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-dark);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform var(--transition);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 24px 20px;
    color: var(--text-light);
    line-height: 1.7;
}

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

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}

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

.cta-section .btn:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: #a0a0b8;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand img {
    margin-bottom: 16px;
    opacity: 0.9;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-products h3,
.footer-company h3,
.footer-contact h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-products ul,
.footer-company ul {
    list-style: none;
}

.footer-products li,
.footer-company li {
    margin-bottom: 10px;
}

.footer-products a,
.footer-company a {
    color: #a0a0b8;
    font-size: 0.9rem;
}

.footer-products a:hover,
.footer-company a:hover {
    color: white;
}

.footer-contact address {
    font-style: normal;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-contact a {
    color: #a0a0b8;
}

.footer-contact a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: 8px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom a {
    color: #a0a0b8;
    margin: 0 8px;
}

.footer-bottom a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cert-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .industry-list {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .mission-cards {
        grid-template-columns: 1fr;
    }
    
    .industry-grid {
        grid-template-columns: 1fr;
    }
    
    .facility-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .product-detail-grid.reversed {
        direction: ltr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .main-nav {
        display: none; /* Mobile nav would need a hamburger menu implementation */
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .products h2,
    .industries h2,
    .certifications h2,
    .facilities h2,
    .faq h2,
    .industries-served h2 {
        font-size: 1.6rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .cta-button,
    .cta-section,
    .site-footer {
        display: none;
    }
    
    .hero,
    .products,
    .about-content,
    .contact-content {
        padding: 20px 0;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8rem;
        color: #666;
    }
}
