/* ============================================================
   NOTIAGRO — ELEGANT AGRICULTURAL THEME
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0369a1;
  --primary-dark: #0c4a6e;
  --primary-light: #38bdf8;
  --primary-bg: #e0f2fe;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --bg-body: #339966;
  --bg-card: #ffffff;
  --bg-dark: #0c4a6e;
  --text-dark: #0c4a6e;
  --text-body: #495057;
  --text-muted: #868e96;
  --overlay-from: rgba(12,74,110,0.35);
  --overlay-to: rgba(3,105,161,0.15);
  --overlay-feat: rgba(12,74,110,0.5);
  --white: #ffffff;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/*
Theme colors are injected inline via PHP in <head>
to ensure reliable override of :root variables.
See notiThemeStyle() helper in noti/config.php
*/

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-dark);
  font-weight: 700;
}

a { color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); text-decoration: none; }

/* ============================================================
   TOP BAR
   ============================================================ */
.noti-topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 8px 0;
  font-size: 13px;
  position: relative;
  z-index: 1001;
}
.noti-topbar a { color: rgba(255,255,255,0.7); }
.noti-topbar a:hover { color: var(--accent); }

/* ============================================================
   HEADER
   ============================================================ */
.noti-header {
  background: var(--white);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.noti-header.scrolled { box-shadow: var(--shadow-md); }

.noti-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 26px;
  color: var(--primary-dark);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.noti-logo i { color: var(--primary-light); margin-right: 6px; }
.noti-logo:hover { color: var(--primary-dark); text-decoration: none; }
.noti-logo span { color: var(--accent); font-weight: 400; font-size: 14px; letter-spacing: 2px; display: block; margin-top: -4px; }

/* ============================================================
   NAV
   ============================================================ */
.noti-nav {
  background: var(--white);
  border-bottom: 1px solid #eee;
  padding: 0;
}
.noti-nav a {
  display: inline-block;
  padding: 12px 18px;
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: var(--transition);
}
.noti-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  transition: var(--transition);
}
.noti-nav a:hover, .noti-nav a.active { color: var(--primary); }
.noti-nav a:hover::after, .noti-nav a.active::after { width: 70%; }

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.noti-hero {
  position: relative;
  min-height: 500px;
}
.noti-hero .carousel-item {
  min-height: 500px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.noti-hero .carousel-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--overlay-from) 0%, var(--overlay-to) 100%);
}
.noti-hero .carousel-caption {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 20%;
  text-align: left;
  z-index: 2;
}
.noti-hero .carousel-caption h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 12px;
}
.noti-hero .carousel-caption p {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  max-width: 550px;
}
.noti-hero .carousel-caption .btn {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.noti-hero .carousel-caption .btn:hover { background: #c4955e; transform: translateY(-2px); }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.noti-search {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}
.noti-search input {
  width: 100%;
  padding: 12px 50px 12px 20px;
  border: 2px solid #e0e7e3;
  border-radius: 50px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--white);
}
.noti-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(45,106,79,0.12); }
.noti-search button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50px;
  width: 40px;
  cursor: pointer;
  transition: var(--transition);
}
.noti-search button:hover { background: var(--primary-dark); }

/* ============================================================
   NEWS CARD
   ============================================================ */
.noti-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.noti-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.noti-card-img {
  height: 200px;
  overflow: hidden;
  background: var(--primary-bg);
}
.noti-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.noti-card:hover .noti-card-img img { transform: scale(1.06); }
.noti-card-body { padding: 20px; }
.noti-card .categoria {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  font-weight: 600;
}
.noti-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 6px 0 8px;
  line-height: 1.4;
}
.noti-card h3 a { color: inherit; text-decoration: none; }
.noti-card h3 a:hover { color: var(--primary); }
.noti-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.noti-card .fecha { font-size: 12px; color: var(--text-muted); }
.noti-card .btn-mas {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
.noti-card .btn-mas:hover { color: var(--primary-dark); gap: 10px; }

/* ============================================================
   FEATURED NEWS
   ============================================================ */
.noti-featured {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 350px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.noti-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, var(--overlay-feat));
}
.noti-featured .content {
  position: relative;
  z-index: 1;
  padding: 30px;
  color: var(--white);
}
.noti-featured .content .categoria { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.noti-featured .content h3 { color: var(--white); font-size: 22px; margin: 6px 0; }
.noti-featured .content h3 a { color: var(--white); }
.noti-featured .content h3 a:hover { color: var(--accent); }
.noti-featured .content p { color: rgba(255,255,255,0.7); font-size: 14px; }
.noti-featured .content .fecha { color: rgba(255,255,255,0.5); font-size: 12px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.noti-sidebar h5 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary-light);
}
.noti-titulares { list-style: none; padding: 0; }
.noti-titulares li {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.noti-titulares li:last-child { border-bottom: none; }
.noti-titulares a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  display: block;
  line-height: 1.4;
  transition: var(--transition);
}
.noti-titulares a:hover { color: var(--primary); padding-left: 4px; }
.noti-titulares .fecha { font-size: 11px; color: var(--text-muted); }

/* Sponsors */
.noti-sponsors { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.noti-sponsors img { max-height: 50px; filter: grayscale(0.3); opacity: 0.7; transition: var(--transition); }
.noti-sponsors a:hover img { filter: grayscale(0); opacity: 1; }

/* ============================================================
   FULL ARTICLE
   ============================================================ */
.noti-article h1 { font-size: 2.5rem; margin-bottom: 16px; }
.noti-article .meta { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.noti-article .meta span { margin-right: 20px; }
.noti-article .meta i { color: var(--primary); margin-right: 4px; }
.noti-article img { max-width: 100%; border-radius: var(--radius-md); margin: 20px 0; }
.noti-article p { margin-bottom: 16px; font-size: 15px; line-height: 1.8; }

/* ============================================================
   PAGINATION
   ============================================================ */
.noti-pagination .page-link {
  border: none;
  color: var(--text-body);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  margin: 0 2px;
  font-size: 14px;
  transition: var(--transition);
}
.noti-pagination .page-link:hover { background: var(--primary-bg); color: var(--primary); }
.noti-pagination .page-item.active .page-link { background: var(--primary); color: var(--white); }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.noti-page-header {
  background: linear-gradient(135deg, var(--overlay-from), var(--overlay-to));
  padding: 60px 0;
  text-align: center;
  color: var(--white);
}
.noti-page-header h1 { color: var(--white); font-size: 2.5rem; }
.noti-page-header p { color: rgba(255,255,255,0.7); max-width: 600px; margin: 10px auto 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.noti-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 50px 0 30px;
}
.noti-footer h5 {
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.noti-footer a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 14px; display: block; margin-bottom: 8px; transition: var(--transition); }
.noti-footer a:hover { color: var(--accent); padding-left: 4px; }
.noti-footer .social a {
  display: inline-flex;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-right: 6px;
  transition: var(--transition);
}
.noti-footer .social a:hover { background: var(--primary-light); color: var(--white); padding-left: 0; }
.noti-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  margin-top: 30px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in { opacity: 0; transform: translateY(25px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  .noti-hero, .noti-hero .carousel-item { min-height: 350px; }
  .noti-hero .carousel-caption { bottom: 10%; }
}
/* Header inline nav links */
.noti-header .nav-link {
  display: inline-block;
  padding: 8px 14px;
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: var(--transition);
}
.noti-header .nav-link:hover,
.noti-header .nav-link.active { color: var(--primary); }
.noti-header .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  transition: var(--transition);
}
.noti-header .nav-link:hover::after,
.noti-header .nav-link.active::after { width: 70%; }

@media (max-width: 767.98px) {
  .noti-nav { overflow-x: auto; white-space: nowrap; }
  .noti-article h1 { font-size: 1.6rem; }
}
