/* ========================================
   RESPONSIVE FIXES FOR PRIMESERVICE THEME
   ======================================== */

/* ===== HEADER RESPONSIVE IMPROVEMENTS ===== */

/* Mobile menu toggle button - HIDDEN BY DEFAULT */
.mobile-menu-toggle {
  display: none !important; /* Hidden by default for desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  gap: 5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  backdrop-filter: blur(10px);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  background: #3b82f6;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1px;
  transform-origin: center;
}

.mobile-menu-toggle.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: #3b82f6;
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background: #3b82f6;
}

/* ===== NAVIGATION RESPONSIVE ===== */

@media (max-width: 1024px) {
  .nav {
    position: relative;
  }
  
  .nav-menu {
    gap: 20px;
  }
  
  .nav-menu a {
    font-size: 14px;
    padding: 6px 10px;
  }
  
  .cta-button {
    padding: 8px 16px;
    font-size: 13px;
    height: 32px;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 0 16px;
    height: 70px;
  }
  
  .logo {
    height: 40px;
    width: auto;
  }
  
  .logo img {
    max-height: 40px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  
  .nav {
    position: fixed;
    top: 110px; /* 40px banner + 70px header - SIN ESPACIOS */
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    padding: 32px 24px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    z-index: 1998;
    min-height: calc(100vh - 110px);
    margin-top: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
  }
  
  /* Estilizar scrollbar para webkit */
  .nav::-webkit-scrollbar {
    width: 6px;
  }
  
  .nav::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .nav::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
  }
  
  .nav::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
  }
  
  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    animation: slideInMenu 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  @keyframes slideInMenu {
    from {
      transform: translateY(-20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .nav-menu li {
    width: 100%;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
  }
  
  .nav-menu li:last-child {
    margin-bottom: 0;
  }
  
  .nav-menu a {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    font-size: 16px;
    border-radius: 12px;
    text-align: left;
    width: 100%;
    color: #1e293b;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
  }
  
  .nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
  }
  
  .nav-menu a:hover::before {
    left: 100%;
  }
  
  .nav-menu a:hover,
  .nav-menu a.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
  }
  
  .nav-menu a:hover::before,
  .nav-menu a.active::before {
    display: none;
  }
  
  .cta-button {
    margin-top: 32px;
    width: 100%;
    justify-content: center;
    height: 56px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
  }
  
  .mobile-menu-toggle {
    display: flex; /* Solo visible en móvil (768px y menos) */
  }
  
  .site-content {
    padding-top: 110px;
  }
  
  /* Corregir banner superior */
  .top-banner {
    height: 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1999;
  }
  
  .header {
    margin-top: 0;
    position: relative;
    z-index: 1997;
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: 0 12px;
    height: 60px;
  }
  
  .logo {
    height: 32px;
    width: auto;
  }
  
  .logo img {
    max-height: 32px;
    max-width: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  
  .nav {
    top: 100px; /* 40px banner + 60px header - SIN ESPACIOS */
    z-index: 1998;
    min-height: calc(100vh - 100px);
    margin-top: 0;
    padding: 24px 20px;
  }
  
  .nav-menu a {
    padding: 18px 20px;
    font-size: 15px;
    border-radius: 10px;
  }
  
  .cta-button {
    height: 52px;
    font-size: 15px;
    border-radius: 14px;
    margin-top: 28px;
  }
  
  .site-content {
    padding-top: 100px;
  }
  
  /* Corregir banner superior en móvil pequeño */
  .top-banner {
    height: 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1999;
  }
  
  .header {
    margin-top: 0;
    position: relative;
    z-index: 1997;
  }
  
  .banner-text {
    font-size: 12px;
  }
  
  .banner-icon {
    font-size: 14px;
  }
}

/* ===== HERO SECTION RESPONSIVE IMPROVEMENTS ===== */

@media (max-width: 768px) {
  .hero-section {
    min-height: 80vh;
    padding: 20px 16px 40px;
    margin-top: 0;
    background-attachment: scroll;
  }
  
  .hero-container {
    padding-top: 20px;
    min-height: calc(80vh - 110px);
  }
  
  .hero-content {
    padding: 32px 24px;
    border-radius: 16px;
    margin: 0 8px;
  }
  
  .hero-title {
    font-size: 36px;
    line-height: 1.1;
  }
  
  .hero-description {
    font-size: 16px;
    margin-bottom: 32px;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  
  .hero-button {
    width: 100%;
    min-width: unset;
    height: 48px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 70vh;
    margin-top: 0;
  }
  
  .hero-container {
    padding-top: 20px;
    min-height: calc(70vh - 100px);
  }
  
  .hero-content {
    padding: 24px 20px;
    border-radius: 12px;
    margin: 0 4px;
  }
  
  .hero-title {
    font-size: 28px;
    margin-bottom: 16px;
  }
  
  .hero-description {
    font-size: 15px;
    margin-bottom: 24px;
  }
  
  .hero-badge {
    padding: 8px 16px;
    margin-bottom: 20px;
  }
  
  .hero-badge span {
    font-size: 12px;
  }
}

/* ===== PRODUCTS SECTION RESPONSIVE ===== */

@media (max-width: 768px) {
  .products-container {
    padding: 0 16px 32px;
  }
  
  .products-tabs {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  
  .tab-button {
    padding: 10px 16px;
    font-size: 14px;
    min-width: 120px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .product-card {
    height: auto;
    min-height: 380px;
    padding: 20px;
  }
  
  .product-image {
    height: 140px;
    min-height: 140px;
  }
  
  .product-title {
    height: auto;
    min-height: 44px;
    font-size: 16px;
    text-align: center;
  }
  
  .product-description {
    height: auto;
    min-height: 72px;
    font-size: 14px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .products-container {
    padding: 0 12px 24px;
  }
  
  .products-tabs {
    gap: 6px;
  }
  
  .tab-button {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 100px;
  }
  
  .tab-icon {
    font-size: 16px;
  }
  
  .product-card {
    padding: 16px;
    min-height: 360px;
  }
  
  .product-image {
    height: 120px;
    min-height: 120px;
  }
}

/* ===== SERVICES SECTION RESPONSIVE ===== */

@media (max-width: 768px) {
  .services-section {
    padding: 60px 0;
  }
  
  .services-container {
    padding: 0 16px;
  }
  
  .services-header {
    margin-bottom: 48px;
  }
  
  .services-title {
    font-size: 32px;
  }
  
  .services-subtitle {
    font-size: 16px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .service-card {
    padding: 32px 24px;
    min-height: 200px;
  }
  
  .service-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .service-title {
    font-size: 18px;
  }
  
  .service-description {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .services-section {
    padding: 40px 0;
  }
  
  .services-container {
    padding: 0 12px;
  }
  
  .services-title {
    font-size: 28px;
  }
  
  .services-subtitle {
    font-size: 15px;
  }
  
  .service-card {
    padding: 24px 20px;
    min-height: 180px;
  }
  
  .service-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin-bottom: 16px;
  }
  
  .service-title {
    font-size: 16px;
  }
  
  .service-description {
    font-size: 13px;
  }
}

/* ===== TESTIMONIALS SECTION RESPONSIVE ===== */

@media (max-width: 768px) {
  .testimonials-section {
    padding: 60px 0;
  }
  
  .testimonials-container {
    padding: 0 16px;
  }
  
  .testimonials-header {
    margin-bottom: 48px;
  }
  
  .testimonials-title {
    font-size: 32px;
  }
  
  .testimonials-subtitle {
    font-size: 16px;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .testimonial-card {
    padding: 24px;
  }
  
  .testimonial-quote {
    font-size: 16px;
    padding-left: 20px;
  }
  
  .testimonial-author {
    padding-top: 20px;
  }
  
  .testimonial-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .testimonial-name {
    font-size: 15px;
  }
  
  .testimonial-role {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .testimonials-section {
    padding: 40px 0;
  }
  
  .testimonials-container {
    padding: 0 12px;
  }
  
  .testimonials-title {
    font-size: 28px;
  }
  
  .testimonials-subtitle {
    font-size: 15px;
  }
  
  .testimonial-card {
    padding: 20px;
  }
  
  .testimonial-quote {
    font-size: 15px;
    padding-left: 16px;
  }
}

/* ===== BRANDS SECTION RESPONSIVE ===== */

@media (max-width: 768px) {
  .marcas-section {
    padding: 60px 0;
  }
  
  .marcas-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 600px;
  }
  
  .marcas-grid img {
    width: 120px;
    height: 80px;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .marcas-section {
    padding: 40px 0;
  }
  
  .marcas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 320px;
  }
  
  .marcas-grid img {
    width: 100px;
    height: 70px;
    padding: 12px;
  }
}

/* ===== FAQ SECTION RESPONSIVE ===== */

@media (max-width: 768px) {
  .faq-section {
    padding: 60px 0;
  }
  
  .faq-container {
    padding: 0 16px;
  }
  
  .faq-question {
    padding: 20px 24px;
    font-size: 16px;
  }
  
  .faq-answer {
    font-size: 15px;
  }
  
  .faq-item.active .faq-answer {
    padding: 20px 24px 24px;
  }
}

@media (max-width: 480px) {
  .faq-section {
    padding: 40px 0;
  }
  
  .faq-container {
    padding: 0 12px;
  }
  
  .faq-question {
    padding: 16px 20px;
    font-size: 15px;
  }
  
  .faq-answer {
    font-size: 14px;
  }
  
  .faq-item.active .faq-answer {
    padding: 16px 20px 20px;
  }
}

/* ===== CONTACT SECTION RESPONSIVE ===== */

@media (max-width: 768px) {
  .contact-section {
    padding: 60px 0;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 16px;
  }
  
  .contact-info {
    padding: 32px 24px;
  }
  
  .contact-info .section-title {
    font-size: 28px;
  }
  
  .contact-info .section-description {
    font-size: 16px;
    margin-bottom: 32px;
  }
  
  .contact-item {
    gap: 12px;
  }
  
  .contact-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .contact-text h4 {
    font-size: 16px;
  }
  
  .contact-text p {
    font-size: 14px;
  }
  
  .contact-form {
    padding: 32px 24px;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .form-submit {
    padding: 16px 24px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .contact-section {
    padding: 40px 0;
  }
  
  .contact-container {
    padding: 0 12px;
    gap: 24px;
  }
  
  .contact-info {
    padding: 24px 20px;
  }
  
  .contact-info .section-title {
    font-size: 24px;
  }
  
  .contact-info .section-description {
    font-size: 15px;
    margin-bottom: 24px;
  }
  
  .contact-item {
    gap: 10px;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .contact-text h4 {
    font-size: 15px;
  }
  
  .contact-text p {
    font-size: 13px;
  }
  
  .contact-form {
    padding: 24px 20px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .form-submit {
    padding: 14px 20px;
    font-size: 15px;
  }
}

/* ===== FOOTER RESPONSIVE ===== */

@media (max-width: 768px) {
  .footer {
    padding: 60px 0 32px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 16px;
    text-align: center;
  }
  
  .footer-section h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .footer-bottom {
    margin-top: 40px;
    padding-top: 24px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 40px 0 24px;
  }
  
  .footer-content {
    padding: 0 12px;
    gap: 24px;
  }
  
  .footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
  }
  
  .footer-links a {
    font-size: 14px;
  }
  
  .footer-bottom {
    margin-top: 32px;
    padding-top: 20px;
    font-size: 13px;
  }
}

/* ===== WHATSAPP BUTTON RESPONSIVE ===== */

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }
  
  .whatsapp-icon {
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-tooltip {
    right: 60px;
    font-size: 13px;
    padding: 10px 14px;
  }
  
  .whatsapp-tooltip span {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
  }
  
  .whatsapp-icon {
    width: 45px;
    height: 45px;
  }
  
  .whatsapp-tooltip {
    right: 55px;
    font-size: 12px;
    padding: 8px 12px;
  }
  
  .whatsapp-tooltip span {
    font-size: 10px;
  }
}

/* ===== BANNER RESPONSIVE ===== */

@media (max-width: 768px) {
  .top-banner {
    height: 36px;
  }
  
  .banner-text {
    font-size: 13px;
  }
  
  .banner-icon {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .top-banner {
    height: 32px;
  }
  
  .banner-text {
    font-size: 12px;
  }
  
  .banner-icon {
    font-size: 12px;
  }
}

/* ===== GENERAL RESPONSIVE IMPROVEMENTS ===== */

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
  
  .section-header {
    margin-bottom: 48px;
    padding: 0 16px;
  }
  
  .section-title {
    font-size: 32px;
  }
  
  .section-description {
    font-size: 16px;
  }
  
  #productos {
    padding-top: 80px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 40px 0;
  }
  
  .section-header {
    margin-bottom: 32px;
    padding: 0 12px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .section-description {
    font-size: 15px;
  }
  
  #productos {
    padding-top: 60px;
  }
}

/* ===== UTILITY CLASSES FOR RESPONSIVE ===== */

.hide-mobile {
  display: block;
}

.show-mobile {
  display: none;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  
  .show-mobile {
    display: block !important;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */

@media (hover: none) and (pointer: coarse) {
  .product-card:hover,
  .service-card:hover,
  .testimonial-card:hover {
    transform: none;
  }
  
  .nav-menu a:hover {
    background: none;
  }
  
  .cta-button:hover {
    transform: none;
  }
  
  .hero-button:hover {
    transform: none;
  }
  
  .form-submit:hover {
    transform: none;
  }
}

/* ===== PRINT STYLES ===== */

@media print {
  .header,
  .footer,
  .whatsapp-float,
  .top-banner {
    display: none !important;
  }
  
  .site-content {
    padding-top: 0 !important;
  }
  
  .hero-section {
    margin-top: 0 !important;
    min-height: auto !important;
  }
  
  .hero-content {
    background: white !important;
    box-shadow: none !important;
  }
  
  .section {
    padding: 20px 0 !important;
    page-break-inside: avoid;
  }
}

/* ===== MOBILE MENU STATE ===== */

body.menu-open {
  overflow: hidden;
}

body.menu-open .header {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px) !important;
}

/* ===== IMPROVED TABLET RESPONSIVE ===== */

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-title {
    font-size: 44px;
  }
  
  .hero-description {
    font-size: 18px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .marcas-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
  
  .contact-container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* ===== LANDSCAPE MOBILE OPTIMIZATIONS ===== */

@media (max-width: 768px) and (orientation: landscape) {
  .hero-section {
    min-height: 70vh;
    padding: 16px 20px 24px;
  }
  
  .hero-container {
    padding-top: 60px;
    min-height: calc(70vh - 110px);
  }
  
  .hero-content {
    padding: 24px 20px;
  }
  
  .hero-title {
    font-size: 32px;
    margin-bottom: 16px;
  }
  
  .hero-description {
    font-size: 15px;
    margin-bottom: 24px;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .section-header {
    margin-bottom: 32px;
  }
}

/* ===== HIGH DPI DISPLAYS ===== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-section {
    background-image: url('./imagenes/NuevoHero@2x.jpeg');
  }
  
  .logo img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-section {
    background-attachment: scroll;
  }
}

/* ===== FOCUS VISIBLE IMPROVEMENTS ===== */

.mobile-menu-toggle:focus-visible,
.nav-menu a:focus-visible,
.cta-button:focus-visible,
.hero-button:focus-visible,
.tab-button:focus-visible,
.product-cta:focus-visible,
.form-submit:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

@media (max-width: 768px) {
  .hero-section {
    will-change: transform;
  }
  
  .product-card,
  .service-card,
  .testimonial-card {
    will-change: transform;
  }
  
  .nav {
    will-change: transform, opacity;
  }
}

/* ===== LOADING STATES ===== */

.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ===== ERROR STATES ===== */

.error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1) !important;
}

.error-message {
  color: var(--error);
  font-size: 14px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== SUCCESS STATES ===== */

.success {
  border-color: var(--success) !important;
  box-shadow: 0 0 0 4px rgba(56, 161, 105, 0.1) !important;
}

.success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.success-message.show {
  transform: translateX(0);
}

/* ===== SCROLLBAR STYLING ===== */

@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 6px;
  }
  
  ::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
  }
}

/* ===== SAFE AREA SUPPORT ===== */

@supports (padding: max(0px)) {
  .header {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  
  .whatsapp-float {
    bottom: max(30px, env(safe-area-inset-bottom));
    right: max(30px, env(safe-area-inset-right));
  }
  
  .top-banner {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* ===== ANIMATION IMPROVEMENTS ===== */

@media (max-width: 768px) {
  .fade-in-up {
    animation: fadeInUpMobile 0.6s ease forwards;
  }
  
  @keyframes fadeInUpMobile {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .revealed {
    animation: revealMobile 0.8s ease forwards;
  }
  
  @keyframes revealMobile {
    from {
      opacity: 0;
      transform: scale(0.95);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
}
