/* ===== COMPANY PROFILE PAGE STYLES ===== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0f172a 100%);
    color: var(--white);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.page-header::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.page-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.breadcrumb-section {
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    margin: 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    opacity: 0.6;
}

.breadcrumb-link {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.breadcrumb-item.active {
    opacity: 1;
    font-weight: 500;
}

.page-title-section {
    margin-bottom: 2rem;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.back-button-section {
    margin-top: 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* PDF Viewer Section */
.pdf-viewer-section {
    background: var(--light-gray);
    min-height: 80vh;
}

.pdf-viewer-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(47, 90, 142, 0.1);
    overflow: hidden;
    border: 1px solid rgba(47, 90, 142, 0.08);
}

/* PDF Controls */
.pdf-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--white) 0%, rgba(47, 90, 142, 0.02) 100%);
    border-bottom: 1px solid rgba(47, 90, 142, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.controls-left,
.controls-center,
.controls-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 1px solid rgba(47, 90, 142, 0.2);
    border-radius: 10px;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.control-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(47, 90, 142, 0.3);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.control-btn:disabled:hover {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: none;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: var(--primary-blue);
    min-width: 60px;
    justify-content: center;
}

.page-separator {
    opacity: 0.6;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(47, 90, 142, 0.05);
    padding: 0.5rem;
    border-radius: 12px;
}

.zoom-reset {
    background: rgba(47, 90, 142, 0.05);
    border: 1px solid rgba(47, 90, 142, 0.15);
    width: auto;
    padding: 0 0.75rem;
    min-width: 60px;
}

.zoom-reset:hover {
    background: rgba(47, 90, 142, 0.1);
    border-color: rgba(47, 90, 142, 0.3);
}

.zoom-level {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fullscreen-btn {
    background: rgba(47, 90, 142, 0.1);
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #e6b82e 100%);
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 198, 58, 0.4);
    background: linear-gradient(135deg, #f4d04e 0%, var(--accent-gold) 100%);
}

/* PDF Canvas Container */
.pdf-canvas-container {
    position: relative;
    min-height: 700px;
    background: linear-gradient(135deg, var(--light-gray) 0%, rgba(30, 41, 59, 0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 2.5rem;
    direction: ltr; /* Ensure proper PDF rendering direction */
}

.pdf-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    background: var(--white);
    border: 1px solid rgba(47, 90, 142, 0.1);
    transition: all 0.3s ease;
    /* Optimize for Arabic text rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.pdf-canvas:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transform: scale(1.005);
}

/* Arabic text optimization */
.pdf-canvas {
    font-feature-settings: "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    color: var(--primary-blue);
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(47, 90, 142, 0.1);
    border-left: 4px solid var(--primary-blue);
    border-top: 4px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    box-shadow: 0 4px 12px rgba(47, 90, 142, 0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
    text-align: center;
    color: var(--primary-blue);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Mobile Page Navigation */
.mobile-page-nav {
    display: none;
    padding: 1rem 1.5rem;
    background: var(--light-gray);
    border-top: 1px solid rgba(47, 90, 142, 0.1);
}

.page-slider {
    width: 100%;
    height: 6px;
    background: rgba(47, 90, 142, 0.1);
    border-radius: 3px;
    outline: none;
    margin-bottom: 0.5rem;
    -webkit-appearance: none;
    appearance: none;
}

.page-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-gold);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(244, 198, 58, 0.4);
}

.page-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-gold);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(244, 198, 58, 0.4);
}

.page-slider-info {
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary-blue);
    font-weight: 500;
}

/* Fullscreen Mode */
.pdf-viewer-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    max-width: none;
    max-height: none;
}

.pdf-viewer-container.fullscreen .pdf-canvas-container {
    min-height: calc(100vh - 80px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-header {
        padding: 100px 0 60px;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .pdf-controls {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .controls-center {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .pdf-canvas-container {
        padding: 1.5rem;
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 80px 0 50px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .back-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .pdf-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
        background: linear-gradient(135deg, var(--white) 0%, rgba(47, 90, 142, 0.03) 100%);
    }
    
    .controls-left,
    .controls-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .controls-center {
        order: 2;
        margin-top: 0;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
        border-radius: 8px;
    }
    
    .zoom-reset {
        min-width: 55px;
        padding: 0 0.5rem;
    }
    
    .zoom-level {
        font-size: 0.75rem;
    }
    
    .download-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .pdf-canvas-container {
        padding: 0.75rem;
        min-height: 450px;
        background: linear-gradient(135deg, var(--light-gray) 0%, rgba(30, 41, 59, 0.05) 100%);
    }
    
    .pdf-canvas {
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }
    
    .mobile-page-nav {
        display: block;
        background: linear-gradient(135deg, var(--light-gray) 0%, rgba(47, 90, 142, 0.02) 100%);
    }
    
    /* Hide desktop page controls on mobile */
    .controls-left .page-info {
        display: none;
    }
    
    /* Optimize for Arabic text on mobile */
    .pdf-viewer-container {
        border-radius: 15px;
        margin: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 70px 0 40px;
    }
    
    .page-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .page-subtitle {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .breadcrumb-item {
        font-size: 0.8rem;
    }
    
    .pdf-controls {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .control-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        border-radius: 6px;
    }
    
    .zoom-reset {
        min-width: 50px;
        padding: 0 0.375rem;
    }
    
    .zoom-level {
        font-size: 0.7rem;
    }
    
    .download-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .pdf-canvas-container {
        padding: 0.5rem;
        min-height: 400px;
        background: linear-gradient(135deg, var(--light-gray) 0%, rgba(30, 41, 59, 0.06) 100%);
    }
    
    .pdf-canvas {
        border-radius: 6px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* Enhanced mobile page navigation for Arabic */
    .mobile-page-nav {
        padding: 0.875rem 1rem;
    }
    
    .page-slider-info {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
    
    /* Optimize container for small screens */
    .pdf-viewer-container {
        border-radius: 12px;
        margin: 0 0.25rem;
    }
}

/* Print Styles */
@media print {
    .page-header,
    .pdf-controls,
    .mobile-page-nav,
    .footer {
        display: none !important;
    }
    
    .pdf-viewer-section {
        background: var(--white);
        padding: 0;
    }
    
    .pdf-viewer-container {
        box-shadow: none;
        border: none;
        border-radius: 0;
    }
    
    .pdf-canvas-container {
        padding: 0;
        background: var(--white);
    }
}
