/*
Theme Name: RalpsElectronics
Description: Tema de bloques nativo para RalpsElectronics.
Version: 1.0.0
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.2
Text Domain: ralps-electronics
*/

/* =========================================
   Global
   ========================================= */
:root { --ralps-rule: rgba(16, 36, 45, 0.16); }
.wp-site-blocks { overflow: clip; }
.wp-block-group { box-sizing: border-box; }
.ralps-page-shell { padding-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); padding-bottom: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
/* =========================================
   Typography
   ========================================= */
.wp-block-heading { letter-spacing: -0.035em; }
.ralps-eyebrow { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.ralps-muted { color: var(--wp--preset--color--slate); }
/* =========================================
   Header
   ========================================= */
.ralps-header { border-bottom: 1px solid var(--ralps-rule); position: relative; z-index: 10; }
.ralps-header__inner { max-width: 1360px !important; min-height: 4.5rem; gap: clamp(0.6rem, 0.9vw, 1rem); }
.ralps-brand .custom-logo { max-height: 3.9rem; width: auto; }
.ralps-brand img { max-height: 3.9rem; width: auto; }
.ralps-brand { flex-shrink: 0; }
.ralps-header .wp-block-buttons { flex-shrink: 0; }
.ralps-header-cta .wp-element-button { min-width: 10.75rem; padding: 0.7rem 0.9rem; text-align: center; white-space: nowrap; }
/* =========================================
   Navigation
   ========================================= */
.ralps-navigation { flex: 1 1 auto; min-width: 0; }
.ralps-navigation .wp-block-navigation__container { flex-wrap: nowrap; gap: clamp(0.4rem, 0.7vw, 0.75rem); }
.ralps-navigation .wp-block-navigation-item__content { font-size: 0.76rem; text-decoration: none; white-space: nowrap; }
.ralps-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--brand-blue); text-decoration: underline; text-underline-offset: 0.3em; }
/* =========================================
   Hero
   ========================================= */
/* El Grupo interior mantiene el contenido en un flujo vertical. */
.ralps-hero {
    display: block;
    padding-top: clamp(3rem, 4vw, 5rem);
    padding-bottom: clamp(3rem, 4vw, 5rem);
}
.ralps-hero__content {
    width: 100%;
    max-width: 1160px;
    margin-inline: auto;
}
.ralps-hero__content > * { margin-block: 0; }
.ralps-hero__content > * + * { margin-block-start: 1.5rem; }
.ralps-hero__content > .ralps-eyebrow { max-width: 100%; line-height: 1.5; }
.ralps-hero__content > .ralps-hero__title {
    width: 100%;
    max-width: 1000px;
    font-size: clamp(3rem, 6vw, 5.75rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}
.ralps-hero__content > .ralps-hero__lead {
    max-width: 40rem;
    font-size: clamp(1.05rem, 1rem + 0.45vw, 1.25rem);
    line-height: 1.6;
}
.ralps-hero .wp-block-buttons { flex-wrap: wrap; justify-content: flex-start; gap: 0.75rem; }
.ralps-hero .wp-block-button { max-width: 100%; }
.ralps-hero .wp-block-button__link {
    box-sizing: border-box;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
}
/* =========================================
   Sections
   ========================================= */
.ralps-hero, .ralps-section, .ralps-footer { --wp--style--global--content-size: min(1160px, 100%); }
.ralps-section { border-top: 1px solid var(--ralps-rule); }
.ralps-section { padding-top: clamp(2.75rem, 2rem + 3vw, 4.75rem); padding-bottom: clamp(2.75rem, 2rem + 3vw, 4.75rem); }
.ralps-section--dark { border-top: 0; }
.ralps-number { color: var(--wp--preset--color--brand-yellow); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; }
.wp-block-post-content .ralps-section > .wp-block-columns { gap: clamp(1.25rem, 1rem + 2vw, 2.25rem); max-width: 1160px !important; }
.wp-block-post-content .ralps-section > .wp-block-columns + .wp-block-columns { margin-top: clamp(1.25rem, 1rem + 1vw, 2rem); }
.wp-block-post-content .ralps-section > :is(p, .wp-block-quote, .wp-block-buttons) { max-width: 48rem !important; }
.wp-block-post-content .ralps-section .wp-block-column > :first-child { margin-top: 0; }
.wp-block-post-content .ralps-section .wp-block-column > :last-child { margin-bottom: 0; }
.wp-block-post-content .wp-block-quote { margin-top: 1.5rem; margin-bottom: 0; }
.wp-block-post-content .ralps-section > .ralps-eyebrow + .wp-block-heading { margin-top: 0.75rem; }
.wp-block-post-content .ralps-section > .wp-block-heading + p { margin-top: 1rem; }
.wp-block-post-content .ralps-section h2 { font-size: clamp(1.85rem, 2.7vw, 2.75rem); }
.wp-block-post-content .ralps-section h3 { font-size: clamp(1.15rem, 1.3vw, 1.35rem); }
/* =========================================
   Cards
   ========================================= */
.ralps-card { border-top: 3px solid var(--wp--preset--color--brand-yellow); height: 100%; padding-top: 1.25rem; }
.ralps-card--outline { border: 1px solid var(--ralps-rule); border-top: 3px solid var(--wp--preset--color--brand-yellow); padding: clamp(1.25rem, 1rem + 1vw, 2rem); }
.ralps-case-study { border-left: 2px solid var(--wp--preset--color--brand-yellow); }
/* =========================================
   Buttons
   ========================================= */
.ralps-button-secondary .wp-element-button { background: transparent; border: 1px solid currentColor; color: var(--wp--preset--color--brand-blue); }
.ralps-button-secondary .wp-element-button:hover { background: var(--wp--preset--color--brand-blue); color: var(--wp--preset--color--white); }
.wp-element-button, .wp-block-button__link { transition: background-color 160ms ease, color 160ms ease; }
.wp-element-button:focus-visible, .wp-block-navigation-item__content:focus-visible, .ralps-footer a:focus-visible { outline: 2px solid var(--wp--preset--color--brand-yellow); outline-offset: 3px; }
/* =========================================
   Footer
   ========================================= */
.ralps-footer { border-top: 4px solid var(--wp--preset--color--brand-yellow); padding-top: clamp(2.75rem, 2rem + 3vw, 4.5rem); padding-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.ralps-footer > .ralps-footer__columns { gap: clamp(1.5rem, 3vw, 3.5rem); max-width: 1160px !important; }
.ralps-footer a { color: inherit; }
.ralps-footer a:hover { color: var(--wp--preset--color--brand-yellow); }
/* =========================================
   Responsive
   ========================================= */
@media (min-width: 901px) { .wp-block-post-content { width: calc(100% - 3rem); max-width: 1200px !important; margin-inline: auto !important; } .wp-block-post-content > .ralps-hero, .wp-block-post-content > .ralps-section { width: 100%; max-width: none !important; } .wp-block-post-content > .ralps-section > .wp-block-columns { width: 100%; max-width: 1160px !important; } .wp-block-post-content > .ralps-section > :is(.wp-block-heading, p, .wp-block-quote, .wp-block-buttons) { width: 100%; max-width: 48rem !important; } .ralps-header > .ralps-header__inner { width: calc(100% - 3rem); max-width: 1360px !important; } .ralps-footer > .ralps-footer__columns { width: 100%; max-width: 1160px !important; } }
@media (max-width: 1100px) { .ralps-header__inner { max-width: none !important; } .ralps-navigation .wp-block-navigation-item__content { font-size: 0.72rem; } .ralps-navigation .wp-block-navigation__container { gap: 0.5rem; } }
@media (max-width: 900px) { .ralps-header__inner { min-height: 4.25rem; gap: 0.5rem; } .ralps-header .wp-block-buttons { display: block; } .ralps-header-cta .wp-element-button { min-width: 0; font-size: 0.78rem; padding: 0.6rem 0.7rem; } .ralps-navigation { flex: 0 0 auto; } .ralps-navigation .wp-block-navigation__container { gap: initial; } .ralps-hero { min-height: auto; padding-top: 3.25rem; padding-bottom: 3.25rem; } .wp-block-post-content .ralps-section > .wp-block-columns { gap: 1.5rem; } }
@media (max-width: 600px) { .ralps-header__inner { min-height: 3.9rem; } .ralps-brand .custom-logo, .ralps-brand img { max-height: 2.25rem; } .ralps-header-cta .wp-element-button { font-size: 0.75rem; padding: 0.55rem 0.6rem; } .ralps-hero { padding-top: 2.25rem; padding-bottom: 2.25rem; } .ralps-hero .wp-block-buttons { gap: 0.6rem; } .ralps-section { padding-top: 2.25rem; padding-bottom: 2.25rem; } .ralps-eyebrow { font-size: 0.8125rem; } .wp-block-post-content .ralps-section h2 { font-size: clamp(1.875rem, 8vw, 2.25rem); } .wp-block-post-content .ralps-section h3 { font-size: clamp(1.375rem, 6vw, 1.625rem); } .wp-block-post-content .ralps-section p { font-size: 1.0625rem; line-height: 1.58; } .wp-block-post-content .ralps-section p.ralps-eyebrow { font-size: 0.8125rem; } .wp-block-post-content .ralps-section > * + * { margin-block-start: 1rem !important; } .wp-block-post-content .ralps-section .wp-block-column > * + * { margin-block-start: 0.65rem !important; } .wp-block-post-content .ralps-section > .wp-block-columns { gap: 1rem; max-width: none !important; } .wp-block-post-content .ralps-section > .wp-block-columns + .wp-block-columns { margin-top: 1rem; } .wp-block-post-content .wp-block-quote { margin-top: 1rem; } .wp-block-post-content .wp-element-button { max-width: 100%; padding: 0.7rem 1rem; } .ralps-footer { padding-top: 2.25rem; padding-bottom: 2rem; } .ralps-footer__columns { gap: 1.5rem; max-width: none !important; } .ralps-footer .wp-block-navigation { gap: 0.45rem; } }
@media (prefers-reduced-motion: reduce) { .wp-element-button, .wp-block-button__link { transition: none; } }

/* =========================================
   Desktop layout refinement
   ========================================= */
@media (min-width: 1101px) {
	.wp-block-post-content {
		width: calc(100% - 3rem) !important;
		max-width: 1200px !important;
		margin-inline: auto !important;
	}

	.wp-block-post-content > .ralps-section,
	.wp-block-post-content > .ralps-hero {
		width: 100% !important;
		max-width: none !important;
	}

	.wp-block-post-content > .ralps-section > .wp-block-columns {
		width: 100% !important;
		max-width: 1160px !important;
		margin-inline: auto !important;
	}

	.wp-block-post-content > .ralps-section > :where(.wp-block-heading, p, .wp-block-quote, .wp-block-buttons) {
		width: 100% !important;
		max-width: 48rem !important;
		margin-inline: auto;
	}

	

	

	.ralps-header > .ralps-header__inner {
		width: calc(100% - 3rem) !important;
		max-width: 1360px !important;
		margin-inline: auto !important;
		flex-wrap: nowrap !important;
	}

	.ralps-header .ralps-navigation {
		flex: 1 1 auto !important;
		min-width: 0 !important;
	}

	.ralps-header .ralps-navigation .wp-block-navigation__container {
		flex-wrap: nowrap !important;
		gap: 0.75rem !important;
	}

	.ralps-header .wp-block-buttons {
		flex: 0 0 auto !important;
		flex-wrap: nowrap !important;
	}

	.ralps-header .ralps-header-cta .wp-element-button {
		flex-shrink: 0 !important;
		white-space: nowrap !important;
		width: auto !important;
		min-width: 0 !important;
		padding-inline: 1rem !important;
	}

	.ralps-footer > .ralps-footer__columns {
		width: 100% !important;
		max-width: 1160px !important;
		margin-inline: auto !important;
	}
}
/* =========================================
   Encabezado desktop — navegación horizontal
   ========================================= */
@media (min-width: 1101px) {

    /* Contenedor principal */
    .ralps-header > .ralps-header__inner {
        width: calc(100% - 3rem) !important;
        max-width: 1360px !important;
        margin-inline: auto !important;
        flex-wrap: nowrap !important;
        gap: 1rem !important;
    }

    /* Logo */
    .ralps-header .ralps-brand {
        flex: 0 0 auto !important;
    }

    /* Navegación */
    .ralps-header .ralps-navigation {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        flex-wrap: nowrap !important;
    }

    /* Lista del menú */
    .ralps-header .ralps-navigation .wp-block-navigation__container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: auto !important;
        max-width: none !important;
        gap: 0.4rem !important;
    }

    /* Elementos del menú */
    .ralps-header .ralps-navigation .wp-block-navigation-item {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    /* Texto del menú */
    .ralps-header .ralps-navigation .wp-block-navigation-item__content {
        display: block !important;
        white-space: nowrap !important;
        font-size: 0.82rem !important;
    }

    /* Contenedor del botón */
    .ralps-header .wp-block-buttons {
        flex: 0 0 auto !important;
        flex-wrap: nowrap !important;
        width: auto !important;
    }

    .ralps-header .ralps-header-cta,
    .ralps-header .ralps-header-cta .wp-block-button {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    /* Botón CTA */
    .ralps-header .ralps-header-cta .wp-element-button,
    .ralps-header .ralps-header-cta .wp-block-button__link {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0.7rem 1rem !important;
        font-size: 0.82rem !important;
    }
}
