/* Pack & Polish - Production Static Website Styles */

/* Reset and System Font Stack */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --background: #ffffff;
    --surface: #f8fafc;
    --text-primary: #1f2937;
    --text-secondary: #64748b;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-focus: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    font-family: var(--font-system);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--text-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--radius);
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

/* Screen Reader Only */
.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;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Header */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.contact-info a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

.contact-info span {
    color: var(--text-muted);
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Language Toggle */
.lang-toggle {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.lang-toggle:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

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

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

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

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

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

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

/* Background Utilities */
.bg-gray {
    background-color: var(--surface);
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, var(--surface) 0%, #e2e8f0 100%);
}

.hero h1 {
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0 auto 1rem;
    max-width: 800px;
}

.pilot-badge {
    background: var(--accent);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    margin: 1rem auto 2rem;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.hero-image {
    margin-top: 3rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* CTA Buttons */
.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cta {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

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

.cta-secondary {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
}

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

/* Services Grid */
.services-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Service Cards */
.service-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
    height: 100%;
}

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

.service-icon {
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    justify-content: center;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Gallery Section */
.gallery-filters {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-chip {
    background: white;
    border: 2px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active,
.filter-chip[aria-selected="true"] {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-chip:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface);
    aspect-ratio: 3/2;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.gallery-item.hidden {
    display: none;
}

/* Before/After Slider */
.before-after-container {
    max-width: 800px;
    margin: 0 auto;
}

.before-after-slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 3/2;
}

.before-after-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.before-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    z-index: 3;
    cursor: ew-resize;
    transition: var(--transition);
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23374151'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 9l4-4 4 4m0 6l-4 4-4-4'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.slider-controls {
    margin-top: 1rem;
    text-align: center;
}

#beforeAfterRange {
    width: 100%;
    margin-bottom: 0.5rem;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
}

#beforeAfterRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

#beforeAfterRange::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.before-after-caption {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin: 1rem 0 0;
}

/* Sample Report Preview */
.report-preview {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.report-photos {
    margin-bottom: 3rem;
}

.report-photos h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.report-thumbnails {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.report-thumb {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

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

.report-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sample Table */
.sample-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.sample-table th {
    background: var(--surface);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.sample-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
}

.sample-table tbody tr:hover {
    background: var(--surface);
}

.sample-table tbody tr:last-child td {
    border-bottom: none;
}

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

/* Contact Grid */
.contact-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.contact-item svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

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

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    margin-left: 0.5rem;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: bold;
    transition: var(--transition);
    z-index: 1001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
}

.lightbox-prev {
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
}

.lightbox-next {
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}

.lightbox-content {
    display: flex;
    flex-direction: column;
}

.lightbox-image {
    max-width: 80vw;
    max-height: 70vh;
}

.lightbox-image img {
    width: 100%;
    height: auto;
    display: block;
}

.lightbox-info {
    padding: 1.5rem;
    text-align: center;
    background: white;
}

.lightbox-caption {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.lightbox-fullsize {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.lightbox-fullsize:hover {
    color: var(--primary-dark);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    z-index: 100;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

@media (max-width: 768px) {
    .whatsapp-float {
        display: flex;
    }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--text-primary);
    color: white;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.back-to-top:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transform: none;
    }
    .back-to-top:hover {
        transform: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .cta-group {
        flex-direction: column;
        align-items: center;
    }
    
    .cta {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .sample-table {
        font-size: 0.875rem;
    }
    
    .sample-table th,
    .sample-table td {
        padding: 0.5rem;
    }
    
    .header-contact {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.25rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .lightbox-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-image {
        max-width: 95vw;
        max-height: 80vh;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .gallery-filters {
        gap: 0.25rem;
    }
    
    .filter-chip {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .report-thumbnails {
        gap: 0.5rem;
    }
    
    .report-thumb {
        max-width: 30%;
    }
}

/* Print Styles */
@media print {
    .whatsapp-float,
    .back-to-top,
    .lang-toggle,
    .lightbox {
        display: none !important;
    }
    
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    a, a:visited {
        text-decoration: underline;
    }
    
    .hero {
        background: none !important;
    }
    
    .service-card,
    .contact-item {
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
    
    .gallery-item {
        break-inside: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border: #000;
        --text-secondary: #000;
    }
    
    .service-card,
    .contact-item {
        border-width: 2px;
    }
}

/* Focus Management */
.using-keyboard *:focus {
    outline: 2px solid var(--border-focus) !important;
    outline-offset: 2px !important;
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.gallery-item.loading {
    background: var(--surface);
    position: relative;
}

.gallery-item.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--surface) 25%, rgba(248, 250, 252, 0.5) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}