/* 
 * PlanFinanzas - Blog de Planificación Financiera Familiar
 * Archivo CSS principal
 */

/* Reset y base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2e7d32;
  --primary-light: #60ad5e;
  --primary-dark: #005005;
  --secondary-color: #f5f5f5;
  --accent-color: #ffc107;
  --text-color: #333;
  --text-light: #666;
  --white: #ffffff;
  --error: #d32f2f;
  --success: #388e3c;
  --border-color: #e0e0e0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 5px;
  --container-max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-color);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--primary-dark);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

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

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

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

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

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

/* Botones */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

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

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Header */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

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

.logo img {
  max-height: 60px;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  font-weight: 600;
  color: var(--text-color);
  position: relative;
}

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

.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  background-color: var(--primary-light);
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero.jpg');
  background-size: cover;
  background-position: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Page Header */
.page-header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Countdown Section */
.countdown {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.countdown h2 {
  color: var(--white);
  margin-bottom: 2rem;
}

#countdown-timer {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

#countdown-timer div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#countdown-timer span {
  font-size: 3rem;
  font-weight: bold;
  background-color: var(--primary-light);
  color: var(--white);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#countdown-timer p {
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0;
}

/* Stats Section */
.stats {
  padding: 4rem 0;
  background-color: var(--secondary-color);
}

.stats h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.stat-item {
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  display: block;
  margin-bottom: 1rem;
}

.stat-item p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* Featured Posts Section */
.featured-posts {
  padding: 4rem 0;
}

.featured-posts h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.three-columns {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
  .three-columns {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.post-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-5px);
}

.post-image {
  height: 200px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
}

.post-content h3, .post-content h2 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

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

.read-more {
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding-right: 1.5rem;
}

.read-more::after {
  content: "→";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: var(--transition);
}

.read-more:hover::after {
  right: -5px;
}

.view-all {
  text-align: center;
  margin-top: 3rem;
}

/* Post Meta */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.date, .category {
  display: inline-flex;
  align-items: center;
}

.date::before, .category::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 50%;
  margin-right: 0.5rem;
}

/* Blog Posts Section */
.blog-posts {
  padding: 4rem 0;
}

/* Blog Post (single) */
.blog-post {
  padding: 4rem 0;
}

.post-header {
  text-align: center;
  margin-bottom: 2rem;
}

.post-header h1 {
  margin-bottom: 1rem;
}

.post-header .post-meta {
  justify-content: center;
}

.blog-post .post-image {
  height: auto;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.post-author {
  font-weight: 600;
}

.post-content {
  max-width: 800px;
  margin: 0 auto;
}

.post-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-tags {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.post-tags span {
  font-weight: 600;
  margin-right: 1rem;
}

.post-tags a {
  display: inline-block;
  background-color: var(--secondary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.post-share {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
}

.post-share span {
  font-weight: 600;
  margin-right: 1rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: var(--text-color);
  margin-right: 0.5rem;
}

.share-btn:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.facebook:hover {
  background-color: #3b5998;
}

.twitter:hover {
  background-color: #1da1f2;
}

.linkedin:hover {
  background-color: #0077b5;
}

.email:hover {
  background-color: #ea4335;
}

/* Related Posts */
.related-posts {
  padding: 4rem 0;
  background-color: var(--secondary-color);
}

.related-posts h2 {
  text-align: center;
  margin-bottom: 3rem;
}

/* CTA Section */
.cta {
  padding: 5rem 0;
  background-color: var(--primary-dark);
  color: var(--white);
  text-align: center;
}

.cta h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta p {
  margin-bottom: 2rem;
  font-size: 1.2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Newsletter Section */
.newsletter {
  padding: 4rem 0;
  background-color: var(--secondary-color);
}

.newsletter-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter h2 {
  margin-bottom: 1rem;
}

.newsletter p {
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

/* About Page */
.about-intro {
  padding: 4rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.values-list {
  list-style: none;
  margin-left: 0;
  margin-top: 1.5rem;
}

.values-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.values-list span {
  font-weight: 600;
  color: var(--primary-color);
}

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

/* Team Section */
.team {
  padding: 4rem 0;
  background-color: var(--secondary-color);
}

.team h2, .section-intro {
  text-align: center;
}

.section-intro {
  max-width: 800px;
  margin: 0 auto 3rem auto;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.team-member {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding-bottom: 1.5rem;
  transition: var(--transition);
}

.team-member:hover {
  transform: translateY(-5px);
}

.team-member img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.team-member h3, .team-member p {
  text-align: center;
  padding: 0 1rem;
}

.team-member h3 {
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.team-member p:first-of-type {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Testimonials */
.testimonials {
  padding: 4rem 0;
}

.testimonials h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.testimonial-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonial {
  display: none;
}

.testimonial-content {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  text-align: center;
}

.testimonial-content::before {
  content: """;
  font-size: 5rem;
  color: var(--primary-light);
  position: absolute;
  top: -20px;
  left: 20px;
  opacity: 0.3;
}

.testimonial-content p {
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.testimonial-author strong {
  color: var(--primary-dark);
}

.testimonial-author span {
  color: var(--text-light);
}

.testimonial-controls {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  gap: 1rem;
}

.prev-testimonial, .next-testimonial {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
}

.prev-testimonial:hover, .next-testimonial:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Contact Page */
.contact-info {
  padding: 4rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.contact-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateY(-5px);
}

.contact-icon {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-card h3 {
  margin-bottom: 0.75rem;
}

.contact-form-section {
  padding: 4rem 0;
  background-color: var(--secondary-color);
}

.contact-form-section .container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
}

@media (max-width: 992px) {
  .contact-form-section .container {
    grid-template-columns: 1fr;
  }
}

.form-container, .map-container {
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.form-container h2, .map-container h2 {
  margin-bottom: 1rem;
}

.form-container p {
  margin-bottom: 2rem;
}

.map {
  height: 300px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-top: 1.5rem;
}

.map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Contact Form */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  grid-column: span 2;
}

.form-group:nth-child(1), 
.form-group:nth-child(2), 
.form-group:nth-child(3) {
  grid-column: span 1;
}

@media (max-width: 576px) {
  .contact-form {
    grid-template-columns: 1fr;
  }

  .form-group:nth-child(1), 
  .form-group:nth-child(2), 
  .form-group:nth-child(3) {
    grid-column: span 2;
  }
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
}

.form-checkbox input {
  width: auto;
  margin-top: 0.25rem;
  margin-right: 0.75rem;
}

.form-group button {
  margin-top: 1rem;
}

/* Thank You Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: var(--white);
  margin: 15% auto;
  padding: 2rem;
  border-radius: var(--border-radius);
  max-width: 500px;
  position: relative;
  animation: modalopen 0.3s;
}

@keyframes modalopen {
  from {opacity: 0; transform: translateY(-30px);}
  to {opacity: 1; transform: translateY(0);}
}

.close-modal {
  color: var(--text-light);
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

.thank-you-message {
  text-align: center;
}

.thank-you-message svg {
  margin: 0 auto 1.5rem auto;
  display: block;
}

.thank-you-message h2 {
  margin-bottom: 1rem;
}

.thank-you-message p {
  margin-bottom: 2rem;
}

/* Cookie Banner */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
  padding: 1.5rem;
}

.cookie-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-accept {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
}

.btn-customize {
  background-color: var(--secondary-color);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
}

.btn-reject {
  background-color: var(--white);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border: 1px solid var(--text-light);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 992px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-logo {
    grid-column: span 2;
  }
}

@media (max-width: 576px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .footer-logo {
    grid-column: span 1;
  }
}

.footer-logo img {
  max-height: 60px;
  margin-bottom: 1rem;
}

.footer-logo p {
  margin-bottom: 0;
}

.footer-links h4, 
.footer-legal h4, 
.footer-contact h4,
.footer-social h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-links ul, 
.footer-legal ul {
  list-style: none;
  margin: 0;
}

.footer-links li, 
.footer-legal li {
  margin-bottom: 0.75rem;
}

.footer-links a, 
.footer-legal a {
  color: var(--secondary-color);
  transition: var(--transition);
}

.footer-links a:hover, 
.footer-legal a:hover {
  color: var(--white);
  padding-left: 5px;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--white);
  color: var(--primary-dark);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 992px) {
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  #countdown-timer {
    gap: 1rem;
  }
  
  #countdown-timer span {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 200;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    margin: 1.5rem 0;
  }
  
  .hamburger {
    display: block;
    z-index: 201;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -8px);
  }
  
  .hero {
    padding: 3rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  #countdown-timer {
    flex-wrap: wrap;
    justify-content: space-around;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-form button {
    width: 100%;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .container {
    padding: 0 1.5rem;
  }
  
  .hero {
    padding: 2.5rem 0;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  #countdown-timer span {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
  
  .post-header h1 {
    font-size: 1.8rem;
  }
}
