/**
 * Protect Persons | CSS Styles
 * Premium, Light Theme, Red-Accented Aesthetic
 */

:root {
    /* Colors - Light Theme */
    --bg-color: #ffffff;
    --surface-color: #f8f9fa;
    --surface-light: #f1f3f5;
    --primary-color: #e60000;
    /* Resilient Red */
    --primary-hover: #cc0000;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-inverse: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);

    /* Transparent -> Solid white transitions */
    --header-bg-transparent: transparent;
    --header-bg-solid: rgba(255, 255, 255, 0.98);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Effects */
    --shadow-red: 0 8px 32px rgba(230, 0, 0, 0.25);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* ================= Reset & Base ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Utilities */
.text-red {
    color: var(--primary-color);
}

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

.highlight {
    color: var(--text-inverse);
    /* En el hero la dejamos blanca con rojo atrás */
    background-color: var(--primary-color);
    padding: 0 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

/* ================= Scroll Animations (Reveal) ================= */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

.fade-up {
    transform: translateY(50px);
}

.fade-right {
    transform: translateX(-50px);
}

.fade-left {
    transform: translateX(50px);
}

/* ================= Buttons ================= */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    text-align: center;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(230, 0, 0, 0.2);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--text-inverse);
    /* Para el hero (fondo oscuro) */
    border: 2px solid var(--text-inverse);
}

.btn-secondary:hover {
    background-color: var(--text-inverse);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Redefiniendo btn-secondary para fuera del hero (en cards) */
.product-card .btn-secondary {
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    background-color: var(--surface-color);
}

.product-card .btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-inverse);
    border-color: var(--primary-color);
}

/* ================= Header ================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--header-bg-transparent);
    padding: 1.5rem 0;
    transition: var(--transition);
}

.header.scrolled {
    background: var(--header-bg-solid);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* El logo como imagen */
.logo-link {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 80px;
    width: auto;
    transition: transform 0.3s;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-red {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
    color: var(--text-inverse);
    /* Blanco en el hero */
    transition: color 0.3s;
}

.header.scrolled .nav-links a {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-inverse);
    position: absolute;
    transition: var(--transition);
}

.header.scrolled .hamburger,
.header.scrolled .hamburger::before,
.header.scrolled .hamburger::after {
    background-color: var(--text-primary);
}

.hamburger {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger::before {
    content: '';
    top: -8px;
}

.hamburger::after {
    content: '';
    top: 8px;
}

/* ================= Hero ================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    /* Imagen de fondo generada por IA */
    background: url('hero-bg.png') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Oscurecemos un poco la imagen para que el texto resalte */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(30, 0, 0, 0.6) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    color: var(--text-inverse);
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #e0e0e0;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* ================= About Us ================= */
.about-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.about-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    height: 100%;
    background-color: var(--surface-light);
    border-radius: var(--radius-lg);
    z-index: 0;
    transform: translate(15px, -15px);
}

.about-image {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    object-fit: cover;
    aspect-ratio: 4/3;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    z-index: 2;
    background-color: var(--primary-color);
    color: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-red);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge-number {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1;
}

.badge-text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ================= Services ================= */
.services-section {
    padding: 6rem 0;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.services-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 4rem;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.services-list li {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.services-list li:hover {
    transform: translateY(-5px);
    border-color: rgba(230, 0, 0, 0.2);
    box-shadow: var(--shadow-red);
}

.service-icon {
    font-size: 2.2rem;
    background: var(--surface-light);
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--transition);
}

.services-list li:hover .service-icon {
    background: rgba(230, 0, 0, 0.1);
}

.service-content h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--text-primary);
}


/* ================= Products ================= */
.products-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
    overflow: hidden;
}

.products-section .section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 4rem;
}

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

.product-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-card);
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-red);
}

.product-image-wrapper {
    width: 100%;
    height: 260px;
    background-color: var(--surface-light);
    /* Fondo claro para las fotos */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    mix-blend-mode: darken;
    /* Ayuda a blendear renders en blanco */
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* ================= Contact Section ================= */
.contact-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background: var(--surface-color);
    padding: 3rem 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-red);
    border-color: rgba(230, 0, 0, 0.2);
}

.contact-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: rgba(230, 0, 0, 0.1);
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.contact-card:hover .icon {
    background: var(--primary-color);
    color: #fff;
}

.contact-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-card p,
.contact-card a {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.contact-card a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background-color: var(--surface-light);
    border: 1px solid transparent;
    color: var(--text-primary);
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-color);
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ================= Footer ================= */
.footer {
    background-color: var(--text-primary);
    color: var(--text-inverse);
    padding: 4rem 0 2rem;
}

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

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand span {
    color: var(--primary-color);
}

.footer-brand p {
    color: #a0a0a0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: #a0a0a0;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

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

/* ================= Responsive ================= */
@media (max-width: 992px) {

    .about-grid {
        grid-template-columns: 1fr;
    }

    .experience-badge {
        bottom: 20px;
        left: 20px;
    }

    /* Ajuste interno para la caja en móviles */
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .header.scrolled .hamburger,
    .header.scrolled .hamburger::before,
    .header.scrolled .hamburger::after {
        background-color: var(--text-primary);
    }

    .hero-buttons {
        flex-direction: column;
    }

    .services-list,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}