@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* Premium Palette */
  --gold: #D4AF37;
  --gold-light: #F4E5BC;
  --gold-dark: #AA8C2C;
  --dark: #1A1A1A;
  --dark-soft: #2C2C2C;
  --light: #FAFAFA;
  --white: #FFFFFF;
  --text: #333333;
  --text-light: #666666;
  --accent: #800000;
  /* Burgundy for liturgical accents */

  /* Spacing & Layout */
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
  --container: 1200px;
  --header-height: 80px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--light);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  line-height: 1.6;
  padding-top: var(--header-height);
  /* Space for fixed header */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
  color: var(--dark);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

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

/* Utilities */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.center {
  text-align: center;
}

.flex {
  display: flex;
  align-items: center;
}

.grid {
  display: grid;
  gap: 2rem;
}

.hidden {
  display: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease forwards;
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

.logo {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

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

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--dark-soft);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: 0.3s;
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* Hero */
.hero {
  height: 85vh;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url("assets/igreja.jpg") center/cover fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 1rem;
}

.hero-content {
  max-width: 800px;
  animation: fadeIn 1s ease;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.app-showcase {
  background: radial-gradient(circle at 15% 10%, #fff5d8 0%, #fff 50%, #f8f8f8 100%);
}

.app-card {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--white);
  border: 1px solid #eee3bf;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.app-photo-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ead9a8;
}

.app-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  filter: contrast(1.06);
}

.app-copy h2 {
  margin-bottom: 0.8rem;
}

.app-copy p {
  margin-bottom: 1rem;
  color: var(--text-light);
  max-width: 720px;
}

.app-license-note {
  font-size: 0.82rem;
  color: #7a6a45;
  margin-top: 0.9rem;
  margin-bottom: 0;
}

.pope-section {
  background: linear-gradient(135deg, #f8f6f0 0%, #fffdfa 100%);
}

.pope-homily-card {
  max-width: 920px;
  margin: 0 auto;
}

.pope-homily-card h3 {
  margin-bottom: 0.9rem;
}

.pope-homily-card p {
  margin-bottom: 0.9rem;
}

.pope-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  border: 2px solid var(--gold);
}

.btn:hover {
  background: transparent;
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  margin-left: 1rem;
}

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

/* Sections */
.section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.section-title p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.03);
  overflow: hidden;
  position: relative;
}

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

.card-img {
  height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.card:hover .card-img img {
  transform: scale(1.1);
}

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

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

/* Liturgy Section */
#liturgia {
  background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
  position: relative;
}

.liturgy-controls {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.date-picker {
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--gold-light);
  border-radius: 50px;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: 0.3s;
}

.date-picker:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.liturgy-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin: 0 auto;
}

.liturgy-card h3 {
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--gold-light);
  padding-bottom: 1rem;
}

.liturgy-card h4 {
  color: var(--gold-dark);
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.liturgy-card h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.liturgy-leituras p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

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

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
  text-align: left;
}

.footer h4 {
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: 0.3s;
  z-index: 999;
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(10deg);
}

.whatsapp-float img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-top: 118px;
  }

  .header {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

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

  .app-card {
    grid-template-columns: 1fr;
  }

  .nav-links {
    position: static;
    right: auto;
    top: auto;
    height: auto;
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding: 0;
    box-shadow: none;
    transition: none;
    gap: 0.8rem 1rem;
  }

  .nav-links.active {
    right: auto;
  }

  .hamburger {
    display: none;
  }

  .header {
    justify-content: flex-start;
  }

  .liturgy-card {
    padding: 1.5rem;
  }
}

/* Hamburger Menu */
.hamburger {
  display: none;
  width: 30px;
  height: 20px;
  position: relative;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--dark);
  position: absolute;
  transition: 0.3s;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 9px;
}

.hamburger span:nth-child(3) {
  top: 18px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 9px;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 9px;
}

/* Install App Button */
#install-btn {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: var(--gold);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 998;
  font-weight: 600;
  cursor: pointer;
  animation: fadeIn 1s ease;
}

.ios-install-hint {
  position: fixed;
  bottom: 160px;
  right: 30px;
  width: min(340px, calc(100% - 2rem));
  background: #fffdf4;
  color: var(--dark-soft);
  border: 1px solid #e8d9a4;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  padding: 0.9rem 1rem;
  z-index: 998;
  font-size: 0.92rem;
}

.novena-guide {
  background: linear-gradient(135deg, #fff8e9 0%, #ffffff 100%);
  border: 1px solid #ecd9a3;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

/* Share Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 2rem;
  border: 1px solid #888;
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  animation: fadeIn 0.3s;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.share-preview img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

/* Sub pages, forms and secretaria panel */
.subheader {
  background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 60%, #3a3020 100%);
  color: var(--white);
  padding: 3rem 1rem;
  text-align: center;
}

.subheader h1 {
  color: var(--white);
  font-size: 2.4rem;
}

.light {
  background: linear-gradient(135deg, #fff9ef 0%, #fafafa 100%);
}

.auth-card h2 {
  margin-bottom: 0.3rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 1.3rem;
}

.form-grid label {
  font-weight: 600;
  color: var(--dark-soft);
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid #d7d7d7;
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--white);
}

.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14);
}

.alert {
  margin-top: 1rem;
  margin-bottom: 0.8rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.alert-error {
  background: #ffe7e7;
  border: 1px solid #e9a7a7;
  color: #7a1f1f;
}

.alert-success {
  background: #e9ffe9;
  border: 1px solid #a6d8a6;
  color: #1a6624;
}

.panel-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.table-wrap {
  overflow-x: auto;
}

.panel-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.panel-table th,
.panel-table td {
  border-bottom: 1px solid #ececec;
  padding: 0.7rem;
  text-align: left;
  vertical-align: top;
}

.panel-table th {
  background: #fff6dc;
  color: var(--dark-soft);
  font-weight: 700;
}

.inline-form {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.btn-small {
  padding: 0.45rem 0.8rem;
  font-size: 0.83rem;
  border-radius: 10px;
  box-shadow: none;
}

.btn-danger {
  background: #922d2d;
  border-color: #922d2d;
  color: #fff;
}

.docs-list {
  list-style: disc;
  margin-left: 1.3rem;
}

.user-chip {
  margin-top: 0.9rem;
  display: inline-block;
  background: #f4edd2;
  color: #3f3621;
  border: 1px solid #dece9f;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .subheader h1 {
    font-size: 1.8rem;
  }
}