* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #a2bba3;
  --secondary-color: #a39d84;
  --light-bg: #f5f3f0;
  --dark-text: #2a2a28;
  --border-color: #d4cfc8;
  --success-color: #6b8b66;
  --accent-color: #c9b8a8;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cardo', serif;
  color: var(--dark-text);
  background-color: var(--light-bg);
  line-height: 1.6;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ NAVBAR ============ */
.navbar {
  background: white;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--dark-text);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 3rem;
}

.nav-link {
  color: var(--dark-text);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.nav-link:hover {
  color: var(--primary-color);
}

/* ============ MAIN ============ */
main {
  min-height: calc(100vh - 200px);
  padding: 7rem 0 3rem;
}

.page {
  display: none;
  animation: fadeIn 0.5s ease;
  padding-top: 1rem;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ ENTRADA ============ */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.login-content {
  animation: fadeIn 0.4s ease;
  text-align: center;
  width: 100%;
  max-width: 600px;
}

.login-header {
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 3.5rem;
  color: var(--dark-text);
  margin-bottom: 0.5rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.login-header h2 {
  font-size: 1.2rem;
  color: var(--dark-text);
  margin-bottom: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.login-subtitle {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.login-image {
  animation: fadeIn 0.4s ease 0.1s backwards;
  width: 100%;
  max-width: 500px;
  margin: 2rem auto;
}

.login-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 300px;
}

.login-form {
  background: white;
  padding: 2.5rem;
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--border-color);
  margin: 2rem 0;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

.login-form .form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 400;
  color: var(--dark-text);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.login-form .form-group input {
  width: 100%;
  padding: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
  background: var(--light-bg);
  color: var(--dark-text);
}

.login-form .form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: none;
  background: white;
}

.login-form button {
  width: 100%;
  margin-top: 1rem;
}

.login-footer {
  margin-top: 2rem;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 300;
}

/* ============ ENTRADA ============ */
.entrada-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.entrada-content {
  animation: fadeIn 0.4s ease;
  text-align: center;
  width: 100%;
  max-width: 800px;
}

.entrada-content h1 {
  font-size: 3.5rem;
  color: var(--dark-text);
  margin-bottom: 0.5rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.entrada-content h2 {
  font-size: 1.2rem;
  color: var(--dark-text);
  margin-bottom: 2rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.entrada-content h1,
.rsvp-container h1,
.presentes-container h1 {
  margin-top: 1rem;
}

.ceremony-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
  width: 100%;
}

.detail-item {
  background: transparent;
  padding: 1.5rem;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--primary-color);
  box-shadow: none;
  text-align: center;
}

.detail-item h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-item p {
  color: var(--dark-text);
  font-weight: 300;
  font-size: 1rem;
  white-space: pre-line;
  line-height: 1.6;
}

.ceremony-message {
  background: transparent;
  padding: 2rem 0;
  border-radius: 0;
  margin: 2rem 0;
  border: none;
  width: 100%;
}

.ceremony-message p {
  font-size: 1.1rem;
  color: var(--dark-text);
  margin-bottom: 1rem;
  font-weight: 300;
  line-height: 1.8;
}

.ceremony-message p:last-child {
  margin-bottom: 0;
}

.entrada-image {
  animation: fadeIn 0.4s ease 0.1s backwards;
  width: 100%;
  max-width: 820px;
  margin: 2rem auto 3rem;
}

.entrada-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.entrada-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.ceremony-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.entrada-map {
  animation: fadeIn 0.4s ease 0.2s backwards;
  width: 100%;
  max-width: none;
  margin: 3rem 0 0 0;
}

.entrada-map img {
  width: 100%;
  height: auto;
  max-height: 860px;
  object-fit: cover;
  border-radius: 0;
}

.entrada-carousel {
  width: 100%;
  margin-top: 3rem;
  text-align: center;
}

.entrada-carousel h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--dark-text);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.carousel-frame {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 400px;
  margin: 0 auto;
  overflow: hidden;
  border: none;
  background: transparent;
}

.carousel-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-color);
  color: var(--dark-text);
  font-size: 2rem;
  width: 50px;
  height: 50px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.carousel-control:hover {
  background: white;
}

.carousel-control.prev {
  left: 0;
}

.carousel-control.next {
  right: 0;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .carousel-control {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .entrada-carousel h3 {
    font-size: 1rem;
  }
}

@media (max-width: 1024px) {
  .entrada-bottom {
    grid-template-columns: 1fr;
  }
}


.placeholder-image {
  background: var(--accent-color);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 400px;
  color: white;
  font-size: 1.3rem;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============ BUTTONS ============ */
.btn {
  padding: 0.9rem 2.5rem;
  border: none;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
}

.btn-primary:hover {
  background: var(--dark-text);
  border-color: var(--dark-text);
  transform: none;
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--light-bg);
}

/* ============ RSVP ============ */
.rsvp-container {
  max-width: 600px;
  margin: 0 auto;
}

.rsvp-subtitle,
.presentes-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.rsvp-form,
.contribution-form {
  background: white;
  padding: 2.5rem;
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 400;
  color: var(--dark-text);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
  background: var(--light-bg);
  color: var(--dark-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: none;
  background: white;
}

.form-group button {
  width: 100%;
  margin-top: 1rem;
}

#rsvp-message,
#contribution-message {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0;
  text-align: center;
}

.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0;
}

.message.success {
  background: rgba(107, 139, 102, 0.1);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.message.error {
  background: rgba(139, 107, 110, 0.1);
  color: #7a5a5e;
  border: 1px solid #a39d84;
}

.message.hidden {
  display: none;
}

/* ============ PRESENTES ============ */
.presentes-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.presentes-container h1 {
  text-align: center;
  color: var(--dark-text);
  margin-bottom: 1rem;
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.gifts-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 0 1rem;
}

.gift-card {
  background: white;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.gift-card:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gift-header {
  background: var(--accent-color);
  color: white;
  padding: 1.5rem 1.2rem;
}

.gift-name {
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift-name strong {
  font-weight: 700;
}

.price-display {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: white;
  padding: 0.5rem 0;
  margin: 1rem 0 0.25rem 0;
  text-align: left;
}

.gift-image-wrapper {
  overflow: hidden;
}

.gift-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0;
  margin-bottom: 1rem;
}

.gift-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.gift-description {
  color: var(--dark-text);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 300;
}

.progress-section {
  margin: 0.5rem 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
  border-radius: 0;
}

.gift-footer {
  display: flex;
  gap: 0.8rem;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.gift-footer .btn {
  width: 100%;
  padding: 0.63rem 0.9rem;
  font-size: 0.765rem;
}

.btn-details {
  background: white;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
}

.btn-details:hover {
  background: var(--light-bg);
  border-color: var(--primary-color);
}

.btn-contribute {
  background: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
}

.btn-contribute:disabled {
  background: #b0b0ab;
  border-color: #b0b0ab;
  cursor: not-allowed;
  opacity: 0.75;
}

.bank-transfer-note {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: #555;
  line-height: 1.5;
}

/* ============ MODAL ============ */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 2.5rem;
  border-radius: 0;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s ease;
  border: 1px solid var(--border-color);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  color: var(--primary-color);
  float: right;
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.3s ease;
  opacity: 0.6;
}

.close:hover,
.close:focus {
  color: var(--dark-text);
  opacity: 1;
}

.modal-content h2 {
  color: var(--dark-text);
  margin-bottom: 1.5rem;
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.03em;
}

/* ============ DETAILS PANEL ============ */
.details-panel {
  position: fixed;
  top: 0;
  right: -500px;
  width: 450px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.details-panel.active {
  right: 0;
}

.details-content {
  padding: 2rem;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.details-header h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--dark-text);
}

.close-panel {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--dark-text);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.details-image {
  margin-bottom: 2rem;
  text-align: center;
}

.details-image img {
  max-width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  border-radius: 4px;
}

.details-description {
  margin-bottom: 2rem;
}

.details-description p {
  line-height: 1.6;
  color: var(--dark-text);
  font-size: 1rem;
}

.details-price {
  text-align: center;
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-top: 1rem;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--light-bg);
  color: var(--dark-text);
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .entrada-content h1 {
    font-size: 2.5rem;
  }

  .ceremony-details {
    grid-template-columns: 1fr;
  }

  .login-header h1 {
    font-size: 2.5rem;
  }

  .login-header h2 {
    font-size: 1rem;
  }

  .login-image {
    max-width: 400px;
  }

  .login-form {
    padding: 2rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .nav-brand {
    font-size: 1.3rem;
  }

  .entrada-content h2 {
    font-size: 1.5rem;
  }

  .gifts-list {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 1rem;
  }

  .details-panel {
    top: auto;
    bottom: -100%;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 85vh;
    border-radius: 0;
    transition: bottom 0.3s ease;
  }

  .details-panel.active {
    right: 0;
    bottom: 0;
  }

  .details-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .ceremony-details {
    grid-template-columns: 1fr;
  }

  .gifts-list {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .placeholder-image {
    height: 300px;
  }
}

/* ============ ADMIN PAGE ============ */
.admin-container {
  padding: 2rem 0;
}

.admin-container h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--dark-text);
}

.admin-table-section {
  margin-bottom: 3rem;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-table-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--dark-text);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table thead {
  background-color: var(--primary-color);
  color: white;
}

.admin-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.admin-table td {
  padding: 1rem;
  border: 1px solid var(--border-color);
}

.admin-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.admin-table tbody tr:hover {
  background-color: #f0f0f0;
}

@media (max-width: 768px) {
  .admin-table {
    font-size: 0.8rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }

  .admin-table-section {
    padding: 1rem;
    margin-bottom: 2rem;
  }
}
