/*
Theme Name: Alker Motor
Theme URI: https://alkermotor.com
Author: Alker Motor
Author URI: https://alkermotor.com
Description: Tema profesional para concesionario de coches de segunda mano. Diseñado específicamente para Alker Motor con integración completa del plugin de coches.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alker-motor
Tags: automotive, car-dealer, business, responsive, modern
*/

/* ========================================
   RESET Y BASE
======================================== */

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

:root {
    --primary-color: #1e3a5f;      /* Azul oscuro profundo del logo */
    --secondary-color: #2C5F8D;    /* Azul medio del logo */
    --accent-color: #2A9D8F;       /* Verde azulado/teal del logo */
    --purple-accent: #6A4C93;      /* Morado del logo */
    --text-dark: #2c3e50;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #2A9D8F;      /* Verde azulado para mensajes de éxito */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

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;
    display: block;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

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

/* ========================================
   CONTENEDORES
======================================== */

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

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ========================================
   HEADER
======================================== */

.site-header {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #0f1419;
    padding: 10px 0;
    font-size: 0.9rem;
}

.header-top-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.contact-info {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.contact-info a {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info a:hover {
    color: var(--accent-color);
}

.header-main {
    padding: 15px 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    max-height: 60px;
    width: auto;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: 1px;
}

.site-title a {
    color: white;
}

.site-title a:hover {
    color: var(--accent-color);
}

.site-description {
    font-size: 0.85rem;
    color: #b0b0b0;
    margin: 0;
}

/* ========================================
   NAVEGACIÓN
======================================== */

.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: white;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.main-navigation a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: white;
    color: var(--primary-color);
}

/* ========================================
   HERO SECTION
======================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-cta {
    display: inline-flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(42, 157, 143, 0.3);
}

.btn-primary:hover {
    background: #238276;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 157, 143, 0.4);
}

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

.btn-secondary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

/* ========================================
   SECCIONES
======================================== */

.section {
    padding: 80px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-alt {
    background: var(--bg-white);
}

/* ========================================
   FEATURES
======================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-description {
    color: var(--text-light);
    line-height: 1.6;
}

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

.site-footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 20px 20px;
}

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

.footer-widget h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: white;
}

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

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #b0b0b0;
}

.footer-widget a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: #b0b0b0;
}

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

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        padding: 20px;
        gap: 0;
    }
    
    .main-navigation ul.active {
        display: flex;
    }
    
    .main-navigation li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .main-navigation a {
        padding: 15px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .header-top-content {
        justify-content: center;
    }
    
    .contact-info {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ========================================
   SCROLL TO TOP BUTTON
======================================== */

#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    background: #238276;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(42, 157, 143, 0.4);
}

/* ========================================
   ANIMATIONS
======================================== */

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

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.feature-card,
.cp-card {
    opacity: 0;
}

.feature-card.animate-in,
.cp-card.animate-in {
    opacity: 1;
}

/* ========================================
   LOADING BUTTON STATE
======================================== */

.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   SEARCH FORM
======================================== */

.search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 141, 0.1);
}

.search-form button {
    padding: 15px 30px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background: var(--primary-color);
}

/* ========================================
   ADDITIONAL RESPONSIVE IMPROVEMENTS
======================================== */

@media (max-width: 768px) {
    #scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
