/* Main Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-login:hover {
    background-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-color);
    font-weight: 500;
    margin: 0;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Services Preview */
.services-preview {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 2rem;
}

.service-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.service-link:hover {
    color: var(--primary-color);
}

.service-link i {
    margin-left: 8px;
    transition: var(--transition);
}

.service-link:hover i {
    transform: translateX(5px);
}

/* News Section */
.news-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 30px;
}

.news-date {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.news-content h3 {
    color: var(--primary-color);
    margin: 0.5rem 0 1rem;
}

.news-content p {
    margin-bottom: 1.5rem;
}

.news-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.news-link:hover {
    color: var(--primary-color);
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ===== Modal Styles (revisado) ===== */
.modal {
  display: none;                 /* se muestra con JS */
  position: fixed;
  inset: 0;                      /* top/right/bottom/left = 0 */
  background: rgba(0,0,0,.6);
  z-index: 1000;
}

.modal-content{
  position: relative;
  width: 420px;
  max-width: 90vw;
  margin: 8vh auto;
  padding: 24px 24px 22px;       /* +espacio arriba y laterales */
  border-radius: 10px;
  background: #223142;           /* fondo oscuro */
  color: #fff;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* Título sin “bloque vacío” arriba y con buen aire abajo */
.modal-content h2{
  margin: 8px 32px 20px 0;       /* 8px arriba, 20px abajo */
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  text-align: left;
}

/* Botón de cierre (X) alineado */
.modal-content .close{
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 18px;
  line-height: 1;
  color: #cfd8e3;
  cursor: pointer;
  user-select: none;
}
.modal-content .close:hover{ color:#fff; }

/* Espaciados de campos */
.modal-content .form-group{
  margin-bottom: 18px;
}
.modal-content .form-group:first-of-type{
  margin-top: 6px;
}

/* Evita que el overlay “absorba” clics fuera del contenido
   (el bloqueo real de cierre por clic fuera lo hace el JS) */
.modal[aria-hidden="false"] { pointer-events: auto; }
.modal[aria-hidden="false"] .modal-content { pointer-events: auto; }

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close:hover {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

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

.animate-slide-up {
    animation: slideInUp 0.6s ease;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}