/* ============================================
   World Textile Group LLC - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2442;
    --secondary: #2c5282;
    --accent: #ed8936;
    --accent-hover: #dd6b20;
    --light: #f7fafc;
    --light-gray: #edf2f7;
    --dark: #1a202c;
    --gray: #718096;
    --gray-dark: #4a5568;
    --white: #ffffff;
    --shadow: 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);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --max-width: 1200px;
}

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

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

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

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray-dark);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   Header Styles
   ============================================ */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-text span {
    color: var(--accent);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

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

.nav-link {
    font-weight: 500;
    color: var(--gray-dark);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: 3rem 0;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

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

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 5rem 0;
}

.section-light {
    background-color: var(--light);
}

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

.section-dark h2,
.section-dark h3 {
    color: var(--white);
}

.section-dark p {
    color: rgba(255, 255, 255, 0.9);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
}

/* ============================================
   Cards
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.75rem;
}

.card-content p {
    margin-bottom: 1rem;
}

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

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

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

/* ============================================
   Forms
   ============================================ */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-dark);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-family: inherit;
}

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

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    width: 100%;
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.form-success.show {
    display: block;
}

.form-success svg {
    width: 60px;
    height: 60px;
    color: #48bb78;
    margin-bottom: 1rem;
}

/* Honeypot field for spam protection */
.form-honeypot {
    position: absolute;
    left: -9999px;
}

/* ============================================
   Contact Page
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    padding: 2rem;
    background-color: var(--light);
    border-radius: var(--border-radius);
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contact-item p {
    margin-bottom: 0;
    color: var(--gray-dark);
}

.contact-item a {
    color: var(--primary);
}

.contact-item a:hover {
    color: var(--accent);
}

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 400px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   Services Page
   ============================================ */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.service-detail:last-child {
    margin-bottom: 0;
}

.service-detail:nth-child(even) {
    direction: rtl;
}

.service-detail:nth-child(even) > * {
    direction: ltr;
}

.service-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.service-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.service-content h3 {
    margin-bottom: 1rem;
}

.service-content ul {
    margin: 1rem 0;
}

.service-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-dark);
}

.service-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ============================================
   About Page
   ============================================ */
.about-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.about-hero h1 {
    color: var(--white);
}

.about-hero p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

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

.value-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.value-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.value-card p {
    margin-bottom: 0;
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.legal-content h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p,
.legal-content ul,
.legal-content ol {
    margin-bottom: 1rem;
    color: var(--gray-dark);
}

.legal-content ul,
.legal-content ol {
    padding-left: 1.5rem;
}

.legal-content ul {
    list-style-type: disc;
}

.legal-content ol {
    list-style-type: decimal;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: var(--primary);
    text-decoration: underline;
}

.legal-content a:hover {
    color: var(--accent);
}

.last-updated {
    font-style: italic;
    color: var(--gray);
    margin-bottom: 2rem;
}

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-banner-text h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.cookie-banner-text p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.cookie-banner-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-banner-buttons .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background-color: var(--white);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
}

.cookie-modal-content h2 {
    margin-bottom: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-category-header h4 {
    margin-bottom: 0;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--light-gray);
    transition: var(--transition);
    border-radius: 26px;
}

.cookie-toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--accent);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.cookie-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

.footer-logo {
    height: 50px;
    width: auto;
}

.footer h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-contact svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 0.25rem;
    color: var(--accent);
}

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
    padding: 1rem 0;
    background-color: var(--light);
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumbs-list li::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--gray);
}

.breadcrumbs-list li:last-child::after {
    display: none;
}

.breadcrumbs-list a {
    color: var(--gray);
}

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

.breadcrumbs-list li:last-child {
    color: var(--primary);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .service-detail {
        grid-template-columns: 1fr;
    }
    
    .service-detail:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .header-container {
        flex-wrap: wrap;
    }
    
    .nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav.open {
        max-height: 500px;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
        gap: 0;
    }
    
    .nav-link {
        display: block;
        padding: 0.75rem 0;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cookie-banner-content {
        text-align: center;
    }
    
    .cookie-banner-buttons {
        justify-content: center;
    }
    
    .cookie-modal-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 500px;
    }
    
    .hero h1 {
        font-size: 1.875rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: var(--white);
    padding: 8px;
    z-index: 100;
}

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