/*
Theme Name: Writeo Child
Theme URI: https://writeo.app
Description: Child theme de GeneratePress para el panel de cliente de Writeo.
Author: Writeo
Template: generatepress
Version: 0.1.0
Text Domain: writeo-child
*/

/* Ajustes visuales del panel sobre GeneratePress.
   Los estilos de los componentes los aporta el plugin (writeo.css). */

body.writeo-panel .site-content {
	background: #f5f0e8;
}

/* Usamos la cabecera nativa de GeneratePress (logo + menú). Los ítems dinámicos
   "Hola, username" y los tokens se inyectan en el menú primary desde el plugin. */

body.writeo-panel .entry-header,
body.writeo-panel .entry-title {
	display: none; /* El título lo pinta cada plantilla del panel. */
}

body.writeo-panel .inside-article,
body.writeo-panel .entry-content {
	margin: 0;
	padding: 0;
}

/* ===== Landing pública: ancho completo, con cabecera y pie nativos de GeneratePress ===== */
/* Se mantienen la cabecera/menú y el pie de GeneratePress (gestionables desde el tema). */
body.writeo-landing-page .generate-back-to-top,
body.writeo-landing-page .entry-header,
body.writeo-landing-page .entry-title {
	display: none !important;
}
body.writeo-landing-page .site-content,
body.writeo-landing-page .site-content .container,
body.writeo-landing-page .content-area,
body.writeo-landing-page #primary,
body.writeo-landing-page .site-main,
body.writeo-landing-page .inside-article,
body.writeo-landing-page .entry-content,
body.writeo-landing-page .page-content {
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
}
body.writeo-landing-page .site-content { display: block; }

/* GeneratePress envuelve los grupos en .wp-block-group__inner-container (con 40px de padding).
   Con display:contents ese envoltorio desaparece del layout: se va el padding y las rejillas
   flex/grid del diseño vuelven a ver a sus hijos directos. */
body.writeo-landing-page .wp-block-group__inner-container {
	display: contents !important;
}

/* Cabecera de GeneratePress con el nuevo diseño (verde bosque + menta) en la Home. */
body.writeo-landing-page .site-header {
	background: #0d1f0d !important;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.06 );
}
body.writeo-landing-page .main-navigation,
body.writeo-landing-page .main-navigation ul {
	background: #0d1f0d !important;
}
body.writeo-landing-page .site-title a,
body.writeo-landing-page .site-description,
body.writeo-landing-page .main-navigation .main-nav ul li a {
	color: rgba( 245, 240, 232, 0.78 ) !important;
}
body.writeo-landing-page .main-navigation .main-nav ul li a:hover,
body.writeo-landing-page .main-navigation .main-nav ul li.current-menu-item a {
	color: #ffffff !important;
}
body.writeo-landing-page .main-navigation .menu-toggle,
body.writeo-landing-page .main-navigation .menu-bar-items {
	color: rgba( 245, 240, 232, 0.78 ) !important;
}

/* Ítem de menú destacado tipo CTA (fondo verde menta). 
   Uso: en Apariencia → Menús, activa "Clases CSS" en Opciones de pantalla y
   añade la clase  writeo-menu-cta  al ítem (p. ej. "Registrarse"). */
.main-navigation .menu-item.writeo-menu-cta > a {
	background: #52b788 !important;
	color: #0d1f0d !important;
	border-radius: 100px;
	font-weight: 700;
	padding: 9px 20px !important;
	margin: 6px 0 6px 8px;
	transition: background 0.16s, transform 0.16s;
}
.main-navigation .menu-item.writeo-menu-cta > a:hover {
	background: #45a375 !important;
	color: #0d1f0d !important;
	transform: translateY( -1px );
}

/* Ítem "Generar" del menú: pastilla con borde. */
.main-navigation .menu-item.menu-generar > a {
	border: 1px solid #214c32;
	border-radius: 60px;
}

/* ===== Pie de página (widgets) con el estilo del diseño (verde bosque) ===== */
.site-footer,
.footer-widgets,
.footer-widgets-container,
.site-footer .site-info,
.inside-site-info {
	background-color: #060f06;
}
.footer-widgets { padding: 0; }
.site-footer,
.site-footer p,
.footer-widgets .widget,
.footer-widgets .widget * {
	color: rgba( 245, 240, 232, 0.45 );
	font-size: 13.5px;
}
.site-footer a { color: rgba( 245, 240, 232, 0.4 ); text-decoration: none; transition: color 0.16s; }
.site-footer a:hover { color: rgba( 245, 240, 232, 0.85 ); }

/* Widget 1: nombre del SaaS */
.footer-name {
	font-family: 'DM Serif Display', Georgia, serif;
	color: #f5f0e8 !important;
	font-size: 17px;
	letter-spacing: -0.3px;
}

/* Widget 2: enlaces */
.footer-widget-2 { text-align: right; }
.link-footer {
	color: rgba( 245, 240, 232, 0.4 ) !important;
	font-weight: 500;
	font-size: 13.5px;
	margin-left: 22px;
	transition: color 0.16s;
}
.link-footer:first-child { margin-left: 0; }
.link-footer:hover { color: rgba( 245, 240, 232, 0.85 ) !important; }

@media ( max-width: 768px ) {
	.footer-widget-2 { text-align: left; }
	.link-footer { margin-left: 0; margin-right: 18px; }
}

/* ===== Ajustes móviles del contenedor y del menú ===== */
@media ( max-width: 768px ) {
	/* Aprovecha mejor el ancho en móvil. */
	.one-container .site-content { padding: 5px; }

	/* Más separación entre los ítems del menú desplegado. */
	.main-navigation .main-nav ul li a {
		padding-top: 16px;
		padding-bottom: 16px;
	}
	/* El ítem "Registrarse" (writeo-menu-cta) pasa a barra completa, alineada con el resto
	   (en escritorio es una píldora, pero en el menú vertical desalineaba). */
	.main-navigation .menu-item.writeo-menu-cta > a {
		display: block;
		margin: 0 !important;
		border-radius: 0 !important;
		padding: 16px 20px !important;
	}
	/* "Hola, usuario" y demás inyectados, alineados a la izquierda como el resto. */
	.main-navigation .writeo-cuenta { margin-left: 0 !important; margin-right: 0 !important; }
}

/* ===== Páginas de contenido (contacto, condiciones) con estilo corporativo ===== */
body.writeo-content-page .site-content { background: #f5f0e8; }
body.writeo-content-page .site-main { max-width: 820px; margin: 0 auto; padding: 56px 20px 80px; }
body.writeo-content-page .inside-article {
	background: #ffffff;
	border: 1px solid rgba( 0, 0, 0, 0.06 );
	border-radius: 22px;
	padding: 48px;
	box-shadow: 0 4px 20px rgba( 0, 0, 0, 0.04 );
}
body.writeo-content-page .entry-header { margin-bottom: 18px; }
body.writeo-content-page .entry-title {
	font-family: 'DM Serif Display', Georgia, serif;
	font-weight: 400;
	color: #0d1f0d;
	font-size: clamp( 30px, 5vw, 44px );
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0;
}
body.writeo-content-page .entry-content {
	font-family: 'Plus Jakarta Sans', -apple-system, Segoe UI, Roboto, sans-serif;
	color: #45413d;
	font-size: 15.5px;
	line-height: 1.75;
}
body.writeo-content-page .entry-content h2,
body.writeo-content-page .entry-content h3 {
	font-family: 'DM Serif Display', Georgia, serif;
	font-weight: 400;
	color: #0d1f0d;
	letter-spacing: -0.01em;
}
body.writeo-content-page .entry-content h2 { font-size: 26px; margin: 1.6em 0 0.5em; }
body.writeo-content-page .entry-content h3 { font-size: 20px; margin: 1.3em 0 0.4em; }
body.writeo-content-page .entry-content a { color: #2d6a4f; text-decoration: underline; }
body.writeo-content-page .entry-content a:hover { color: #0d1f0d; }

@media ( max-width: 600px ) {
	body.writeo-content-page .site-main { padding: 32px 14px 56px; }
	body.writeo-content-page .inside-article { padding: 28px 22px; }
}

/* Contact Form 7 dentro de la tarjeta de contenido (contacto) */
body.writeo-content-page .wpcf7-form label { font-weight: 600; font-size: 13.5px; color: #374151; display: block; margin-bottom: 4px; }
body.writeo-content-page .wpcf7-form input[type="text"],
body.writeo-content-page .wpcf7-form input[type="email"],
body.writeo-content-page .wpcf7-form input[type="tel"],
body.writeo-content-page .wpcf7-form input[type="url"],
body.writeo-content-page .wpcf7-form input[type="number"],
body.writeo-content-page .wpcf7-form textarea,
body.writeo-content-page .wpcf7-form select {
	width: 100%;
	background: #f7f5f1;
	border: 1px solid rgba( 0, 0, 0, 0.09 );
	border-radius: 11px;
	padding: 13px 15px;
	font: inherit;
	font-size: 14.5px;
	color: #1a1a1a;
	transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
body.writeo-content-page .wpcf7-form input:focus,
body.writeo-content-page .wpcf7-form textarea:focus,
body.writeo-content-page .wpcf7-form select:focus {
	outline: none;
	border-color: #52b788;
	box-shadow: 0 0 0 3px rgba( 82, 183, 136, 0.16 );
	background: #fff;
}

/* Botón de envío = botón primario de Writeo */
body.writeo-content-page .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	width: auto;
	background: #0d1f0d;
	border: 1px solid #0d1f0d;
	color: #f5f0e8;
	border-radius: 11px;
	padding: 14px 28px;
	font: inherit;
	font-weight: 700;
	font-size: 14.5px;
	cursor: pointer;
	transition: background 0.16s, transform 0.16s;
}
body.writeo-content-page .wpcf7-submit:hover {
	background: #1a3a1a;
	border-color: #1a3a1a;
	transform: translateY( -1px );
}
