/*
Theme Name: Andisof
Theme URI: https://andisof.com
Author: Andisof
Author URI: https://andisof.com
Description: Tema de bloques para Andisof — servicios de TI en Barranquilla. Diseño claro y corporativo con planes mensuales, casos de éxito, blog, botón de WhatsApp y formulario de contacto.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: andisof
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
:where(section[id]) { scroll-margin-top: 90px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 3px solid #F59E0B;
	outline-offset: 2px;
}

/* ---------- Encabezado ---------- */
.andi-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #FFFFFF;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-top: 14px;
	padding-bottom: 14px;
}
.admin-bar .andi-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .andi-header { top: 46px; } }
.andi-header__inner { gap: 20px; }
.andi-logo a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-weight: 800;
	font-size: 22px;
	letter-spacing: -0.01em;
}
.andi-logo a::before {
	content: "";
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--wp--preset--color--blue);
	flex: none;
}
.andi-brand { gap: 10px; }
.andi-brand .wp-block-site-logo { line-height: 0; }
.andi-brand .wp-block-site-logo img { max-height: 48px; width: auto; height: auto; }
/* Si hay logo, se oculta el círculo azul del título */
.andi-brand:has(.wp-block-site-logo img) .andi-logo a::before { display: none; }
.andi-header .wp-block-navigation { font-weight: 500; font-size: 15px; }
.andi-header .wp-block-navigation a { color: #334155; text-decoration: none; }
.andi-header .wp-block-navigation a:hover { color: var(--wp--preset--color--blue); }

/* ---------- Secciones ---------- */
.andi-section {
	padding-top: clamp(56px, 8vw, 88px);
	padding-bottom: clamp(56px, 8vw, 88px);
	padding-left: 24px;
	padding-right: 24px;
}
.andi-section--surface { background: var(--wp--preset--color--surface); }
.andi-section > * + * { margin-block-start: 40px; }
.andi-eyebrow {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--blue);
	margin-bottom: 0;
}
.andi-intro { max-width: 640px; }
.andi-intro.has-text-align-center,
.has-text-align-center.andi-intro { margin-left: auto; margin-right: auto; }
.andi-muted { color: var(--wp--preset--color--slate); }

/* ---------- Hero ---------- */
.andi-hero {
	background: var(--wp--preset--color--surface);
	padding: clamp(56px, 9vw, 88px) 24px;
}
.andi-hero h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.025em; }
.andi-hero__cols { gap: 56px; }
.andi-badge {
	display: inline-block;
	background: var(--wp--preset--color--blue-soft);
	color: var(--wp--preset--color--blue-dark);
	font-size: 14px;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 0;
}
.andi-lead { font-size: 19px; color: var(--wp--preset--color--slate); }
.andi-hero__media { position: relative; }
.andi-photo {
	min-height: 380px;
	border-radius: 24px;
	background: #CBD5E1;
	color: #334155;
	font-size: 15px;
	text-align: center;
	padding: 24px;
	box-sizing: border-box;
}
/* Si la foto se puso dentro del recuadro gris, el recuadro desaparece */
.andi-photo:has(img) { background: none; padding: 0; min-height: 0; display: block !important; }
.andi-photo:has(img) .wp-block-image { margin: 0; }
.andi-hero__media img { width: 100%; height: 400px; object-fit: cover; border-radius: 24px; display: block; }
.andi-hero__media .wp-block-image { margin: 0; }
.andi-floating-card {
	position: absolute;
	left: -24px;
	bottom: -24px;
	background: #FFFFFF;
	border-radius: 16px;
	padding: 16px 20px;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
	gap: 12px;
	font-size: 14px;
	line-height: 1.4;
}
.andi-floating-card::before {
	content: "";
	width: 40px;
	height: 40px;
	flex: none;
	border-radius: 50%;
	background: #DCFCE7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2315803D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.andi-floating-card p { margin: 0; }
@media (max-width: 781px) {
	.andi-floating-card { position: static; margin-top: 16px; }
}

/* ---------- Clientes ---------- */
.andi-clients {
	padding: 32px 24px;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.andi-clients__list { gap: 14px 48px; }
.andi-clients__list p {
	margin: 0;
	font-weight: 700;
	font-size: 18px;
	color: #64748B;
}

/* ---------- Planes mensuales (franja oscura) ---------- */
.andi-plans-dark {
	background: var(--wp--preset--color--ink);
	color: #E2E8F0;
	position: relative;
	overflow: hidden;
}
.andi-plans-dark::before {
	content: "";
	position: absolute;
	width: 620px;
	height: 620px;
	right: -180px;
	top: -260px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(29, 78, 216, 0.45), rgba(29, 78, 216, 0));
	pointer-events: none;
}
.andi-plans-dark > * { position: relative; }
.andi-plans-dark h2, .andi-plans-dark h3 { color: #FFFFFF; }
.andi-plans-dark .andi-eyebrow { color: #93B4FB; }
.andi-plans-dark .andi-lead { color: #CBD5E1; margin: 0; }
.andi-plans-dark h2 { margin: 8px 0 0; }
.andi-plans-head { gap: 40px; }
.andi-plans { gap: 24px; }
.andi-plan {
	background: #16213A;
	border: 1px solid #26344F;
	border-radius: 22px;
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	transition: transform 0.2s ease, border-color 0.2s ease;
}
.andi-plan:hover { transform: translateY(-4px); border-color: #3B5BA9; }
.andi-plan > * { margin: 0 !important; }
.andi-plan::before {
	content: "";
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background-color: rgba(255, 255, 255, 0.08);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 28px;
	margin-bottom: 6px;
}
.andi-plan--soporte::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E"); }
.andi-plan--seguridad::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8.2-8 9-4.6-.8-8-4.5-8-9V6l8-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.andi-plan--web::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.7 3.8 5.7 3.8 9s-1.3 6.3-3.8 9c-2.5-2.7-3.8-5.7-3.8-9S9.5 5.7 12 3z'/%3E%3C/svg%3E"); }
.andi-plan__kicker {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #93B4FB;
}
.andi-plan h3 { font-size: 26px; }
.andi-plan__desc { color: #CBD5E1; }
.andi-checks { list-style: none; padding: 16px 0 0 !important; border-top: 1px solid #26344F; color: #E2E8F0; }
.andi-checks li {
	padding: 5px 0 5px 30px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237DD3A8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") left 7px / 18px no-repeat;
}
.andi-plan .wp-block-buttons { margin-top: auto !important; padding-top: 10px; }
.andi-plan .wp-block-button { width: 100%; }
.andi-plan .wp-block-button__link {
	width: 100%;
	text-align: center;
	background: #FFFFFF;
	color: var(--wp--preset--color--ink);
}
.andi-plan .is-style-outline .wp-block-button__link {
	background: transparent;
	color: #FFFFFF;
	border: 1px solid #3B4B6B;
}
.andi-plan .is-style-outline .wp-block-button__link:hover { border-color: #FFFFFF; }
.andi-plan--featured {
	background: var(--wp--preset--color--blue);
	border-color: var(--wp--preset--color--blue);
	box-shadow: 0 24px 60px rgba(29, 78, 216, 0.45);
}
.andi-plan--featured:hover { border-color: #93B4FB; }
.andi-plan--featured::before { background-color: rgba(255, 255, 255, 0.16); }
.andi-plan--featured .andi-plan__kicker {
	align-self: flex-start;
	background: #FFFFFF;
	color: var(--wp--preset--color--blue-dark);
	padding: 4px 12px;
	border-radius: 999px;
}
.andi-plan--featured .andi-plan__desc { color: #DBE6FE; }
.andi-plan--featured .andi-checks { border-top-color: rgba(255, 255, 255, 0.25); color: #FFFFFF; }
.andi-plan--featured .andi-checks li { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.andi-plan--featured .wp-block-button__link { color: var(--wp--preset--color--blue); font-weight: 700; }
@media (min-width: 782px) {
	.andi-plan--featured { transform: translateY(-12px); }
	.andi-plan--featured:hover { transform: translateY(-16px); }
}
.andi-included { gap: 12px; align-items: center; }
.andi-included p { margin: 0; }
.andi-included__label { color: #CBD5E1; font-weight: 600; }
.andi-pill {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid #26344F;
	border-radius: 999px;
	padding: 8px 16px 8px 38px;
	font-size: 15px;
	color: #FFFFFF;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237DD3A8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 14px center;
	background-size: 16px;
}
.andi-plans-note { color: #94A3B8; font-size: 15px; }
.andi-plans-note a { color: #93B4FB; }

/* ---------- Servicios ---------- */
.andi-feature {
	background: #FFFFFF;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	padding: 24px;
}
.andi-feature > * { margin: 0; }
.andi-feature > * + * { margin-top: 8px; }
.andi-feature h3 { font-size: 19px; }
.andi-feature p { font-size: 15px; color: var(--wp--preset--color--slate); }
.andi-stack { gap: 10px 28px; font-size: 15px; color: var(--wp--preset--color--slate); }
.andi-stack p { margin: 0; }

/* ---------- Casos de éxito ---------- */
.andi-cases > * + * { margin-top: 18px; }
.andi-case {
	background: #FFFFFF;
	border-radius: 18px;
	padding: 24px;
	gap: 24px;
	align-items: center;
}
.andi-case > * { margin: 0; }
.andi-case .andi-photo { min-height: 140px; border-radius: 12px; }
.andi-case img { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; display: block; }
.andi-case .wp-block-image { margin: 0; }
.andi-case h3 { font-size: 21px; margin: 4px 0 0; }
.andi-case__tag { font-size: 13px; font-weight: 600; color: var(--wp--preset--color--blue); margin: 0; letter-spacing: 0.04em; }
.andi-case p { color: var(--wp--preset--color--slate); }

/* ---------- Blog ---------- */
.andi-posts .wp-block-post {
	background: #FFFFFF;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	padding: 26px;
}
.andi-posts .wp-block-post-title { font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.andi-posts .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.andi-posts .wp-block-post-title a:hover { color: var(--wp--preset--color--blue); }
.andi-posts .wp-block-post-excerpt { font-size: 15px; color: var(--wp--preset--color--slate); }
.andi-posts .wp-block-post-date { font-size: 13px; color: var(--wp--preset--color--slate); }

/* ---------- Llamado a la acción ---------- */
.andi-cta {
	background: var(--wp--preset--color--blue);
	color: #FFFFFF;
	border-radius: 28px;
	padding: clamp(32px, 6vw, 56px);
	gap: 28px;
}
.andi-cta h2 { color: #FFFFFF; font-size: clamp(28px, 4vw, 36px); margin: 0; }
.andi-cta p { color: var(--wp--preset--color--blue-soft); font-size: 18px; margin: 8px 0 0; }
.andi-cta .wp-block-button__link { background: #FFFFFF; color: var(--wp--preset--color--blue); font-weight: 700; }
.andi-cta .is-style-outline .wp-block-button__link {
	background: transparent;
	color: #FFFFFF;
	border-color: #93B4FB;
	font-weight: 600;
}

/* ---------- Contacto ---------- */
.andi-contact-list { list-style: none; padding: 0; }
.andi-contact-list li { padding: 6px 0; }
.andi-form {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 20px;
	padding: 32px;
}
.andi-form form { display: grid; gap: 16px; }
.andi-form .andi-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.andi-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.andi-form input[type="text"],
.andi-form input[type="email"],
.andi-form input[type="tel"],
.andi-form select,
.andi-form textarea {
	font: inherit;
	font-weight: 400;
	padding: 12px 14px;
	border: 1px solid #94A3B8;
	border-radius: 10px;
	background: #FFFFFF;
	min-height: 46px;
	box-sizing: border-box;
	width: 100%;
}
.andi-form .andi-form__check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.andi-form .andi-form__check input { margin-top: 4px; width: 18px; height: 18px; }
.andi-form button {
	font: inherit;
	font-weight: 600;
	background: var(--wp--preset--color--blue);
	color: #FFFFFF;
	border: 0;
	padding: 14px 24px;
	border-radius: 999px;
	min-height: 48px;
	cursor: pointer;
}
.andi-form button:hover { background: var(--wp--preset--color--blue-dark); }
.andi-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.andi-alert { padding: 14px 18px; border-radius: 12px; font-weight: 600; margin-bottom: 8px; }
.andi-alert--ok { background: #DCFCE7; color: #14532D; }
.andi-alert--error { background: #FEE2E2; color: #7F1D1D; }

/* ---------- Páginas de caso ---------- */
.andi-results { gap: 20px; }
.andi-result-number { font-size: 40px; font-weight: 800; color: var(--wp--preset--color--blue); margin: 0; line-height: 1.1; }

/* ---------- Pie de página ---------- */
.andi-footer {
	border-top: 1px solid var(--wp--preset--color--line);
	padding: 40px 24px;
	font-size: 14px;
	color: var(--wp--preset--color--slate);
}
.andi-footer__inner { gap: 20px; }
.andi-footer p { margin: 0; }
.andi-footer .wp-block-navigation a { color: var(--wp--preset--color--slate); }

/* ---------- Botón flotante de WhatsApp ---------- */
.andi-wa-float {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #15803D;
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s ease;
}
.andi-wa-float:hover { transform: scale(1.06); color: #FFFFFF; }
.andi-wa-float svg { width: 28px; height: 28px; }
