/* ========================================
   PÁGINA DE ESCUDO - CSS OPTIMIZADO
   ======================================== */

/* Hero Escudo */
.escudo-hero {
    background: linear-gradient(135deg, #2D7A4A 0%, #00B8E6 50%, #5B2D91 100%);
    padding: 30px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.escudo-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

.escudo-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.escudo-hero-content h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.escudo-hero-content p {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-bottom: 15px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 90px;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Navegación por Pestañas */
.tabs-section-escudo {
    background: white;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tabs-container-escudo {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 0;
}

.tab-btn-escudo {
    flex: 1;
    max-width: 300px;
    padding: 12px 20px;
    background: white;
    border: none;
    border-bottom: 4px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    transition: all 0.3s ease;
}

.tab-btn-escudo:hover {
    background: #f5f5f5;
    color: #2D7A4A;
}

.tab-btn-escudo.active {
    color: #2D7A4A;
    border-bottom-color: #2D7A4A;
    background: #f0f8f5;
}

.tab-icon {
    font-size: 1.2rem;
}

/* Contenido de Secciones */
.content-section-escudo {
    padding: 25px 20px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

.content-section-escudo.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Secciones de Escudos */
.escudos-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.seccion-escudos {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.seccion-titulo {
    font-size: 1.4rem;
    color: #2D7A4A;
    margin-bottom: 6px;
    position: relative;
    padding-left: 12px;
}

.seccion-titulo::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #2D7A4A, #00B8E6);
    border-radius: 3px;
}

.seccion-descripcion {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 18px;
    padding-left: 12px;
}

/* Grid de Escudos */
.escudos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.escudos-grid-horizontal {
    grid-template-columns: repeat(2, 1fr);
}

/* Tarjeta de Escudo */
.escudo-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.escudo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #2D7A4A;
}

.card-horizontal {
    grid-column: span 2;
}

/* Preview del Escudo */
.escudo-preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    position: relative;
}

.preview-horizontal {
    height: 150px;
}

.preview-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    position: relative;
}

.preview-bg.white {
    background: #ffffff;
}

.preview-bg.dark {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

.escudo-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.escudo-card:hover .escudo-img {
    transform: scale(1.08);
}

.escudo-img-horizontal {
    max-width: 90%;
    max-height: 70%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Información del Escudo */
.escudo-info {
    padding: 15px;
    background: #fafafa;
}

.escudo-info h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
}

.escudo-descripcion {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

/* Especificaciones */
.escudo-specs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.spec-tag {
    background: white;
    color: #2D7A4A;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid #2D7A4A;
}

/* Acciones */
.escudo-actions {
    display: flex;
    gap: 8px;
}

.btn-preview,
.btn-download {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-preview {
    background: #f0f8f5;
    color: #2D7A4A;
    border: 2px solid #2D7A4A;
}

.btn-preview:hover {
    background: #2D7A4A;
    color: white;
}

.btn-download {
    background: linear-gradient(135deg, #2D7A4A, #00B8E6);
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(45, 122, 74, 0.3);
}

/* ========================================
   APLICACIONES
   ======================================== */

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

.main-title {
    font-size: 1.6rem;
    color: #2D7A4A;
    text-align: center;
    margin-bottom: 25px;
}

.aplicaciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 35px;
}

.aplicacion-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.aplicacion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.aplicacion-preview {
    height: 160px;
    overflow: hidden;
}

.aplicacion-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.aplicacion-card:hover .aplicacion-preview img {
    transform: scale(1.08);
}

.aplicacion-info {
    padding: 12px;
}

.aplicacion-info h3 {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 6px;
}

.aplicacion-info p {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Prohibiciones */
.prohibiciones-section {
    background: #fff3f3;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #ff3333;
}

.prohibiciones-titulo {
    text-align: center;
    color: #ff3333 !important;
    font-size: 1.4rem !important;
}

.prohibiciones-titulo::before {
    display: none;
}

.prohibiciones-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 18px;
}

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

.prohibicion-img {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prohibicion-img img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    opacity: 0.6;
}

.prohibicion-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: #ff3333;
    text-shadow: 0 0 10px rgba(255,51,51,0.5);
}

.prohibicion-item p {
    font-weight: 600;
    color: #ff3333;
    font-size: 0.8rem;
}

/* ========================================
   ESPECIFICACIONES
   ======================================== */

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

.specs-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.spec-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.spec-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.spec-card h3 {
    font-size: 1.1rem;
    color: #2D7A4A;
    margin-bottom: 12px;
}

.spec-diagram {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.spec-diagram img {
    max-width: 100%;
    height: auto;
}

.spec-list {
    text-align: left;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.85rem;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: #333;
}

.spec-value {
    color: #2D7A4A;
    font-weight: 600;
}

/* Colores */
.colores-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-swatch {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.color-box {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    flex-shrink: 0;
}

.color-info {
    flex: 1;
}

.color-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.color-code {
    font-size: 0.75rem;
    color: #666;
    font-family: monospace;
}

/* Formatos */
.formatos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.formato-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 6px;
}

.formato-icon {
    font-size: 1.6rem;
}

.formato-info h4 {
    color: #2D7A4A;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.formato-info p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
}

/* Guía Rápida */
.guia-rapida {
    background: linear-gradient(135deg, #f0f8f5, #e8f4f8);
    border-radius: 10px;
    padding: 20px;
}

.guia-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 18px;
}

.guia-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.guia-numero {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2D7A4A, #00B8E6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 10px;
}

.guia-item h4 {
    color: #2D7A4A;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.guia-item p {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.3;
}

/* ========================================
   MODAL DE VISTA PREVIA
   ======================================== */

.modal-preview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-preview.active {
    display: flex;
}

.modal-preview-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #ff3333;
    color: white;
    transform: rotate(90deg);
}

.modal-preview-header {
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-preview-header h3 {
    font-size: 1.4rem;
    color: #2D7A4A;
    margin-bottom: 15px;
}

.modal-bg-selector {
    display: flex;
    gap: 8px;
}

.bg-option {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.bg-option:hover {
    border-color: #2D7A4A;
}

.bg-option.active {
    background: #2D7A4A;
    color: white;
    border-color: #2D7A4A;
}

.modal-preview-body {
    padding: 35px;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: background 0.3s ease;
}

.modal-preview-body.bg-white {
    background: white;
}

.modal-preview-body.bg-dark {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

.modal-preview-body.bg-green {
    background: linear-gradient(135deg, #2D7A4A, #00B8E6);
}

.modal-preview-body img {
    max-width: 80%;
    max-height: 400px;
    object-fit: contain;
}

.modal-preview-footer {
    padding: 18px 20px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.btn-modal-download {
    padding: 12px 35px;
    background: linear-gradient(135deg, #2D7A4A, #00B8E6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modal-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 122, 74, 0.3);
}

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

@media (max-width: 1024px) {
    .escudos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .escudos-grid-horizontal {
        grid-template-columns: 1fr;
    }
    
    .card-horizontal {
        grid-column: span 1;
    }
    
    .aplicaciones-grid,
    .prohibiciones-grid,
    .specs-layout,
    .guia-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .escudo-hero-content h1 {
        font-size: 1.5rem;
    }
    
    .escudo-hero-content p {
        font-size: 0.85rem;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .stat-badge {
        min-width: 80px;
    }
    
    .tabs-container-escudo {
        flex-direction: column;
    }
    
    .tab-btn-escudo {
        max-width: 100%;
    }
    
    .escudos-grid {
        grid-template-columns: 1fr;
    }
    
    .seccion-escudos {
        padding: 15px;
    }
    
    .specs-layout,
    .aplicaciones-grid,
    .prohibiciones-grid,
    .guia-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-preview-content {
        width: 95%;
    }
    
    .modal-preview-body {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .escudo-hero {
        padding: 25px 15px;
    }
    
    .content-section-escudo {
        padding: 20px 15px;
    }
    
    .seccion-titulo {
        font-size: 1.2rem;
    }
    
    .main-title {
        font-size: 1.4rem;
    }
    
    .escudo-actions {
        flex-direction: column;
    }
}