/* ============================================
   SENEL LTD - RESPONSIVE STYLES
   Mobile-First Responsive Design
   ============================================ */

/* ============================================
   LARGE TABLETS (1024px and below)
   ============================================ */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
  
  /* Header */
  .header .container {
    padding: 0 20px;
  }
  
  /* Hero */
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-text p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .trust-badge {
    justify-content: center;
  }
  
  .hero-text h1 {
    font-size: 2.4rem;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  /* Services Detail */
  .service-detail-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .service-detail-grid.reverse {
    direction: ltr;
  }
  
  .service-detail {
    padding: 28px;
  }
  
  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  /* Projects */
  .project-detail-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .project-detail-image img {
    min-height: 250px;
  }
  
  /* About Page */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .about-image img {
    min-height: 300px;
  }
  
  .mission-vision {
    grid-template-columns: 1fr;
  }
  
  .why-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .about-hero-stats {
    grid-template-columns: 1fr 1fr;
  }
  
  /* Blog */
  .blog-grid-full {
    grid-template-columns: 1fr;
  }
  
  /* Testimonials */
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   TABLETS (768px and below)
   ============================================ */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  /* ===== HEADER ===== */
  .header .container {
    padding: 0 12px;
    gap: 8px;
  }
  
  .logo a {
    font-size: 1rem;
  }
  
  .logo img {
    height: 32px;
  }
  
  /* ===== SEARCH ===== */
  .search-container {
    max-width: 140px;
  }
  
  .search-container input {
    padding: 6px 10px 6px 30px;
    font-size: 0.8rem;
  }
  
  .search-container .search-icon {
    left: 10px;
    font-size: 0.8rem;
  }
  
  /* ===== NAVIGATION ===== */
  .nav ul {
    display: none;
    flex-direction: column;
    background: var(--white);
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    padding: 12px 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    gap: 2px;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 999;
  }
  
  .nav ul.open {
    display: flex;
  }
  
  .nav a {
    padding: 10px 14px;
    font-size: 0.95rem;
    width: 100%;
    border-radius: 6px;
  }
  
  .hamburger {
    display: block;
    font-size: 1.2rem;
  }
  
  .dark-mode-toggle {
    font-size: 1rem;
    padding: 4px 8px;
  }
  
  /* ===== HERO ===== */
  .hero {
    padding: 40px 0 60px;
    min-height: auto;
  }
  
  .hero-text h1 {
    font-size: 1.8rem;
  }
  
  .hero-text p {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    min-width: auto;
    padding: 12px 24px;
    font-size: 0.9rem;
  }
  
  .trust-badge {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
  }
  
  .hero-image img {
    border-width: 3px;
  }
  
  /* ===== SECTION HEADERS ===== */
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .section-header {
    margin-bottom: 32px;
  }
  
  .section-sub {
    font-size: 1rem;
  }
  
  /* ===== PARTNERS ===== */
  .partner-logos {
    gap: 20px;
  }
  
  .partner-logos img {
    height: 35px;
  }
  
  /* ===== SERVICES ===== */
  .service-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .service-card {
    padding: 22px 18px;
  }
  
  .service-card i {
    font-size: 2rem;
  }
  
  .service-card h3 {
    font-size: 1rem;
  }
  
  .service-card p {
    font-size: 0.85rem;
  }
  
  /* ===== STATS ===== */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .stat-number {
    font-size: 2.2rem;
  }
  
  .stat-label {
    font-size: 0.85rem;
  }
  
  /* ===== PROJECTS ===== */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .project-card {
    aspect-ratio: 16/9;
  }
  
  .project-detail {
    padding: 20px;
  }
  
  .project-detail-content h2 {
    font-size: 1.3rem;
  }
  
  .project-meta {
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
  }
  
  /* ===== PROJECT GALLERY ===== */
  .gallery-wrapper {
    flex-direction: row;
    padding: 6px;
    gap: 6px;
  }
  
  .gallery-main {
    min-height: 220px;
    max-height: 300px;
  }
  
  .gallery-main img {
    min-height: 220px;
    max-height: 300px;
  }
  
  .gallery-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .gallery-btn.prev-btn { left: 8px; }
  .gallery-btn.next-btn { right: 8px; }
  
  .gallery-counter {
    font-size: 0.7rem;
    padding: 3px 10px;
  }
  
  /* ===== COVERAGE ===== */
  .coverage-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .coverage-stats {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px;
  }
  
  /* ===== CERTIFICATIONS ===== */
  .cert-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  /* ===== METHODOLOGY ===== */
  .methodology-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* ===== BLOG ===== */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .blog-image {
    height: 180px;
  }
  
  .blog-card-full .blog-body {
    padding: 18px 20px;
  }
  
  .blog-card-full .blog-image {
    height: 180px;
  }
  
  .blog-hero h1 {
    font-size: 2rem;
  }
  
  /* ===== BLOG ARTICLE ===== */
  .article-body {
    padding: 30px 24px;
  }
  
  .article-hero h1 {
    font-size: 1.8rem;
  }
  
  /* ===== WHY SENEL ===== */
  .why-senel-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .why-senel-item {
    padding: 22px 16px;
  }
  
  /* ===== ABOUT PAGE ===== */
  .about-hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 20px;
  }
  
  .about-hero-stat .number {
    font-size: 1.5rem;
  }
  
  .about-highlights {
    grid-template-columns: 1fr;
  }
  
  .about-text h2 {
    font-size: 1.8rem;
  }
  
  /* ===== CONTACT PAGE ===== */
  .contact-form-wrapper {
    padding: 24px;
  }
  
  .contact-info h2 {
    font-size: 1.6rem;
  }
  
  /* ===== MAP ===== */
  .map-container iframe {
    height: 300px;
  }
  
  /* ===== FOOTER ===== */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .footer-about p {
    max-width: 100%;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  /* ===== CTA ===== */
  .cta-banner h2 {
    font-size: 1.6rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
    min-width: auto;
  }
  
  /* ===== PAGE HERO ===== */
  .page-hero h1 {
    font-size: 1.8rem;
  }
  
  .page-hero p {
    font-size: 1rem;
  }
  
  /* ===== BUTTONS ===== */
  .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
    min-width: 140px;
  }
  
  .btn-large {
    padding: 14px 32px;
    font-size: 1rem;
    min-width: 180px;
  }
  
  /* ===== FLOATING CONTACT ===== */
  .floating-contact {
    bottom: 14px;
    right: 14px;
    gap: 8px;
  }
  
  .float-whatsapp,
  .float-call {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }
  
  .float-label {
    display: none !important;
  }
  
  /* ===== BACK TO TOP ===== */
  #backToTop {
    bottom: 72px;
    right: 14px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  /* ===== TESTIMONIALS ===== */
  .testimonial-hero h1 {
    font-size: 2rem;
  }
  
  .testimonial-card {
    padding: 24px 20px;
  }
  
  .testimonial-card .testimonial-text {
    font-size: 0.95rem;
  }
  
  /* ===== CAREERS ===== */
  .careers-hero h1 {
    font-size: 2rem;
  }
  
  .why-work-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .no-openings {
    padding: 40px 20px;
  }
  
  .no-openings .icon {
    font-size: 3rem;
  }
  
  .no-openings h2 {
    font-size: 1.4rem;
  }
  
  .job-card-closed {
    flex-direction: column;
    text-align: center;
  }
  
  /* ===== LEGAL PAGES ===== */
  .legal-wrapper {
    padding: 30px 24px;
  }
  
  .legal-wrapper h2 {
    font-size: 1.3rem;
  }
  
  .legal-wrapper ul {
    padding-left: 10px;
  }
  
  /* ===== 404 PAGE ===== */
  .error-code {
    font-size: 6rem;
  }
  
  .error-title {
    font-size: 1.8rem;
  }
  
  .error-message {
    font-size: 1rem;
  }
  
  .error-btn {
    min-width: 160px;
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}

/* ============================================
   SMALL PHONES (480px and below)
   ============================================ */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  
  /* ===== HEADER ===== */
  .header .container {
    padding: 0 10px;
    gap: 6px;
  }
  
  .logo a {
    font-size: 0.9rem;
  }
  
  .logo img {
    height: 28px;
  }
  
  .search-container {
    max-width: 100px;
  }
  
  .search-container input {
    padding: 5px 8px 5px 24px;
    font-size: 0.7rem;
  }
  
  .search-container .search-icon {
    left: 8px;
    font-size: 0.7rem;
  }
  
  /* ===== HERO ===== */
  .hero {
    padding: 30px 0 50px;
  }
  
  .hero-text h1 {
    font-size: 1.5rem;
  }
  
  .hero .badge {
    font-size: 0.7rem;
    padding: 4px 12px;
  }
  
  .hero-text p {
    font-size: 0.95rem;
  }
  
  .trust-badge {
    font-size: 0.8rem;
  }
  
  /* ===== SECTION HEADERS ===== */
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  /* ===== SERVICES ===== */
  .service-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .service-card {
    padding: 24px 20px;
  }
  
  /* ===== STATS ===== */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  
  .stat-number {
    font-size: 1.7rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  /* ===== COVERAGE ===== */
  .coverage-grid {
    grid-template-columns: 1fr;
  }
  
  /* ===== CERTIFICATIONS ===== */
  .cert-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .cert-item i {
    font-size: 1.4rem;
  }
  
  .cert-item span {
    font-size: 0.85rem;
  }
  
  /* ===== GALLERY ===== */
  .gallery-main {
    min-height: 160px;
    max-height: 220px;
  }
  
  .gallery-main img {
    min-height: 160px;
    max-height: 220px;
  }
  
  .gallery-btn {
    width: 32px;
    height: 32px;
    font-size: 0.7rem;
  }
  
  .gallery-wrapper {
    gap: 4px;
    padding: 4px;
  }
  
  /* ===== PROJECT DETAIL ===== */
  .project-detail-image {
    min-height: 180px;
  }
  
  .project-detail-image img {
    min-height: 180px;
    max-height: 250px;
  }
  
  /* ===== BLOG ===== */
  .blog-image {
    height: 160px;
  }
  
  .blog-content {
    padding: 16px;
  }
  
  .blog-card-full .blog-image {
    height: 160px;
  }
  
  .article-body {
    padding: 20px 16px;
  }
  
  .article-body h2 {
    font-size: 1.3rem;
  }
  
  /* ===== WHY SENEL ===== */
  .why-senel-grid {
    grid-template-columns: 1fr;
  }
  
  /* ===== PARTNERS ===== */
  .partner-logos {
    gap: 16px;
  }
  
  .partner-logos img {
    height: 28px;
  }
  
  /* ===== ABOUT ===== */
  .about-hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
  }
  
  .about-hero-stat .number {
    font-size: 1.3rem;
  }
  
  .about-hero-stat .label {
    font-size: 0.7rem;
  }
  
  /* ===== CONTACT ===== */
  .contact-item {
    flex-direction: column;
    gap: 8px;
  }
  
  .social-links {
    flex-wrap: wrap;
  }
  
  /* ===== TESTIMONIALS ===== */
  .testimonial-card .client-info {
    flex-direction: column;
    text-align: center;
  }
  
  .testimonial-card .client-avatar {
    width: 44px;
    height: 44px;
    font-size: 0.9rem;
  }
  
  /* ===== CAREERS ===== */
  .why-work-grid {
    grid-template-columns: 1fr;
  }
  
  /* ===== LEGAL ===== */
  .legal-wrapper {
    padding: 20px 16px;
  }
  
  .legal-wrapper h2 {
    font-size: 1.1rem;
  }
  
  .contact-info-box {
    padding: 16px;
  }
  
  /* ===== 404 ===== */
  .error-code {
    font-size: 4.5rem;
  }
  
  .error-title {
    font-size: 1.4rem;
  }
  
  .error-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .error-btn {
    width: 100%;
    max-width: 280px;
  }
  
  .error-links {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  
  /* ===== BUTTONS ===== */
  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
    min-width: 120px;
  }
  
  .btn-large {
    padding: 14px 28px;
    font-size: 0.95rem;
    min-width: 160px;
  }
  
  /* ===== FOOTER ===== */
  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-form button {
    width: 100%;
  }
  
  /* ===== MAP ===== */
  .map-container iframe {
    height: 250px;
  }
  
  /* ===== PAGE HERO ===== */
  .page-hero h1 {
    font-size: 1.5rem;
  }
  
  /* ===== FLOATING CONTACT ===== */
  .float-whatsapp,
  .float-call {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
  
  #backToTop {
    bottom: 64px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}

/* ============================================
   EXTRA SMALL PHONES (360px and below)
   ============================================ */
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }
  
  .logo a {
    font-size: 0.8rem;
  }
  
  .logo img {
    height: 24px;
  }
  
  .search-container {
    max-width: 80px;
  }
  
  .search-container input {
    padding: 4px 6px 4px 20px;
    font-size: 0.65rem;
  }
  
  .search-container .search-icon {
    left: 6px;
    font-size: 0.65rem;
  }
  
  .hero-text h1 {
    font-size: 1.3rem;
  }
  
  .hero .badge {
    font-size: 0.6rem;
    padding: 3px 10px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .stat-number {
    font-size: 1.4rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
    min-width: 100px;
  }
  
  .btn-large {
    padding: 12px 22px;
    font-size: 0.9rem;
    min-width: 140px;
  }
  
  .article-body h2 {
    font-size: 1.15rem;
  }
  
  .article-body h3 {
    font-size: 1rem;
  }
  
  .gallery-main {
    min-height: 140px;
    max-height: 180px;
  }
  
  .gallery-main img {
    min-height: 140px;
    max-height: 180px;
  }
}

/* ============================================
   LANDSCAPE MODE (Mobile)
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 30px 0 40px;
  }
  
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
  
  .hero-text h1 {
    font-size: 1.5rem;
  }
  
  .hero-text p {
    font-size: 0.9rem;
  }
  
  .nav ul {
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .header,
  .footer,
  .floating-contact,
  #backToTop,
  .page-transition,
  #preloader,
  .dark-mode-toggle,
  .hamburger,
  .search-container,
  .hero-slideshow,
  .hero-dots,
  .cookie-consent,
  .cta-banner,
  .partners,
  .floating-contact {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  .article-body,
  .legal-wrapper,
  .project-detail,
  .service-detail {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
  
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
  
  h2, h3 {
    page-break-after: avoid;
  }
}

/* ============================================
   DARK MODE RESPONSIVE FIXES
   ============================================ */
@media (max-width: 768px) {
  body.dark-mode .nav ul {
    background: #1F2937;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  }
  
  body.dark-mode .nav a {
    color: #D1D5DB;
  }
  
  body.dark-mode .nav a:hover,
  body.dark-mode .nav a.active {
    background: var(--secondary);
    color: var(--dark);
  }
  
  body.dark-mode .hero-dots {
    bottom: 20px;
  }
}

@media (max-width: 480px) {
  body.dark-mode .search-container input {
    background: rgba(255, 255, 255, 0.06);
    border-color: #374151;
    color: #F3F4F6;
  }
  
  body.dark-mode .search-results {
    background: #1F2937;
  }
  
  body.dark-mode .article-body {
    background: #1F2937;
  }
  
  body.dark-mode .legal-wrapper {
    background: #1F2937;
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-slide {
    transition: none !important;
  }
  
  .project-status.ongoing {
    animation: none !important;
  }
}

/* ============================================
   TOUCH DEVICE IMPROVEMENTS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .nav a {
    padding: 12px 16px;
  }
  
  .btn {
    padding: 14px 32px;
  }
  
  .gallery-btn {
    width: 44px;
    height: 44px;
  }
  
  .float-whatsapp,
  .float-call {
    width: 52px;
    height: 52px;
  }
  
  /* Remove hover effects on touch devices */
  .project-card:hover img {
    transform: none;
  }
  
  .service-card:hover {
    transform: none;
  }
  
  .blog-card:hover {
    transform: none;
  }
  
  .team-card:hover {
    transform: none;
  }
  
  .testimonial-card:hover {
    transform: none;
  }
}

/* ============================================
   HIGH DPI / RETINA DISPLAYS
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo img,
  .footer-logo {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ============================================
   LARGE SCREENS (1440px and above)
   ============================================ */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-text h1 {
    font-size: 3.2rem;
  }
  
  .section-header h2 {
    font-size: 2.8rem;
  }
}

/* ============================================
   ULTRA WIDE SCREENS (1920px and above)
   ============================================ */
@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
  }
  
  .hero-text h1 {
    font-size: 3.6rem;
  }
  
  body {
    font-size: 18px;
  }
}

/* ============================================
   END OF RESPONSIVE CSS
   ============================================ */