/* ==========================================
   TECH SEM PRESSA - ESTILO PRINCIPAL
   ========================================== */

/* --- RESET & BASE --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #7d9b7a;
  --color-primary-light: #a8c3a6;
  --color-primary-dark: #5a7a57;
  --color-secondary: #b8a9c9;
  --color-secondary-light: #d4c9e0;
  --color-accent: #c9b38b;
  --color-bg: #f5f3ef;
  --color-bg-alt: #ffffff;
  --color-text: #3a3a3a;
  --color-text-light: #6b6b6b;
  --color-border: #e0dcd4;
  --color-heading: #2d2d2d;
  --font-heading: 'Playfair Display', 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', 'Poppins', system-ui, sans-serif;
  --max-width: 1100px;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--color-primary);
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- TIPOGRAFIA --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

/* --- HEADER / NAVBAR --- */
.header {
  background: var(--color-bg-alt);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--color-secondary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-menu a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--color-primary-dark);
}

/* Menu Toggle (mobile) */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--color-text);
  border-radius: 3px;
  transition: var(--transition);
}

/* --- HERO SECTION --- */
.hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-secondary) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.hero h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 1rem;
  position: relative;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  margin: 0 auto 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}

/* --- MAIN CONTENT --- */
.main {
  padding: 3rem 0;
}

.page-header {
  padding: 8rem 0 2rem;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(184,169,201,0.1) 0%, transparent 50%);
}

.page-header h1 {
  color: #fff;
  font-size: 2.5rem;
  position: relative;
}

.page-header p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0.5rem auto 0;
  position: relative;
}

/* --- CARDS GRID --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  padding: 1.5rem;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary-dark);
}

.card-link:hover {
  gap: 0.75rem;
}

/* --- POSTS LIST --- */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.post-item {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: var(--transition);
}

.post-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.post-item .post-meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.post-item .post-category {
  background: var(--color-primary-light);
  color: #fff;
  padding: 0.15rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.post-item h3 {
  margin-bottom: 0.5rem;
}

.post-item h3 a {
  color: var(--color-heading);
}

.post-item h3 a:hover {
  color: var(--color-primary-dark);
}

.post-item p {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

/* --- ABOUT PAGE --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-image img {
  width: 100%;
  height: auto;
}

.about-text h2 {
  margin-bottom: 1rem;
}

.about-text p {
  margin-bottom: 1rem;
}

/* --- CONTACT FORM --- */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-bg-alt);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--color-bg);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(125, 155, 122, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(125, 155, 122, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary-dark);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}

/* --- RESOURCES SECTION --- */
.resource-category {
  margin-bottom: 3rem;
}

.resource-category h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-primary-light);
}

.resource-item {
  background: var(--color-bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.resource-item .resource-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.resource-item .resource-info h4 {
  margin-bottom: 0.25rem;
}

.resource-item .resource-info p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.resource-item .resource-link {
  margin-left: auto;
  flex-shrink: 0;
}

/* --- FOOTER --- */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer a:hover {
  color: var(--color-primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

/* --- BREADCRUMB --- */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-light);
}

.breadcrumb a {
  color: var(--color-text-light);
}

.breadcrumb a:hover {
  color: var(--color-primary-dark);
}

.breadcrumb span {
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* --- SECTION TITLE --- */
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 3px;
}

.section-title p {
  margin-top: 0.75rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- CATEGORY GRID (HOME) --- */
.categories-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.category-card .cat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.category-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 0;
}

/* --- NEWSLETTER --- */
.newsletter {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-secondary) 100%);
  padding: 3rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  color: #fff;
  margin-top: 3rem;
}

.newsletter h3 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.newsletter-form input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 169, 201, 0.3);
}

.newsletter-form .btn {
  background: var(--color-accent);
  color: var(--color-text);
}

.newsletter-form .btn:hover {
  background: #c9b38b;
  color: var(--color-text);
}

/* --- DECORATIVE ELEMENTS --- */
.deco-leaf {
  display: inline-block;
  width: 24px;
  height: 24px;
  opacity: 0.2;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }

  .about-content {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .page-header {
    padding: 7rem 0 1.5rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .categories-home {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .categories-home {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .resource-item {
    flex-direction: column;
    text-align: center;
  }

  .resource-item .resource-link {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}
