/*
Theme Name: Agrosensores Blog
Theme URI: https://www.agrosensores.mx
Author: Agrosensores y Semillas de México
Author URI: https://www.agrosensores.mx
Description: Tema corporativo para el blog de Agrosensores y Semillas de México. Identidad viverista de exportación — paleta oliva/crema/café, tipografías Cormorant Garamond + DM Sans. Listo para multilenguaje (Polylang) y SEO (RankMath).
Version: 1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: agrosensores
Tags: blog, two-columns, right-sidebar, custom-logo, featured-images, translation-ready
*/

* { margin:0; padding:0; box-sizing:border-box; }
:root {
  --bg:#0E1508; --bg2:#0C1A0A; --panel:#15290F; --cream:#F5EDE0; --olive:#8A9A52;
  --olive-l:#A6B86A; --tan:#C49A6A; --brown:#7B3F18; --line:rgba(138,154,82,.16);
}
html { scroll-behavior:smooth; }
body { font-family:'DM Sans',sans-serif; background:var(--bg); color:var(--cream); -webkit-font-smoothing:antialiased; line-height:1.6; }
a { color:inherit; text-decoration:none; }
img { display:block; max-width:100%; height:auto; }
h1,h2,h3,h4 { font-family:'Cormorant Garamond',serif; }

/* ===== NAV ===== */
.wp-nav { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 36px; border-bottom:1px solid var(--line); background:rgba(14,21,8,.96); position:sticky; top:0; z-index:100; backdrop-filter:blur(16px); flex-wrap:wrap; }
.wp-nav .brand a, .wp-nav .brand { display:flex; align-items:center; gap:11px; }
.wp-nav .brand .mark { width:38px; height:38px; border-radius:9px; background:linear-gradient(135deg,var(--olive),var(--brown)); display:flex; align-items:center; justify-content:center; font-size:19px; }
.wp-nav .brand .bn { font-family:'Cormorant Garamond',serif; font-size:20px; font-weight:700; line-height:1; display:block; }
.wp-nav .brand .bs { font-size:9px; letter-spacing:.16em; color:var(--olive); text-transform:uppercase; display:block; }
.wp-nav .custom-logo { max-height:44px; width:auto; }
ul.wp-menu { display:flex; gap:26px; font-size:14px; font-weight:500; list-style:none; flex-wrap:wrap; }
ul.wp-menu li a { color:rgba(245,237,224,.7); transition:color .2s; }
ul.wp-menu li a:hover, ul.wp-menu li.current-menu-item a { color:var(--tan); }
.wp-nav .tools { display:flex; align-items:center; gap:14px; }
.wp-lang { font-size:12px; color:rgba(245,237,224,.55); display:flex; gap:8px; align-items:center; }
.wp-lang a { color:rgba(245,237,224,.55); }
.wp-lang .current-lang a, .wp-lang a.current { color:var(--tan); font-weight:700; }

/* search form */
.wsearch { display:flex; gap:8px; }
.wsearch input[type=search] { background:rgba(245,237,224,.05); border:1px solid var(--line); border-radius:9px; padding:9px 13px; font-size:13px; color:var(--cream); font-family:inherit; outline:none; width:160px; max-width:100%; }
.wsearch input::placeholder { color:rgba(245,237,224,.38); }
.wsearch button { background:var(--olive); border:none; border-radius:9px; width:40px; min-width:40px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.widget .wsearch input[type=search] { flex:1; width:auto; }

/* ===== PAGE HEADER ===== */
.wp-head { text-align:center; padding:60px 24px 12px; }
.wp-head .k { font-size:12px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--olive); margin-bottom:14px; }
.wp-head h1 { font-size:54px; font-weight:700; line-height:1.04; }
.wp-head h1 em { color:var(--tan); font-style:italic; }
.wp-head p { max-width:560px; margin:16px auto 0; color:rgba(245,237,224,.55); font-size:15.5px; }

/* ===== LAYOUT ===== */
.wp-layout { max-width:1240px; margin:0 auto; padding:34px 36px 70px; display:grid; grid-template-columns:1fr 312px; gap:40px; }
.wp-main { min-width:0; }

/* sticky featured */
.sticky { position:relative; border-radius:20px; overflow:hidden; border:1px solid rgba(138,154,82,.2); margin-bottom:40px; min-height:340px; display:flex; align-items:flex-end; }
.sticky img.bg, .sticky .bg img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.sticky .bg { position:absolute; inset:0; z-index:0; }
.sticky .ov { position:absolute; inset:0; background:linear-gradient(0deg,rgba(7,12,4,.95) 8%,rgba(7,12,4,.55) 55%,rgba(7,12,4,.25) 100%); z-index:1; }
.sticky .ct { position:relative; z-index:2; padding:38px 40px; }
.sticky .pin { position:absolute; top:20px; left:20px; z-index:3; background:var(--tan); color:#0A0F06; font-size:10.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; padding:6px 13px; border-radius:20px; }
.sticky .cat { font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--olive-l); margin-bottom:12px; }
.sticky .cat a { color:var(--olive-l); }
.sticky h2 { font-size:36px; font-weight:700; line-height:1.1; margin-bottom:12px; max-width:680px; color:var(--cream); }
.sticky .meta { font-size:13px; color:rgba(245,237,224,.6); display:flex; align-items:center; gap:11px; flex-wrap:wrap; }
.sticky .meta .dot { width:3px; height:3px; border-radius:50%; background:rgba(245,237,224,.4); }

.wp-sech { font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:rgba(245,237,224,.4); margin-bottom:20px; display:flex; align-items:center; gap:14px; }
.wp-sech::after { content:''; flex:1; height:1px; background:var(--line); }

/* posts grid */
.posts { display:grid; grid-template-columns:repeat(2,1fr); gap:24px; }
.post { border:1px solid var(--line); border-radius:16px; overflow:hidden; background:rgba(245,237,224,.022); display:flex; flex-direction:column; transition:transform .25s, border-color .25s; }
.post:hover { transform:translateY(-4px); border-color:rgba(138,154,82,.45); }
.post .pi { height:180px; position:relative; display:block; }
.post .pi img { width:100%; height:100%; object-fit:cover; }
.post .pi .badge { position:absolute; top:12px; left:12px; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#0A0F06; background:var(--olive-l); padding:4px 10px; border-radius:12px; }
.post .pc { padding:20px 22px 22px; flex:1; display:flex; flex-direction:column; }
.post h3 { font-size:23px; font-weight:700; line-height:1.18; margin-bottom:9px; }
.post h3 a { color:var(--cream); }
.post .ex { font-size:13.5px; color:rgba(245,237,224,.52); flex:1; line-height:1.6; }
.post .pm { margin-top:15px; font-size:12px; color:rgba(245,237,224,.4); display:flex; align-items:center; gap:9px; }
.post .pm .av { width:22px; height:22px; border-radius:50%; background:linear-gradient(135deg,var(--olive),var(--brown)); }

/* pagination */
.pagination, .nav-links { display:flex; gap:8px; justify-content:center; margin-top:40px; flex-wrap:wrap; }
.pagination .page-numbers { width:42px; height:42px; border-radius:10px; border:1px solid var(--line); display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:600; color:rgba(245,237,224,.6); transition:all .2s; }
.pagination .page-numbers.current { background:var(--olive); color:#0A0F06; border-color:var(--olive); }
.pagination a.page-numbers:hover { border-color:var(--olive); color:var(--tan); }

/* ===== SIDEBAR ===== */
.wp-side { display:flex; flex-direction:column; gap:26px; }
.widget { border:1px solid var(--line); border-radius:16px; padding:24px 22px; background:rgba(245,237,224,.022); }
.widget h4, .widget .widget-title, .widget h2.widget-title { font-size:13px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--tan); margin-bottom:16px; font-family:'DM Sans',sans-serif; }
.widget ul { list-style:none; display:flex; flex-direction:column; gap:1px; }
.widget ul li a { display:flex; justify-content:space-between; align-items:center; padding:10px 2px; font-size:14px; color:rgba(245,237,224,.68); border-bottom:1px solid rgba(138,154,82,.08); transition:color .2s; }
.widget ul li a:hover { color:var(--tan); }
.widget ul.cats li a .n, .widget ul li .count { font-size:11px; color:rgba(245,237,224,.4); background:rgba(138,154,82,.12); border-radius:10px; padding:2px 8px; }
.tagcloud { display:flex; flex-wrap:wrap; gap:8px; }
.tagcloud a { font-size:12px !important; color:rgba(245,237,224,.6); background:rgba(138,154,82,.1); border:1px solid var(--line); border-radius:7px; padding:5px 11px; }

/* ===== SINGLE POST ===== */
.single { max-width:780px; margin:0 auto; padding:46px 36px 70px; }
.crumbs { font-size:12.5px; color:rgba(245,237,224,.42); margin-bottom:26px; }
.crumbs a { color:rgba(245,237,224,.6); }
.single .catt { display:inline-block; font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--olive-l); background:rgba(138,154,82,.12); border:1px solid var(--line); padding:6px 14px; border-radius:20px; margin-bottom:20px; }
.single .catt a { color:var(--olive-l); }
.single > h1 { font-size:46px; font-weight:700; line-height:1.08; margin-bottom:20px; }
.single .amt { display:flex; align-items:center; gap:13px; padding-bottom:26px; border-bottom:1px solid var(--line); margin-bottom:30px; }
.single .amt .av img { width:44px; height:44px; border-radius:50%; }
.single .amt .av { width:44px; height:44px; border-radius:50%; background:linear-gradient(135deg,var(--olive),var(--brown)); flex-shrink:0; overflow:hidden; }
.single .amt .an { font-size:14px; font-weight:600; color:var(--cream); }
.single .amt .ad { font-size:12.5px; color:rgba(245,237,224,.45); display:flex; gap:9px; align-items:center; flex-wrap:wrap; }
.single .amt .ad .dot { width:3px; height:3px; border-radius:50%; background:rgba(245,237,224,.35); }
.feat { border-radius:18px; overflow:hidden; margin-bottom:34px; border:1px solid var(--line); }
.feat img { width:100%; max-height:440px; object-fit:cover; }

/* editor content */
.entry-content p { font-size:17px; color:rgba(245,237,224,.82); margin-bottom:22px; line-height:1.75; }
.entry-content h2 { font-size:30px; font-weight:700; margin:38px 0 16px; color:var(--cream); }
.entry-content h3 { font-size:24px; font-weight:700; margin:30px 0 14px; color:var(--cream); }
.entry-content blockquote { border-left:3px solid var(--olive); padding:6px 0 6px 24px; margin:26px 0; font-size:20px; font-style:italic; color:var(--cream); font-family:'Cormorant Garamond',serif; }
.entry-content ul, .entry-content ol { margin:0 0 22px 22px; color:rgba(245,237,224,.8); font-size:16.5px; }
.entry-content li { margin-bottom:8px; }
.entry-content a { color:var(--tan); text-decoration:underline; }
.entry-content img { border-radius:14px; margin:10px 0 26px; }
.entry-content strong { color:var(--cream); }

.ptags { display:flex; flex-wrap:wrap; gap:9px; margin:34px 0; }
.ptags span, .ptags a { font-size:13px; color:rgba(245,237,224,.6); background:rgba(138,154,82,.1); border:1px solid var(--line); border-radius:8px; padding:6px 13px; }

.authorbox { display:flex; gap:18px; align-items:flex-start; background:linear-gradient(150deg,var(--panel),var(--bg2)); border:1px solid rgba(138,154,82,.2); border-radius:18px; padding:26px 28px; margin:36px 0; }
.authorbox .ba { width:64px; height:64px; border-radius:50%; background:linear-gradient(135deg,var(--olive),var(--brown)); flex-shrink:0; overflow:hidden; }
.authorbox .ba img { width:64px; height:64px; border-radius:50%; }
.authorbox h4 { font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:var(--tan); margin-bottom:6px; font-family:'DM Sans',sans-serif; }
.authorbox .bn { font-family:'Cormorant Garamond',serif; font-size:24px; font-weight:700; margin-bottom:8px; }
.authorbox p { font-size:14px; color:rgba(245,237,224,.6); line-height:1.6; }

/* related */
.related { margin:48px 0; }
.rel-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.rel { border:1px solid var(--line); border-radius:14px; overflow:hidden; background:rgba(245,237,224,.022); }
.rel img { height:110px; width:100%; object-fit:cover; }
.rel .rc { padding:14px 15px 16px; }
.rel .rcat { font-size:9.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--olive); margin-bottom:7px; }
.rel h4 { font-size:17px; line-height:1.2; font-weight:700; color:var(--cream); }

/* comments */
.comments { margin-top:48px; padding-top:34px; border-top:1px solid var(--line); }
.comments h3 { font-size:26px; font-weight:700; margin-bottom:26px; }
.comment { display:flex; gap:15px; margin-bottom:24px; list-style:none; }
.comment .children { list-style:none; margin-top:24px; margin-left:30px; }
.comment .ca { width:42px; height:42px; border-radius:50%; background:linear-gradient(135deg,#3a5a2a,#6a4a26); flex-shrink:0; overflow:hidden; }
.comment .ca img { width:42px; height:42px; border-radius:50%; }
.comment .cb { flex:1; }
.comment .ch { display:flex; align-items:center; gap:10px; margin-bottom:5px; flex-wrap:wrap; }
.comment .cn { font-size:14px; font-weight:600; }
.comment .cd { font-size:12px; color:rgba(245,237,224,.4); }
.comment .ct { font-size:14px; color:rgba(245,237,224,.65); line-height:1.6; }
.comment .ct p { margin-bottom:8px; }
.comment .cr a { font-size:12px; color:var(--olive-l); font-weight:600; }
.comment-respond, .cform { background:rgba(245,237,224,.022); border:1px solid var(--line); border-radius:16px; padding:26px; margin-top:30px; }
.comment-respond h4, .comment-reply-title { font-size:20px; font-weight:700; margin-bottom:16px; font-family:'Cormorant Garamond',serif; }
.comment-form textarea, .cform textarea { width:100%; background:rgba(245,237,224,.05); border:1px solid var(--line); border-radius:10px; padding:13px; font-family:inherit; font-size:14px; color:var(--cream); min-height:90px; outline:none; resize:vertical; margin-bottom:12px; }
.comment-form .crow { display:flex; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url] { flex:1; min-width:160px; background:rgba(245,237,224,.05); border:1px solid var(--line); border-radius:10px; padding:11px 13px; font-family:inherit; font-size:14px; color:var(--cream); outline:none; }
.comment-form .form-submit input, .cform button { background:linear-gradient(135deg,var(--olive),#5C6B3A); color:#0A0F06; border:none; border-radius:10px; padding:13px 28px; font-weight:700; font-size:14px; cursor:pointer; font-family:inherit; }
.comment-form label { font-size:12px; color:rgba(245,237,224,.45); display:block; margin-bottom:5px; }

/* footer */
.wp-foot { background:#070D04; border-top:1px solid rgba(138,154,82,.1); padding:30px 36px; text-align:center; color:rgba(245,237,224,.4); font-size:13px; }
.wp-foot a { color:var(--olive); }

/* archive title */
.arch-title { text-align:center; padding:54px 24px 0; }
.arch-title .k { font-size:12px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--olive); margin-bottom:12px; }
.arch-title h1 { font-size:46px; font-weight:700; }

@media (max-width:980px){
  .wp-layout { grid-template-columns:1fr; }
  .wp-side { display:none; }
  .posts { grid-template-columns:1fr; }
  .rel-grid { grid-template-columns:1fr; }
  .wp-head h1 { font-size:42px; }
  .single > h1 { font-size:36px; }
}
@media (max-width:680px){
  .wp-nav { padding:14px 18px; }
  .wsearch input[type=search] { width:120px; }
}
