/* Total Import - Modern Redesign */
:root {
  --primary: #1D9494;
  --primary-dark: #177676;
  --secondary: #BA1466;
  --secondary-dark: #941050;
  --accent: #65BC7B;
  --accent-dark: #529663;
  --neutral-dark: #212934;
  --neutral-light: #F8F9FA;
  --neutral-gray: #6c757d;
  --border-color: #e9ecef;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', 'Noto Sans', Arial, sans-serif;
  line-height: 1.6;
  color: var(--neutral-dark);
  background-color: var(--neutral-light);
  font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Lato', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--neutral-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--neutral-gray);
}

strong {
  color: var(--neutral-dark);
  font-weight: 600;
}

/* Header */
header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo img {
  height: 50px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  text-decoration: none;
  color: var(--neutral-dark);
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

nav a:hover {
  color: var(--primary);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Main Layout */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Slider */
#slider {
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
  width: 100%;
  min-height: 300px;
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.slide img {
  max-width: 100%;
  max-height: 360px;
  height: auto;
  width: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
}

.slide:hover img {
  transform: scale(1.02);
}

/* Section Base */
section {
  margin-bottom: 4rem;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

section h2 {
  text-align: center;
  position: relative;
  margin-bottom: 2rem;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* About Section */
#NOSOTROS .about-content {
  max-width: 800px;
  margin: 0 auto;
}

#NOSOTROS p {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}

/* Products Grid */
#productos-nuevos p {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  color: var(--neutral-gray);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.product {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  padding: 1rem;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.product img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.product:hover img {
  transform: scale(1.1);
}

.product p {
  font-weight: 600;
  color: var(--neutral-dark);
  margin: 0;
  font-size: 0.9rem;
}

/* Services Grid */
#SERVICIOS p {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.service {
  background: var(--neutral-light);
  padding: 2rem 1rem;
  text-align: center;
  border-radius: 10px;
  font-weight: 600;
  color: var(--neutral-dark);
  transition: background 0.3s ease;
  border: 2px solid transparent;
}

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

/* Catalogs Grid */
#catalogos p {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.catalogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.catalog {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalog:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.catalog a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.catalog img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.catalog h3 {
  padding: 1.5rem 1rem 1rem;
  text-align: center;
  margin: 0;
  color: var(--neutral-dark);
}

/* Contact Section */
#CONTACTO p {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-info {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-info h3 {
  color: var(--primary);
  margin: 1.5rem 0 0.5rem;
}

.contact-info p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

/* Footer */
footer {
  background: var(--neutral-dark);
  color: white;
  padding: 3rem 2rem 1rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.contact-details h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-details p {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.social-links {
  text-align: right;
  align-self: center;
}

.social-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  nav ul {
    gap: 1rem;
    flex-direction: column;
    align-items: center;
  }
  
  main {
    padding: 1rem;
  }
  
  section {
    padding: 1.5rem;
  }
  
  #slider {
    max-height: 300px;
  }
  
  .slide {
    min-height: 200px;
    max-height: 300px;
    padding: 15px;
  }
  
  .slide img {
    max-height: 270px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .social-links {
    text-align: center;
  }
  
  .products-grid,
  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .catalogs-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  #slider {
    max-height: 250px;
  }
  
  .slide {
    min-height: 150px;
    max-height: 250px;
    padding: 10px;
  }
  
  .slide img {
    max-height: 230px;
  }
  
  .products-grid,
  .services-grid,
  .catalogs-grid {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.bg-primary {
  background: var(--primary);
}

.text-white {
  color: white;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Image Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  font-size: 18px;
}

.close {
  position: absolute;
  top: 30px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  z-index: 1001;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    max-height: 70vh;
  }
  
  #caption {
    width: 90%;
    font-size: 16px;
  }
  
  .close {
    top: 15px;
    right: 20px;
    font-size: 30px;
  }
}