/**
 * style.css
 * Estilos principales para InvexChanger
 * Diseño profesional con paleta de colores corporativa: azul oscuro, gris, dorado
 */

/* ========== Variables y Reset ========== */
:root {
    --primary-color: #1a3a5c;
    --secondary-color: #2c5282;
    --accent-color: #d4af37;
    --accent-hover: #b8941f;
    --text-dark: #1a202c;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --success: #48bb78;
    --error: #f56565;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* ========== Header y Navegación ========== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lang-switcher button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.75rem;
    margin-left: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.lang-switcher button:hover,
.lang-switcher button.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.header-main {
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.75rem;
    font-weight: bold;
    color: white;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    height: 50px;
    width: 50px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: rotate(360deg);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav a:hover,
.nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========== Container ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.95) 0%, rgba(44, 82, 130, 0.95) 100%),
                url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=1600') center/cover;
    color: white;
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(212, 175, 55, 0.05) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero .subtitle {
    font-size: 1.35rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* ========== Sections ========== */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== About Section ========== */
.about-section {
    background: white;
}

.about-intro-wrapper {
    margin: 3rem 0;
}

.about-intro-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-intro {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #2d3748;
    text-align: center;
    padding: 2.5rem 3rem;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto;
}

.about-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.about-card-enhanced {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.about-card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.about-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.about-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(26, 58, 92, 0.7) 0%, rgba(26, 58, 92, 0.3) 100%);
}

.about-card-content {
    padding: 2rem 2rem 2.5rem;
    background: white;
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.about-card-enhanced h3 {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.about-card-enhanced p {
    font-size: 0.975rem;
    line-height: 1.75;
    color: #4a5568;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.about-seal-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 4rem 0;
}

.seal-large {
    width: 250px;
    height: 250px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 10px 20px rgba(26, 58, 92, 0.15));
    transition: transform 0.3s ease;
}

.seal-large:hover {
    transform: scale(1.05) rotate(5deg);
}

.seal-info {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1.2rem 2.5rem;
    border-radius: 10px;
    color: white;
    box-shadow: 0 6px 12px rgba(26, 58, 92, 0.2);
}

.seal-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.95;
}

.seal-year {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========== Stats Banner ========== */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== Grid Layouts ========== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ========== Cards ========== */
.card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ========== Forms ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.form-control.error {
    border-color: var(--error);
}

.form-error {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-error.show {
    display: block;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

/* ========== Modal ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    margin-bottom: 1.5rem;
}

/* ========== Company Result ========== */
.company-result {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.company-result.insured {
    border-left-color: var(--success);
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.company-name {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.seal-badge {
    width: 80px;
    height: 80px;
}

.company-info p {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.company-info strong {
    color: var(--text-dark);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.status-badge.insured {
    background-color: #c6f6d5;
    color: #22543d;
}

.status-badge.not-insured {
    background-color: #fed7d7;
    color: #742a2a;
}

/* ========== Admin Panel ========== */
.admin-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background-color: var(--bg-light);
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background-color: var(--error);
    color: white;
}

.btn-danger:hover {
    background-color: #e53e3e;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #38a169;
}

/* ========== Alert Messages ========== */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #c6f6d5;
    color: #22543d;
    border-left: 4px solid var(--success);
}

.alert-error {
    background-color: #fed7d7;
    color: #742a2a;
    border-left: 4px solid var(--error);
}

/* ========== Footer ========== */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .about-cards-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-card-image {
        height: 180px;
    }
    
    .seal-large {
        width: 200px;
        height: 200px;
    }
    
    .stats-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        width: 100%;
    }
    
    .nav a {
        display: block;
        width: 100%;
    }
    
    .hero {
        padding: 5rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .hero::before {
        display: none;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
        padding: 0 1rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .about-intro {
        font-size: 1rem;
        text-align: center;
        padding: 1.5rem 1.25rem;
        line-height: 1.7;
    }
    
    .about-cards-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .about-card-image {
        height: 150px;
    }
    
    .about-card-content {
        padding: 1.5rem 1.25rem;
    }
    
    .about-card-enhanced h3 {
        font-size: 1.2rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }
    
    .about-card-enhanced p {
        font-size: 0.95rem;
        line-height: 1.65;
        text-align: left;
        font-size: 0.9rem;
        text-align: left;
    }
    
    .about-icon {
        font-size: 2rem;
    }
    
    .about-seal-center {
        margin: 3rem 0;
    }
    
    .seal-large {
        width: 150px;
        height: 150px;
    }
    
    .seal-info {
        padding: 0.75rem 1.5rem;
    }
    
    .seal-label {
        font-size: 0.75rem;
    }
    
    .seal-year {
        font-size: 1.25rem;
    }
    
    .stats-banner {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.875rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .company-header {
        flex-direction: column;
    }
    
    .admin-table {
        overflow-x: auto;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
