File size: 11,490 Bytes
d0a2071 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | /* ==============================================
التصميم المتجاوب - مشروع سياسة أمان المحتوى
Responsive Design for Mobile, Tablet & Desktop
============================================== */
/* Mobile First Approach */
/* Mobile Styles (< 768px) */
@media (max-width: 767px) {
/* Typography Adjustments */
h1 { font-size: 32px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
.hero-title {
font-size: 32px;
}
.hero-subtitle {
font-size: 18px;
}
.section-title {
font-size: 28px;
}
/* Container Adjustments */
.container {
padding: 0 var(--space-md);
}
/* Navigation Mobile */
.nav-links {
display: none;
position: fixed;
top: 64px;
left: 0;
right: 0;
background: var(--neutral-900);
flex-direction: column;
padding: var(--space-lg);
border-bottom: 1px solid var(--neutral-800);
z-index: 999;
gap: var(--space-md);
}
.nav-links.active {
display: flex;
}
.nav-toggle {
display: flex;
}
.nav-toggle.active span:nth-child(1) {
transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
transform: rotate(-45deg) translate(7px, -6px);
}
/* Hero Section Mobile */
.hero {
flex-direction: column;
text-align: center;
padding: var(--space-xxl) 0;
min-height: auto;
}
.hero-content {
max-width: 100%;
margin-bottom: var(--space-xl);
}
.hero-visual {
position: static;
transform: none;
opacity: 0.6;
}
.hero-image {
max-width: 250px;
}
.hero-actions {
flex-direction: column;
align-items: center;
gap: var(--space-sm);
}
.hero-stats {
justify-content: center;
flex-wrap: wrap;
gap: var(--space-lg);
}
/* Grid Adjustments */
.guide-grid,
.tools-grid,
.technologies-grid {
grid-template-columns: 1fr;
gap: var(--space-lg);
}
/* Cards Mobile */
.guide-card,
.tool-card,
.tech-card {
padding: var(--space-lg);
}
.card-icon {
width: 48px;
height: 48px;
}
.tool-icon {
width: 60px;
height: 60px;
}
/* Examples Section Mobile */
.examples-tabs {
flex-direction: column;
gap: var(--space-xs);
}
.tab-btn {
width: 100%;
text-align: center;
}
.example-header {
flex-direction: column;
align-items: flex-start;
gap: var(--space-sm);
}
.code-container {
font-size: 12px;
padding: var(--space-md);
}
/* Modal Mobile */
.modal-content {
width: 95%;
margin: var(--space-md);
}
.modal-header {
padding: var(--space-md);
}
.modal-body {
padding: var(--space-md);
}
.builder-tabs {
flex-direction: column;
}
/* Footer Mobile */
.footer-content {
grid-template-columns: 1fr;
gap: var(--space-lg);
}
.footer-social {
justify-content: center;
}
.footer-links {
text-align: center;
}
/* Spacing Adjustments */
section {
padding: var(--space-xl) 0;
}
.section-header {
margin-bottom: var(--space-xl);
}
.hero {
padding: var(--space-xl) 0;
}
/* Form Elements Mobile */
.form-group input,
.form-group textarea {
font-size: 16px; /* Prevents zoom on iOS */
}
.demo-controls {
flex-direction: column;
}
/* Touch Targets */
.btn,
.card-btn,
.tab-btn {
min-height: 44px;
touch-action: manipulation;
}
/* Code Block Mobile */
.code-content {
font-size: 12px;
overflow-x: auto;
white-space: pre-wrap;
word-wrap: break-word;
}
}
/* Tablet Styles (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
/* Container */
.container {
padding: 0 var(--space-xl);
}
/* Hero Section Tablet */
.hero-content {
max-width: 600px;
}
.hero-visual {
right: var(--space-xl);
}
.hero-image {
max-width: 300px;
}
/* Grid Adjustments Tablet */
.guide-grid,
.tools-grid {
grid-template-columns: repeat(2, 1fr);
}
.technologies-grid {
grid-template-columns: repeat(2, 1fr);
}
/* Navigation Tablet */
.nav-links {
gap: var(--space-md);
}
.nav-link {
font-size: 14px;
}
/* Cards Tablet */
.guide-card,
.tool-card {
padding: var(--space-xl);
}
/* Examples Tablet */
.examples-tabs {
gap: var(--space-md);
}
.tab-btn {
font-size: 14px;
padding: var(--space-sm) var(--space-lg);
}
/* Modal Tablet */
.modal-content {
width: 85%;
}
/* Footer Tablet */
.footer-content {
grid-template-columns: repeat(2, 1fr);
}
}
/* Large Desktop Styles (> 1280px) */
@media (min-width: 1281px) {
/* Enhanced spacing for large screens */
.container {
max-width: 1400px;
}
.hero-content {
max-width: 900px;
}
.section-title {
font-size: 40px;
}
.hero-title {
font-size: 56px;
}
.hero-subtitle {
font-size: 28px;
}
/* Enhanced grid for large screens */
.guide-grid,
.tools-grid {
grid-template-columns: repeat(4, 1fr);
}
.technologies-grid {
grid-template-columns: repeat(3, 1fr);
}
/* Enhanced cards */
.guide-card,
.tool-card,
.tech-card {
padding: var(--space-xl);
}
/* Enhanced typography */
body {
font-size: 18px;
}
.code-container {
font-size: 15px;
}
}
/* Extra Large Desktop (> 1600px) */
@media (min-width: 1601px) {
.container {
max-width: 1600px;
}
.hero-content {
max-width: 1000px;
}
.guide-grid,
.tools-grid {
grid-template-columns: repeat(5, 1fr);
}
.technologies-grid {
grid-template-columns: repeat(4, 1fr);
}
}
/* Landscape Mobile Optimizations */
@media (max-width: 767px) and (orientation: landscape) {
.hero {
padding: var(--space-lg) 0;
}
.hero-title {
font-size: 28px;
}
.hero-subtitle {
font-size: 16px;
}
.hero-description {
font-size: 16px;
}
.hero-visual {
display: none; /* Hide hero image in landscape mobile */
}
section {
padding: var(--space-lg) 0;
}
}
/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
/* Enhance images and icons for high DPI displays */
.nav-icon,
.btn-icon,
.tool-icon,
.card-icon {
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
}
}
/* Dark Mode Enhancements (already dark-first) */
@media (prefers-color-scheme: dark) {
/* Additional dark mode adjustments if needed */
:root {
/* Already optimized for dark mode */
}
}
/* Light Mode Support */
@media (prefers-color-scheme: light) {
:root {
/* Override dark theme for light mode preference */
--neutral-950: #FAFAFA;
--neutral-900: #FFFFFF;
--neutral-800: #F3F4F6;
--neutral-200: #374151;
--neutral-50: #111827;
--primary-500: #059669;
--primary-700: #047857;
--primary-100: #D1FAE5;
}
body {
background: var(--neutral-950);
color: var(--neutral-200);
}
.navbar {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
}
.guide-card,
.tool-card,
.tech-card,
.modal-content {
background: var(--neutral-900);
border-color: var(--neutral-800);
}
}
/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
.hero-video video {
display: none;
}
.hero-visual {
opacity: 1;
}
}
/* Print Optimizations */
@media print {
.navbar,
.nav-toggle,
.hero-visual,
.modal,
.btn,
.hero-actions {
display: none !important;
}
.hero {
padding: var(--space-lg) 0;
min-height: auto;
}
.hero-content {
max-width: 100%;
}
body {
background: white;
color: black;
font-size: 12pt;
line-height: 1.4;
}
h1, h2, h3, h4, h5, h6 {
color: black;
page-break-after: avoid;
}
.guide-card,
.tool-card,
.tech-card {
background: white;
border: 1px solid #ccc;
page-break-inside: avoid;
margin-bottom: var(--space-md);
}
.code-container {
background: #f5f5f5;
border: 1px solid #ccc;
font-size: 10pt;
}
.section-header {
page-break-after: avoid;
}
.footer {
background: white;
border-top: 1px solid #ccc;
margin-top: var(--space-lg);
}
}
/* Accessibility Enhancements */
@media (prefers-contrast: high) {
:root {
--neutral-950: #000000;
--neutral-900: #1a1a1a;
--neutral-800: #404040;
--neutral-200: #ffffff;
--neutral-50: #ffffff;
--primary-500: #00ffff;
--primary-700: #00cccc;
}
.btn,
.card-btn,
.tab-btn {
border-width: 2px;
}
.guide-card,
.tool-card,
.tech-card {
border-width: 2px;
}
.modal-content {
border-width: 2px;
}
}
/* Focus Management for Mobile */
@media (max-width: 767px) {
.btn:focus,
.card-btn:focus,
.tab-btn:focus,
.nav-link:focus {
outline: 3px solid var(--primary-500);
outline-offset: 2px;
}
/* Ensure focus is visible */
*:focus {
outline: 2px solid var(--primary-500);
outline-offset: 2px;
}
}
/* Custom Scrollbar for Webkit Browsers */
@media (min-width: 768px) {
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
background: var(--neutral-950);
}
::-webkit-scrollbar-thumb {
background: var(--neutral-700);
border-radius: 6px;
border: 2px solid var(--neutral-950);
}
::-webkit-scrollbar-thumb:hover {
background: var(--primary-500);
}
::-webkit-scrollbar-corner {
background: var(--neutral-950);
}
}
/* Selection Styling */
::selection {
background: var(--primary-500);
color: var(--neutral-950);
}
::-moz-selection {
background: var(--primary-500);
color: var(--neutral-950);
}
/* Smooth Scrolling (only if not reduced motion) */
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}
/* Loading States for Mobile */
@media (max-width: 767px) {
.loading-spinner {
width: 32px;
height: 32px;
border-width: 3px;
}
.loading-dots span {
width: 12px;
height: 12px;
}
}
/* Touch Gestures Support */
@media (hover: none) and (pointer: coarse) {
/* Increase touch targets */
.btn,
.card-btn,
.tab-btn,
.nav-link {
min-height: 48px;
min-width: 48px;
}
/* Improve tap targets */
.interactive-list li {
padding: var(--space-lg);
}
/* Remove hover effects on touch devices */
.guide-card:hover,
.tool-card:hover,
.tech-card:hover {
transform: none;
box-shadow: none;
}
}
/* Landscape Tablet Optimizations */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
.hero {
padding: var(--space-lg) 0;
}
.hero-content {
max-width: 70%;
}
.hero-visual {
max-width: 25%;
}
.guide-grid,
.tools-grid {
grid-template-columns: repeat(3, 1fr);
}
}
/* Narrow Desktop (< 1200px) */
@media (min-width: 1024px) and (max-width: 1199px) {
.container {
max-width: 1100px;
}
.guide-grid,
.tools-grid {
grid-template-columns: repeat(3, 1fr);
}
.technologies-grid {
grid-template-columns: repeat(2, 1fr);
}
} |